Skip to content

A tidy data package for the Canadian Football League API

License

Notifications You must be signed in to change notification settings

andrewjdyck/tidyCFL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tidyCFL

A tidy data package for the Canadian Football League API

API info

An API key is required and can be requested here.

Documentation for the CFL API can be found here.

Config

set the API key with tidyCFL.api_key('YOUR API KEY')

Usage

library(tidyCFL)
library(dplyr)

tidyCFL.api_key('testK3Y')
games2016 <- cfl_games(2016)

# Order games by point spread
games2016 %>%
  mutate(point_diff = abs(away_score-home_score)) %>%
  arrange(desc(point_diff))


# Information for a single player. 
# Takes the CFL Player ID as an argument
player_id <- 138985
player1 <- cfl_players(player_id)

# Play by play
pbp <- cfl_plays(season = 2016, game_id = 2280)


About

A tidy data package for the Canadian Football League API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages