nflscrapR  by maksimhorowitz

R package for scraping and aggregating NFL data

created 9 years ago
535 stars

Top 59.0% on SourcePulse

GitHubView on GitHub
Project Summary

This R package provides tools for scraping and analyzing National Football League (NFL) data, targeting R users and football analytics enthusiasts. It enables granular play-by-play analysis of games and seasons, facilitating the development of advanced metrics and community growth.

How It Works

The package leverages R's data manipulation capabilities, integrating with libraries like XML, RCurl, and tidyverse. It scrapes play-by-play data directly from NFL APIs, parsing it into a structured format. This allows for detailed game analysis, including the calculation of win probability and expected points, visualized through custom plots.

Quick Start & Requirements

  • Install using devtools::install_github("maksimhorowitz/nflscrapR") or devtools::install_github("ryurko/nflscrapR").
  • Requires R, devtools, XML, RCurl, bitops, nnet, magrittr, tidyverse, pander, and teamcolors.
  • Data is available for seasons after 2009.

Highlighted Details

  • Functions for scraping game IDs (scrape_game_ids) and play-by-play data (scrape_json_play_by_play, scrape_season_play_by_play).
  • Includes built-in models for expected points and win probability.
  • Facilitates visualization of game dynamics, such as win probability charts.
  • Supports analysis at play, game, and season levels.

Maintenance & Community

The repository lists two primary contributors: maksimhorowitz and ryurko. Further community engagement channels are not explicitly mentioned in the README.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Data is only available for seasons after 2009. Scraping an entire season's data using scrape_season_play_by_play can be time-consuming. The README does not mention any specific limitations regarding API rate limits or data availability changes.

Health Check
Last commit

5 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.