String parsing helper to cleanup team abbreviations for continuity.
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.