The data was imported into R, but it was in a nested json format. This required code to be written to flatten the json in order to access the nested data which is seen below.
Unneeded columns such as multiple different formats for position were removed from the data frame as seen below..
Data was converted from character to the correct format such as numeric or factor data as seen below.
Missing Values for age were filled in because age could be calcul;ated for date of birth. Missing values in the current team were left because not all players are currently playing in the NHL, thus the rows should not be removed.
Date of birth was converting from a charactrer string to a date format.
The Data was exported