ryurko / fcscrapR

R package to scrape soccer commentary and statistics from ESPN
28 stars 11 forks source link

Own Goals #1

Closed lbenz730 closed 6 years ago

lbenz730 commented 6 years ago

-Senegal own goal not displayed in game against Poland (all others are however). -The own goal from that game had shot_result = "goal" and shot_by_player = NA -I tried to remedy this by changing all events where shot_result = "goal" and shot_by_player = NA to "own_goal" but it appears there are a few other regular goals (10) which goal scorers aren't listed. -Such goals come from the following games:

ryurko commented 6 years ago

So the own goal in the Senegal vs Poland game is actually missing in the ESPN commentary. It's in the key events section though so I'll add a function to scrape that as well.

All other missing players for these games are there now, was driven by the Spanish spelling ESPN sometimes uses for whatever reason. The fix is to use the the "First Half ends" commentary line so if ESPN marks the team names differently than the top heading, it'll be fixed as long as half the game has been played. I might move into some matching algorithms to make this more robust. Such an annoying thing. Thanks for the catch though!