import_punts: Import punting data

View source: R/import.R

import_puntsR Documentation

Import punting data

Description

Easily import punting data for completed seasons. This data has been pre-scraped and compiled here. The only cleaning performed on this data before storing is filter(play_type == 'punt').

Usage

import_punts(years, local = FALSE, path = NULL)

Arguments

years

A year or range of years between 1999 and 2020, inclusive

local

Defaults to 'FALSE'. If 'TRUE', must also specify the local path to the 'puntr-data' folder. Importing a local copy of the data is much faster (~3 seconds, vs ~15 minutes)

path

The local path to the 'puntr-data' folder. Required when 'local = TRUE'. Omit the trailing '/', e.g. '/Users/yourname/footballfolder'

Value

A tibble punts containing play-by-play punting data for the specified years

Examples

## Not run: 
import_punts(1999:2020)
import_punts(1999:2020, local=TRUE, path='/my/local/path')

## End(Not run)

Puntalytics/puntr documentation built on Sept. 7, 2024, 5:23 p.m.