changes, testing

This commit is contained in:
art 2020-03-03 18:13:03 -06:00
parent 2710642f15
commit df66d28959
4 changed files with 15 additions and 5 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@ data analysis/.ipynb_checkpoints/test-checkpoint.ipynb
.vscode/settings.json .vscode/settings.json
.vscode .vscode
data analysis/arthur_pull.ipynb data analysis/arthur_pull.ipynb
data analysis/keys.txt

6
data analysis/config.csv Normal file
View File

@ -0,0 +1,6 @@
2020ilch
balls-blocked, basic_stats
balls-collected, basic_stats
balls-lower, basic_stats
balls-started, basic_stats
balls-upper, basic_stats
1 2020ilch
2 balls-blocked, basic_stats
3 balls-collected, basic_stats
4 balls-lower, basic_stats
5 balls-started, basic_stats
6 balls-upper, basic_stats

View File

@ -69,8 +69,8 @@ def main():
def load_config(file): def load_config(file):
config_vector = {} config_vector = {}
file = an.load_csv(file) file = an.load_csv(file)
for line in file[2:]: for line in file[1:]:
config_vector[line[0]] = line[2:] config_vector[line[0]] = line[1:]
return (file[0][0], config_vector) return (file[0][0], config_vector)
@ -81,8 +81,11 @@ def simpleloop(data, tests): # expects 3D array with [Team][Variable][Match]
for variable in data[team]: for variable in data[team]:
test_vector = {} test_vector = {}
variable_data = data[team][variable] variable_data = data[team][variable]
if(variable in tests):
for test in tests[variable]: for test in tests[variable]:
test_vector[test] = simplestats(variable_data, test) test_vector[test] = simplestats(variable_data, test)
else:
pass
variable_vector[variable] = test_vector variable_vector[variable] = test_vector
return_vector[team] = variable_vector return_vector[team] = variable_vector
@ -90,7 +93,7 @@ def simpleloop(data, tests): # expects 3D array with [Team][Variable][Match]
def simplestats(data, test): def simplestats(data, test):
if(test == "simple_stats"): if(test == "basic_stats"):
return an.basic_stats(data) return an.basic_stats(data)
if(test == "historical_analysis"): if(test == "historical_analysis"):