I've started my journey diving into football analytics and have created a sample python program that references https://understat.com/ to scrape single game shot data
- Import all necssary packages/modules
requests
,pandas
,BeautifulSoup
- Go to https://understat.com/ and go to any match that you want specific shot data for. Match URL should look like the following
https://understat.com/match/{match-id}
- Execute
data_scraping.py
and input the match-id
The program then scrapes the shot data from the match and converts each Home and Away's team data into a separate Data Frame. The Data Frame's are then export as separate CSV Files for reference.