ESPN
[1]:
import sys
sys.path.append("../")
from penaltyblog.scrapers import ESPN
List the available countries to download data for
[2]:
ESPN.list_competitions()
[2]:
['ENG Premier League', 'ENG Championship']
Download the data for the English Premier League
[3]:
espn = ESPN("ENG Premier League", "2019-2020")
df = espn.get_fixtures()
df.head()
[3]:
espn_id | datetime | attendance | team_home | team_away | goals_home | goals_away | appearances_home | fouls_committed_home | won_corners_home | ... | appearances_away | fouls_committed_away | won_corners_away | goal_assists_away | possession_pct_away | shot_assists_away | shots_on_target_away | total_goals_away | total_shots_away | date | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
competition | season | id | |||||||||||||||||||||
ENG Premier League | 2019-2020 | 1565308800---liverpool---norwich_city | 541844 | 2019-08-09 19:00:00+00:00 | 53333 | Liverpool | Norwich City | 4 | 1 | 0 | 9 | 11 | ... | 0 | 9 | 2 | 1 | 42.1 | 10 | 5 | 1 | 12 | 2019-08-09 |
1565395200---afc_bournemouth---sheffield_united | 541840 | 2019-08-10 14:00:00+00:00 | 10714 | AFC Bournemouth | Sheffield United | 1 | 1 | 0 | 10 | 3 | ... | 0 | 19 | 4 | 0 | 47.1 | 5 | 3 | 1 | 8 | 2019-08-10 | ||
1565395200---burnley---southampton | 541841 | 2019-08-10 14:00:00+00:00 | 19784 | Burnley | Southampton | 3 | 0 | 0 | 6 | 2 | ... | 0 | 12 | 7 | 0 | 53.5 | 5 | 3 | 0 | 11 | 2019-08-10 | ||
1565395200---crystal_palace---everton | 541839 | 2019-08-10 14:00:00+00:00 | 25151 | Crystal Palace | Everton | 0 | 0 | 0 | 16 | 6 | ... | 0 | 14 | 2 | 0 | 64.6 | 7 | 3 | 0 | 10 | 2019-08-10 | ||
1565395200---tottenham_hotspur---aston_villa | 541837 | 2019-08-10 16:30:00+00:00 | 60407 | Tottenham Hotspur | Aston Villa | 3 | 1 | 0 | 13 | 14 | ... | 0 | 9 | 0 | 1 | 29.9 | 7 | 4 | 1 | 7 | 2019-08-10 |
5 rows × 26 columns
[ ]: