Skip to content

Commit

Permalink
Merge main into sweep/add-sweep-config
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Apr 1, 2024
2 parents 3e9cd84 + c3dcefb commit 9d519b4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_statsbomb_data_csv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_statsbomb_data_parquet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions check_data_advalibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)
Expand Down
7 changes: 5 additions & 2 deletions parse_statsbomb_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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)

0 comments on commit 9d519b4

Please sign in to comment.