# Sports data analysis through the ESPN API

**URL:** <https://talk.observablehq.com/t/sports-data-analysis-through-the-espn-api/7084>\
**Category:** Show and tell\
**Created:** [September 30, 2022, 3:59pm UTC](https://talk.observablehq.com/t/sports-data-analysis-through-the-espn-api/7084 "2022-09-30T15:59:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilipMathieu](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/philipmathieu/32/6981_2.png) [@PhilipMathieu](https://talk.observablehq.com/u/PhilipMathieu)\
**Post date:** [September 30, 2022, 3:59pm UTC](https://talk.observablehq.com/t/sports-data-analysis-through-the-espn-api/7084/1 "2022-09-30T15:59:10Z")

</div>

I created a notebook to calculate “magic numbers” (roughly, how many more games a team needs to win to guarantee they finish the season above another team) for the USA’s National Women’s Soccer League. My project was in part about providing numbers that I couldn’t seem to find on other websites, but also as a framework through which to explore the unofficial ESPN API and demonstrate how to use it within Observable notebooks. As someone who loves sports analytics but not building full-on webapps, this is already proving to be an extremely useful prototyping workflow.

> **[NWSL Magic Numbers](https://observablehq.com/@philipmathieu/nwsl-magic-numbers)**
>
> Using in-browser data scraping (see below for full implementation). Based on In-Browser Data Scraping and informed by the ESPN Hidden API Docs. What is a magic number? In sports, a magic number is the number of wins (or points, in soccer) that Team A...

Would love your feedback and thoughts!
