Python Examples

profile pic

Data Access Tutorial

Learn how to connect to our API and get your environment setup.

View Data Access Tutorial
profile pic

Power Rankings

FiveThirtyEight publishes power rankings every week based on the Elo algorithm from chess. In this example, you'll see how to replicate 538's published Elo algorithm for power rankings and backtest its performance against the spread.

Power Rankings Tutorial

profile pic

DFS Lineup Optimizer

A workflow using our data and predictions to create daily fantasy lineups for Draft Kings, Fan Duel, and Yahoo.

This lineup optimizer allows you to generate lineups based on constraints such as having one of a set of players in each lineup. The lineup optimizer is useful for taking advantage of difficult to predict WR groups like the 2016 Washington Redskins.

Lineup Optimizer Tutorial

profile pic

Advanced Metrics

This notebook shows off our newly released drive and game info to create feautres based on weather, drives, and time of possession.

Advanced Metrics Tutorial

R and Excel Examples coming soon