This concludes my article on using Javascript to fetch stats from the hockey Gods. I have also built this little web app showing example API calls and the data returned. When it comes to playing your way, Windows 11 makes it happen. My example uses React, Redux, and the Axios library and can be used as a starting off point for your own NHL stats related project. Play the latest games with graphics that rival reality. I have created a Github repository with the example code I used to write this article and it can be viewed here. There are a myriad of cool projects a developer can pursue with this data including comparing team or players stats in a web app, data visualization with D3.js, or even diving deeper into hockey statistics by using the data from the API to calculate more complex stats such as Corsi stats. The NHL does a terrible job when it comes to documentation, but the API is active and contains up-to-date data on any player in the league. The easiest way to find any player's stats is to walk your way through the team and roster endpoints, retrieve the id and link for that particular player, and then use the people query or the stats query to send a request for his information and stats. Due to lack of documentation on the NHL's part it can be a little tedious finding and retrieving a player's stats from the API. We have successfully retrieved Mika Zibanejad's information as well as his individual stats from the 2018-2019 year.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |