jthomasmock / espnscrapeR

Scrapes Or Collects NFL Data From ESPN
https://jthomasmock.github.io/espnscrapeR/
Other
51 stars 10 forks source link

Wrong team in ESPN API? #1

Closed mrcaseb closed 4 years ago

mrcaseb commented 4 years ago

There are some team errors in the 2019 data. qbr in the below code looks like this: grafik

In this example it's week 4 but the teams are wrong for the whole season. I don't know if those are all or if there is more.

qbr <- get_nfl_qbr("2019", season_type = "Regular", week = 4) %>%
  group_by(team_short_name) %>% 
  filter(n()>1) %>%
  select(short_name, team_short_name) %>%
  arrange(team_short_name)
jthomasmock commented 4 years ago

Interesting! I wonder if the issue is that 2019 is being treated as the current season.

I'll work on adding in some manual logic, but my assumption is that this may "self-correct" after the start of the 2020 league season once 2019 becomes "historical". Off-season is messy as there is shared historical and current data.

mrcaseb commented 4 years ago

Sounds plausible. We'll see if this will correct itself. I leave it up to you to close the issue...

jthomasmock commented 4 years ago

Appreciate you sending it my way - I'll leave it open for now until I either add the logic or the season starts.

jthomasmock commented 4 years ago

Corrected this with latest release - unfortunately this requires a two-part process - accessing the API and scraping tables...