datafc 1.2.0__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {datafc-1.2.0 → datafc-1.4.0}/PKG-INFO +251 -36
  2. {datafc-1.2.0 → datafc-1.4.0}/README.md +250 -35
  3. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/__init__.py +3 -1
  4. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_coordinates_data.py +1 -1
  5. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_goal_networks_data.py +1 -1
  6. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_lineups_data.py +1 -1
  7. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_match_data.py +40 -2
  8. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_match_odds_data.py +1 -1
  9. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_match_stats_data.py +1 -1
  10. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_momentum_data.py +1 -1
  11. datafc-1.4.0/datafc/sofascore/fetch_past_matches_data.py +180 -0
  12. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_shots_data.py +1 -1
  13. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_standings_data.py +1 -1
  14. {datafc-1.2.0 → datafc-1.4.0}/datafc/sofascore/fetch_substitutions_data.py +1 -1
  15. datafc-1.4.0/datafc/utils/_config.py +25 -0
  16. {datafc-1.2.0 → datafc-1.4.0}/datafc.egg-info/PKG-INFO +251 -36
  17. {datafc-1.2.0 → datafc-1.4.0}/datafc.egg-info/SOURCES.txt +1 -0
  18. {datafc-1.2.0 → datafc-1.4.0}/setup.py +1 -1
  19. datafc-1.2.0/datafc/utils/_config.py +0 -6
  20. {datafc-1.2.0 → datafc-1.4.0}/LICENSE +0 -0
  21. {datafc-1.2.0 → datafc-1.4.0}/datafc/__init__.py +0 -0
  22. {datafc-1.2.0 → datafc-1.4.0}/datafc/utils/__init__.py +0 -0
  23. {datafc-1.2.0 → datafc-1.4.0}/datafc/utils/_save_files.py +0 -0
  24. {datafc-1.2.0 → datafc-1.4.0}/datafc/utils/_setup_webdriver.py +0 -0
  25. {datafc-1.2.0 → datafc-1.4.0}/datafc.egg-info/dependency_links.txt +0 -0
  26. {datafc-1.2.0 → datafc-1.4.0}/datafc.egg-info/requires.txt +0 -0
  27. {datafc-1.2.0 → datafc-1.4.0}/datafc.egg-info/top_level.txt +0 -0
  28. {datafc-1.2.0 → datafc-1.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datafc
3
- Version: 1.2.0
3
+ Version: 1.4.0
4
4
  Summary: A scalable Python library for fetching, processing, and exporting structured football match data.
5
5
  Home-page: https://github.com/urazakgul/datafc
6
6
  Author: Uraz Akgül
@@ -14,7 +14,7 @@ Requires-Python: >=3.8
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
16
 
17
- # datafc v1.2.0
17
+ # datafc v1.4.0
18
18
 
19
19
  ## Overview
20
20
 
@@ -53,7 +53,7 @@ pip install git+https://github.com/urazakgul/datafc.git
53
53
  To install a specific version of `datafc`, use:
54
54
 
55
55
  ```bash
56
- pip install datafc==1.2.0
56
+ pip install datafc==1.4.0
57
57
  ```
58
58
 
59
59
  If you already have `datafc` installed and want to upgrade to the latest version, run:
@@ -105,6 +105,7 @@ from datafc.sofascore import (
105
105
  match_odds_data,
106
106
  match_stats_data,
107
107
  momentum_data,
108
+ past_matches_data,
108
109
  lineups_data,
109
110
  coordinates_data,
110
111
  substitutions_data,
@@ -140,20 +141,19 @@ The `lineups_data` function fetches player lineup details for each match and is
140
141
 
141
142
  Without `lineups_data`, these dependent functions will not work as expected.
142
143
 
143
- Exception: `standings_data`
144
+ Exception: `standings_data` and `past_matches_data`
144
145
 
145
- Unlike the other functions, `standings_data` does not require `match_data` or `lineups_data`. It can be executed independently using only `tournament_id` and `season_id`.
146
+ Unlike other functions, `standings_data` and `past_matches_data` do not require `match_data` or `lineups_data`. They can be executed independently using only `tournament_id` and `season_id`. Additionally, `past_matches_data` includes an extra field: `week_number`.
146
147
 
147
148
  ### Match Data
148
149
 
149
150
  #### `match_data`
150
151
 
151
- The `match_data` function fetches match data for a specified tournament, season, and matchweek. It returns a DataFrame containing details such as country, tournament name, season, week number, game ID, home team, home team ID, away team, away team ID, added injury times for both halves, start timestamp, match status, and score-related information.
152
+ The `match_data` function fetches match data for a specified tournament, season, and matchweek.
152
153
 
153
154
  Example Usage:
154
155
 
155
156
  ```python
156
- # Fetch match data for a specific tournament, season, and week
157
157
  match_df = match_data(
158
158
  tournament_id=52,
159
159
  season_id=63814,
@@ -164,15 +164,52 @@ match_df = match_data(
164
164
  )
165
165
 
166
166
  print(match_df)
167
+
168
+ uefa_match_df = match_data(
169
+ tournament_id=7,
170
+ season_id=61644,
171
+ week_number=5,
172
+ tournament_type="uefa",
173
+ tournament_stage="round_of_16",
174
+ data_source="sofascore",
175
+ enable_json_export=True,
176
+ enable_excel_export=True
177
+ )
178
+
179
+ print(uefa_match_df)
167
180
  ```
168
181
 
169
182
  Parameters:
170
183
 
171
184
  * `tournament_id` (int): The unique identifier for the tournament.
172
185
  * `season_id` (int): The unique identifier for the season.
173
- * `week_number` (int): The matchweek number within the season.
186
+ * `week_number` (int): The matchweek number within the season. The applicable week numbers depend on the tournament and stage, as outlined below for the 2024/25 season:
187
+ * UCL, UEL, UECL, and UNL:
188
+ * `qualification_round`: 1, 2, 3
189
+ * `qualification_playoff`: 636
190
+ * `group_stage_week`: 1, 2, 3, ..., 8 (for UNL, up to 6)
191
+ * `playoff_round`: 636
192
+ * `round_of_16`: 5
193
+ * `quarterfinals`: 27
194
+ * `semifinals`: 28
195
+ * `final`: 29
196
+ * Domestic Leagues:
197
+ * Use the corresponding matchweek number (e.g., for the 10th week of the season, enter `week_number=10`).
198
+ * `tournament_type` (str, optional): The tournament type (`uefa`). If `None`, assumes league format.
199
+ * `tournament_stage` (str, optional): The specific stage of the tournament. Available options for UEFA tournaments:
200
+ * `preliminary_final`
201
+ * `preliminary_final`
202
+ * `qualification_round`
203
+ * `qualification_playoff`
204
+ * `group_stage_week`
205
+ * `playoff_round`
206
+ * `round_of_16`
207
+ * `quarterfinals`
208
+ * `semifinals`
209
+ * `match_for_3rd_place`
210
+ * `final`
174
211
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
175
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
212
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
176
213
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
177
214
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
178
215
 
@@ -210,12 +247,11 @@ Dependencies:
210
247
 
211
248
  #### `match_odds_data`
212
249
 
213
- The `match_odds_data` function fetches betting odds data for each match in the provided match dataset. It returns a DataFrame containing match odds details, including market names, odds values, and whether the odds changed.
250
+ The `match_odds_data` function fetches betting odds data for each match in the provided match dataset.
214
251
 
215
252
  Example Usage:
216
253
 
217
254
  ```python
218
- # Fetch match odds data
219
255
  match_odds_df = match_odds_data(
220
256
  match_df=match_df,
221
257
  data_source="sofascore",
@@ -224,13 +260,22 @@ match_odds_df = match_odds_data(
224
260
  )
225
261
 
226
262
  print(match_odds_df)
263
+
264
+ uefa_match_odds_df = match_odds_data(
265
+ match_df=uefa_match_df,
266
+ data_source="sofascore",
267
+ enable_json_export=True,
268
+ enable_excel_export=True
269
+ )
270
+
271
+ print(uefa_match_odds_df)
227
272
  ```
228
273
 
229
274
  Parameters:
230
275
 
231
276
  * `match_df` (pd.DataFrame): A DataFrame containing match metadata, which should be generated by the `match_data` function.
232
277
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
233
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
278
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
234
279
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
235
280
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
236
281
 
@@ -258,12 +303,11 @@ Dependencies:
258
303
 
259
304
  #### `match_stats_data`
260
305
 
261
- The `match_stats_data` function fetches statistical data for each match in the provided match dataset. It returns a DataFrame containing key match statistics, including team performance metrics.
306
+ The `match_stats_data` function fetches statistical data for each match in the provided match dataset.
262
307
 
263
308
  Example Usage:
264
309
 
265
310
  ```python
266
- # Fetch match statistics data
267
311
  match_stats_df = match_stats_data(
268
312
  match_df=match_df,
269
313
  data_source="sofascore",
@@ -272,13 +316,22 @@ match_stats_df = match_stats_data(
272
316
  )
273
317
 
274
318
  print(match_stats_df)
319
+
320
+ uefa_match_stats_df = match_stats_data(
321
+ match_df=uefa_match_df,
322
+ data_source="sofascore",
323
+ enable_json_export=True,
324
+ enable_excel_export=True
325
+ )
326
+
327
+ print(uefa_match_stats_df)
275
328
  ```
276
329
 
277
330
  Parameters:
278
331
 
279
332
  * `match_df` (pd.DataFrame): A DataFrame containing match metadata, which should be generated by the `match_data` function.
280
333
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
281
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
334
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
282
335
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
283
336
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
284
337
 
@@ -303,12 +356,11 @@ Dependencies:
303
356
 
304
357
  #### `momentum_data`
305
358
 
306
- The `momentum_data` function fetches momentum data for each match in the provided match dataset. It returns a DataFrame containing match momentum values over time.
359
+ The `momentum_data` function fetches momentum data for each match in the provided match dataset.
307
360
 
308
361
  Example Usage:
309
362
 
310
363
  ```python
311
- # Fetch momentum data
312
364
  momentum_df = momentum_data(
313
365
  match_df=match_df,
314
366
  data_source="sofascore",
@@ -317,13 +369,22 @@ momentum_df = momentum_data(
317
369
  )
318
370
 
319
371
  print(momentum_df)
372
+
373
+ uefa_momentum_df = momentum_data(
374
+ match_df=uefa_match_df,
375
+ data_source="sofascore",
376
+ enable_json_export=True,
377
+ enable_excel_export=True
378
+ )
379
+
380
+ print(uefa_momentum_df)
320
381
  ```
321
382
 
322
383
  Parameters:
323
384
 
324
385
  * `match_df` (pd.DataFrame): A DataFrame containing match metadata, which should be generated by the `match_data` function.
325
386
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
326
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
387
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
327
388
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
328
389
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
329
390
 
@@ -343,16 +404,113 @@ Dependencies:
343
404
 
344
405
  * Requires `match_data` output as `match_df`.
345
406
 
407
+ #### `past_matches_data`
408
+
409
+ The `past_matches_data` function fetches past match data for a specified tournament, season, and week number.
410
+
411
+ Example Usage:
412
+
413
+ ```python
414
+ past_matches_df = past_matches_data(
415
+ tournament_id=52,
416
+ season_id=63814,
417
+ week_number=21,
418
+ data_source="sofascore",
419
+ enable_json_export=True,
420
+ enable_excel_export=True
421
+ )
422
+
423
+ print(past_matches_df)
424
+
425
+ uefa_past_matches_df = past_matches_data(
426
+ tournament_id=7,
427
+ season_id=61644,
428
+ week_number=5,
429
+ tournament_type="uefa",
430
+ tournament_stage="round_of_16",
431
+ data_source="sofascore",
432
+ enable_json_export=True,
433
+ enable_excel_export=True
434
+ )
435
+
436
+ print(uefa_past_matches_df)
437
+ ```
438
+
439
+ Parameters:
440
+
441
+ * `tournament_id` (int): The unique identifier for the tournament.
442
+ * `season_id` (int): The unique identifier for the season.
443
+ * `week_number` (int): The matchweek number within the season. The applicable week numbers depend on the tournament and stage, as outlined below for the 2024/25 season:
444
+ * UCL, UEL, UECL, and UNL:
445
+ * `qualification_round`: 1, 2, 3
446
+ * `qualification_playoff`: 636
447
+ * `group_stage_week`: 1, 2, 3, ..., 8 (for UNL, up to 6)
448
+ * `playoff_round`: 636
449
+ * `round_of_16`: 5
450
+ * `quarterfinals`: 27
451
+ * `semifinals`: 28
452
+ * `final`: 29
453
+ * Domestic Leagues:
454
+ * Use the corresponding matchweek number (e.g., for the 10th week of the season, enter `week_number=10`).
455
+ * `tournament_type` (str, optional): The tournament type (`uefa`). If `None`, assumes league format.
456
+ * `tournament_stage` (str, optional): The specific stage of the tournament. Available options for UEFA tournaments:
457
+ * `preliminary_final`
458
+ * `preliminary_final`
459
+ * `qualification_round`
460
+ * `qualification_playoff`
461
+ * `group_stage_week`
462
+ * `playoff_round`
463
+ * `round_of_16`
464
+ * `quarterfinals`
465
+ * `semifinals`
466
+ * `match_for_3rd_place`
467
+ * `final`
468
+ * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
469
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
470
+ * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
471
+ * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
472
+
473
+ Data Structure:
474
+
475
+ The returned DataFrame includes the following columns:
476
+
477
+ * `country`: The country where the tournament is held.
478
+ * `tournament`: The name of the tournament.
479
+ * `season`: The season year.
480
+ * `week`: The matchweek number.
481
+ * `game_id`: The unique identifier for the match.
482
+ * `home_team`: The name of the home team.
483
+ * `home_team_id`: The unique identifier for the home team.
484
+ * `away_team`: The name of the away team.
485
+ * `away_team_id`: The unique identifier for the away team.
486
+ * `injury_time_1`: Added injury time in the first half.
487
+ * `injury_time_2`: Added injury time in the second half.
488
+ * `start_timestamp`: The start time of the match.
489
+ * `status`: The current status of the match.
490
+ * `home_score_current`: The latest recorded score for the home team.
491
+ * `home_score_display`: The displayed score of the home team.
492
+ * `home_score_period1`: The home team's score at the end of the first half.
493
+ * `home_score_period2`: The home team's goals scored in the second half.
494
+ * `home_score_normaltime`: The home team's final score at the end of normal time (90 minutes).
495
+ * `away_score_current`: The latest recorded score for the away team.
496
+ * `away_score_display`: The displayed score of the away team.
497
+ * `away_score_period1`: The away team's score at the end of the first half.
498
+ * `away_score_period2`: The away team's goals scored in the second half.
499
+ * `away_score_normaltime`: The away team's final score at the end of normal time (90 minutes).
500
+
501
+ Dependencies:
502
+
503
+ * No prior function dependency required.
504
+
346
505
  ### Player Data
347
506
 
348
507
  #### `lineups_data`
349
508
 
350
- The `lineups_data` function fetches lineup data for each match in the provided match dataset. It returns a DataFrame containing lineup details such as country, tournament name, season, week number, game ID, team, player name, player ID, statistic name, and statistic value.
509
+ The `lineups_data` function fetches lineup data for each match in the provided match dataset.
351
510
 
352
511
  Example Usage:
353
512
 
354
513
  ```python
355
- # Fetch lineups data based on match data
356
514
  lineups_df = lineups_data(
357
515
  match_df=match_df,
358
516
  data_source="sofascore",
@@ -361,13 +519,22 @@ lineups_df = lineups_data(
361
519
  )
362
520
 
363
521
  print(lineups_df)
522
+
523
+ uefa_lineups_df = lineups_data(
524
+ match_df=uefa_match_df,
525
+ data_source="sofascore",
526
+ enable_json_export=True,
527
+ enable_excel_export=True
528
+ )
529
+
530
+ print(uefa_lineups_df)
364
531
  ```
365
532
 
366
533
  Parameters:
367
534
 
368
535
  * `match_df` (pd.DataFrame): A DataFrame containing match metadata, which should be generated by the `match_data` function.
369
536
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
370
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
537
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
371
538
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
372
539
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
373
540
 
@@ -392,12 +559,11 @@ Dependencies:
392
559
 
393
560
  #### `coordinates_data`
394
561
 
395
- The `coordinates_data` function fetches coordinate data for each player in the provided lineup dataset. It returns a DataFrame containing coordinate details such as country, tournament name, season, week number, game ID, team, player ID, player name, and x-y coordinates.
562
+ The `coordinates_data` function fetches coordinate data for each player in the provided lineup dataset.
396
563
 
397
564
  Example Usage:
398
565
 
399
566
  ```python
400
- # Fetch coordinates data
401
567
  coordinates_df = coordinates_data(
402
568
  lineups_df=lineups_df,
403
569
  data_source="sofascore",
@@ -406,13 +572,22 @@ coordinates_df = coordinates_data(
406
572
  )
407
573
 
408
574
  print(coordinates_df)
575
+
576
+ uefa_coordinates_df = coordinates_data(
577
+ lineups_df=uefa_lineups_df,
578
+ data_source="sofascore",
579
+ enable_json_export=True,
580
+ enable_excel_export=True
581
+ )
582
+
583
+ print(uefa_coordinates_df)
409
584
  ```
410
585
 
411
586
  Parameters:
412
587
 
413
588
  * `lineups_df` (pd.DataFrame): A DataFrame containing player and match metadata, which should be generated by the `lineups_data` function.
414
589
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
415
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
590
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
416
591
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
417
592
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
418
593
 
@@ -437,12 +612,11 @@ Dependencies:
437
612
 
438
613
  #### `substitutions_data`
439
614
 
440
- The `substitutions_data` function fetches substitution data for each match in the provided match dataset. It returns a DataFrame containing details of player substitutions, including the players involved and the time of the substitution.
615
+ The `substitutions_data` function fetches substitution data for each match in the provided match dataset.
441
616
 
442
617
  Example Usage:
443
618
 
444
619
  ```python
445
- # Fetch substitution data
446
620
  substitutions_df = substitutions_data(
447
621
  match_df=match_df,
448
622
  data_source="sofascore",
@@ -451,13 +625,22 @@ substitutions_df = substitutions_data(
451
625
  )
452
626
 
453
627
  print(substitutions_df)
628
+
629
+ uefa_substitutions_df = substitutions_data(
630
+ match_df=uefa_match_df,
631
+ data_source="sofascore",
632
+ enable_json_export=True,
633
+ enable_excel_export=True
634
+ )
635
+
636
+ print(uefa_substitutions_df)
454
637
  ```
455
638
 
456
639
  Parameters:
457
640
 
458
641
  * `match_df` (pd.DataFrame): A DataFrame containing match metadata, which should be generated by the `match_data` function.
459
642
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
460
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
643
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
461
644
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
462
645
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
463
646
 
@@ -484,12 +667,11 @@ Dependencies:
484
667
 
485
668
  #### `goal_networks_data`
486
669
 
487
- The `goal_networks_data` function fetches goal network data for each match in the provided match dataset. It returns a DataFrame containing goal-related events, including passing networks and shot locations.
670
+ The `goal_networks_data` function fetches goal network data for each match in the provided match dataset.
488
671
 
489
672
  Example Usage:
490
673
 
491
674
  ```python
492
- # Fetch goal networks data
493
675
  goal_networks_df = goal_networks_data(
494
676
  match_df=match_df,
495
677
  data_source="sofascore",
@@ -498,13 +680,22 @@ goal_networks_df = goal_networks_data(
498
680
  )
499
681
 
500
682
  print(goal_networks_df)
683
+
684
+ uefa_goal_networks_df = goal_networks_data(
685
+ match_df=uefa_match_df,
686
+ data_source="sofascore",
687
+ enable_json_export=True,
688
+ enable_excel_export=True
689
+ )
690
+
691
+ print(uefa_goal_networks_df)
501
692
  ```
502
693
 
503
694
  Parameters:
504
695
 
505
696
  * `match_df` (pd.DataFrame): A DataFrame containing match metadata, which should be generated by the `match_data` function.
506
697
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
507
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
698
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
508
699
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
509
700
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
510
701
 
@@ -541,12 +732,11 @@ Dependencies:
541
732
 
542
733
  #### `shots_data`
543
734
 
544
- The `shots_data` function fetches shot data for each match in the provided match dataset. It returns a DataFrame containing detailed shot-related information, including player coordinates, xG values, shot types, and goal mouth locations.
735
+ The `shots_data` function fetches shot data for each match in the provided match dataset.
545
736
 
546
737
  Example Usage:
547
738
 
548
739
  ```python
549
- # Fetch shot data
550
740
  shots_df = shots_data(
551
741
  match_df=match_df,
552
742
  data_source="sofascore",
@@ -555,13 +745,22 @@ shots_df = shots_data(
555
745
  )
556
746
 
557
747
  print(shots_df)
748
+
749
+ uefa_shots_df = shots_data(
750
+ match_df=uefa_match_df,
751
+ data_source="sofascore",
752
+ enable_json_export=True,
753
+ enable_excel_export=True
754
+ )
755
+
756
+ print(uefa_shots_df)
558
757
  ```
559
758
 
560
759
  Parameters:
561
760
 
562
761
  * `match_df` (pd.DataFrame): A DataFrame containing match metadata, which should be generated by the `match_data` function.
563
762
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
564
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
763
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
565
764
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
566
765
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
567
766
 
@@ -608,12 +807,11 @@ Dependencies:
608
807
 
609
808
  #### `standings_data`
610
809
 
611
- The `standings_data` function fetches league standings for a specific tournament and season. It returns a DataFrame containing team rankings, match results, and points.
810
+ The `standings_data` function fetches league standings for a specific tournament and season.
612
811
 
613
812
  Example Usage:
614
813
 
615
814
  ```python
616
- # Fetch league standings
617
815
  standings_df = standings_data(
618
816
  tournament_id=52,
619
817
  season_id=63814,
@@ -623,6 +821,16 @@ standings_df = standings_data(
623
821
  )
624
822
 
625
823
  print(standings_df)
824
+
825
+ uefa_standings_df = standings_data(
826
+ tournament_id=7,
827
+ season_id=61644,
828
+ data_source="sofascore",
829
+ enable_json_export=True,
830
+ enable_excel_export=True
831
+ )
832
+
833
+ print(uefa_standings_df)
626
834
  ```
627
835
 
628
836
  Parameters:
@@ -630,7 +838,7 @@ Parameters:
630
838
  * `tournament_id` (int): The unique identifier for the tournament.
631
839
  * `season_id` (int): The unique identifier for the season.
632
840
  * `data_source` (str): The data source (`sofavpn` or `sofascore`). Defaults to `sofascore`.
633
- * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to 10.
841
+ * `element_load_timeout` (int): The maximum time (in seconds) to wait for the API response. Defaults to `10`.
634
842
  * `enable_json_export` (bool): If `True`, exports the fetched data as a JSON file. Defaults to `False`.
635
843
  * `enable_excel_export` (bool): If `True`, exports the fetched data as an Excel file. Defaults to `False`.
636
844
 
@@ -658,6 +866,13 @@ Dependencies:
658
866
 
659
867
  ## Changelog
660
868
 
869
+ * v1.4.0
870
+ * Added `tournament_type` and `tournament_stage` parameters to `match_data` and `past_matches_data` functions.
871
+ * Extended support for UEFA tournaments, including UEFA Champions League (UCL), UEFA Europa League (UEL), UEFA Europa Conference League (UECL), and UEFA Nations League (UNL), allowing seamless data fetching across multiple competitions.
872
+
873
+ * v1.3.0
874
+ * Added `past_matches_data` function to fetch historical match data.
875
+
661
876
  * v1.2.0
662
877
  * Added match score columns to `match_data`
663
878