nfelo is a power ranking, prediction, and betting model for the NFL. Nfelo take’s 538’s Elo framework and further adapts it for the NFL, hence the name nfelo (pronounced “NFL oh”).

The model’s output is visualized on where you can explore:

Repository Description

This repository contains all the code necessary to translate raw data into weekly predictions. This process has three main phases:

  1. Pull and scrape data from nflfastR, PFF, and various Vegas Line sites
  2. Compile data into a single dataset and run intermediate models (nfelo ratings and wepa)
  3. Translate power ratings and contextual game information into win and line expectations

Install and Use

nfelo is a python package. To install, simply download this repository into your site-packages folder and install the dependencies detailed in the requirements.txt file.

Because nfelo pulls from PFF, running the model requires you to access team grades that are behind a paywall (sorry!), and the PFF scraper does require you to copy your cookie into the config_private.json file. This cookie must be refreshed before each run.

Each phase of the build can be run individually, but to generate predictions, run the following script:

import nfelo

## update data ##

## format ##

## update models ##

## ouput spreads ##

This process will output a csv in the output_data folder called ‘predictions.csv’

Because this package is exclusively used as a workflow automation for building nfelo predictions each week, it’s not well suited for other uses and likely has some bugs if updates are run before every game for a given week has been completed. It does produce nfelo rankings, wepa results, and a few other datapoints, which can be found in various csvs within the folder hierarchy.


This package is built and maintained by @greerreNFL. Feel free to DM with comments and questions.

Version History

  • 0.1
    • Initial package release
    • Includes nfelo v3.0 and workflow automations to recreate weekly predictions
GitHub - greerreNFL/nfelo
Contribute to greerreNFL/nfelo development by creating an account on GitHub.