nflreadrs 0.2.0

Crate to pull data from nflverse's NFL database.
Documentation

Nflreadrs

Crates.io Version License Docs.rs

[!NOTE] This crate is not yet fully functional!

Nflreadrs is a port of nflverse's nflreadpy (Python) and nflreadr (R) libraries to the Rust programming language. Other than liking their work, I am not affiliated with them in any way, shape or form.

Installation

Use cargo to add the crate to your project.

cargo add nflreadrs

Quick Start

This is a simple setup to download team stats of the current season. The resulting data will be a Polars DataFrame.

use nflreadrs::downloader::pull;
use nflreadrs::stats::{SummaryLevel, TeamStats};

fn main() {
    // Download settings
    let teams_stats_dl = TeamStats::new(None, SummaryLevel::Week);

    let data = pull(&teams_stats_dl);
}

Major TODOs

  • Improve errors with thiserror
  • Support for parquet
  • Caching/using already downloaded files when feasible