Can I track an individual player's Corsi using the NHL's API?

Madap

Registered User
May 24, 2019
865
1,246
Toronto, ON, Canada
I want to improve my Python skills so I'm trying to reproduce common stats using the NHL API. They have a play-by-play for each game which keeps tracks of shot attempts, but I don't see how to keep track of who's on the ice at that time.

Is it possible to calculate Corsi for an individual player using the API, or by some other resource? Or is it typically something that's tracked manually throughout the game and just posted online by the NHL or some other stats website?
 
  • Like
Reactions: Bear of Bad News

Madap

Registered User
May 24, 2019
865
1,246
Toronto, ON, Canada
I’d have to take a look at their API, however in the case they don’t have it, you can use the full game log:

Play By Play

You can use the library beautifulsoup in Python to scrape it.
Awesome, thanks for showing me this. I wonder if I'm missing something as well on the API which shows who's on the ice, since they clearly keep track of that data. But yeah, this is pretty much exactly what I need, so thanks again.
 

Ad

Upcoming events

Ad

Ad