diff --git a/.github/workflows/update_statsbomb_data_csv.yml b/.github/workflows/update_statsbomb_data_csv.yml index c74b028..dbb028d 100644 --- a/.github/workflows/update_statsbomb_data_csv.yml +++ b/.github/workflows/update_statsbomb_data_csv.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.12"] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/update_statsbomb_data_parquet.yml b/.github/workflows/update_statsbomb_data_parquet.yml index e89f886..cc468c8 100644 --- a/.github/workflows/update_statsbomb_data_parquet.yml +++ b/.github/workflows/update_statsbomb_data_parquet.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.12"] steps: - uses: actions/checkout@v3 diff --git a/check_data_advalibility.py b/check_data_advalibility.py index 55ffe4e..8442ac0 100644 --- a/check_data_advalibility.py +++ b/check_data_advalibility.py @@ -18,7 +18,7 @@ ) -def check_data_advalibility( +def check_data_availability( check_csv: bool = False, check_parquet: bool = False, check_all_seasons: bool = True @@ -123,12 +123,12 @@ def check_data_advalibility( "files, or the `.parquet` files." ) elif csv_flag is True: - check_data_advalibility( + check_data_availability( check_csv=True, check_all_seasons=check_all_seasons ) elif parquet_flag is True: - check_data_advalibility( + check_data_availability( check_parquet=True, check_all_seasons=check_all_seasons ) diff --git a/parse_statsbomb_data.py b/parse_statsbomb_data.py index 74898f4..c28f404 100644 --- a/parse_statsbomb_data.py +++ b/parse_statsbomb_data.py @@ -226,7 +226,10 @@ def parse_statsbomb_amf_tracking_data(json_data: dict): position_code = player["player"]["position_code"] player_name = player["player"]["name"] player_jersey_number = player["player"]["jersey_number"] - gsis_player_id = player["player"]["gsis_player_id"] + try: + gsis_player_id = player["player"]["gsis_player_id"] + except: + gsis_player_id = None on_camera_ratio = player["on_camera_ratio"] row_df = pd.DataFrame(player["steps"]) @@ -410,7 +413,7 @@ def get_statsbomb_tracking_data(season: int): if __name__ == "__main__": print("starting up") - for i in range(2018, 2024): + for i in range(2016, 2017): get_statsbomb_tracking_data(i) # get_statsbomb_tracking_data(2019)