String parsing helper to cleanup player names for continuity.
Details
The function replace_player_names
reads a dataframe that includes player
names and uses str_replace
to clean up names. This can be used across the
package when joining data such that all player names are the same.
The function strips names of suffixes like Jr., Sr., II, III. Also, the
first names that are abbreviations like D.J. Moore and D.K. Metcalf have
the periods stripped from the initials. All other player names are
specified to say the same. Some specific cases are defined explicitly.