Data on attendance figures Big 4 US sports leagues from 2001-2019 (NBA, NFL, MLB, NHL).
All data scraped from ESPN. See 2018 for NHL NBA MLB NFL.
See attendance_scraper.r for scraping code.
Attendance figures can be found in the data/ folder, thereβs an excel doc for each league. Also of note, each excel contains a matrix that is comprised of a dataframe for each year i.e., itβs all horizontally stacked (due to some stupid openxlsx error). Because of this, thereβs a header row for each year (on top of a master header row). It ainβt the cleanest.
Season: year of season (Ex: 2000-2001)Rank: rank by attendanceTeam_Name: usually the city of the teamHome, Road and Overall
GMS: num gamesTOTAL: total attendance numAVG: average attendance per gamePCT: percent compacityAlso, data/champions_per_year.xlsx contains league champions from 2001-2019