diff --git a/.gitignore b/.gitignore index e45f14c3..fc736545 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ data analysis/.ipynb_checkpoints/test-checkpoint.ipynb .vscode/settings.json .vscode data analysis/arthur_pull.ipynb +data analysis/keys.txt diff --git a/data analysis/analysis/__pycache__/analysis.cpython-37.pyc b/data analysis/analysis/__pycache__/analysis.cpython-37.pyc index 97b51845..fb260deb 100644 Binary files a/data analysis/analysis/__pycache__/analysis.cpython-37.pyc and b/data analysis/analysis/__pycache__/analysis.cpython-37.pyc differ diff --git a/data analysis/config.csv b/data analysis/config.csv new file mode 100644 index 00000000..16c1fa63 --- /dev/null +++ b/data analysis/config.csv @@ -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 \ No newline at end of file diff --git a/data analysis/superscript.py b/data analysis/superscript.py index 4ecab30e..d0e1aba5 100644 --- a/data analysis/superscript.py +++ b/data analysis/superscript.py @@ -69,8 +69,8 @@ def main(): def load_config(file): config_vector = {} file = an.load_csv(file) - for line in file[2:]: - config_vector[line[0]] = line[2:] + for line in file[1:]: + config_vector[line[0]] = line[1:] 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]: test_vector = {} variable_data = data[team][variable] - for test in tests[variable]: - test_vector[test] = simplestats(variable_data, test) + if(variable in tests): + for test in tests[variable]: + test_vector[test] = simplestats(variable_data, test) + else: + pass variable_vector[variable] = test_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): - if(test == "simple_stats"): + if(test == "basic_stats"): return an.basic_stats(data) if(test == "historical_analysis"):