Skip to contents

String parsing helper to cleanup team abbreviations for continuity.

Usage

replace_team_names(df)

Arguments

df

Dataframe with team column to clean up abbreviations

Value

Dataframe with cleaned up team abbreviations

Details

The function team_player_names reads a dataframe that includes team names as team and uses str_replace to replace the team abbreviation. This can be used across the package when joining data such that all team names are the same. Team specific cases are defined explicitly, to alleviate the issue of some data differences. For example, nflreadr roster data lists the Los Angeles Rams as LA, while nflfastR play-by-play data lists the abbreviation as LAR.

Author

Nolan MacDonald