This function takes the raw NOAA data and cleans it as per the requirements from Coursera: 1) Creates a date column by uniting the year, month, day and converting it to the Date class. 2) The LATITUDE and LONGITUDE columns are converted to a numeric class. 3) A function eq_location_clean() is applied that cleans the LOCATION_NAME column. We have also cleared any years that are negative as these create issues with as.Date.
A dataframe of raw NOAA data
Returns a cleaned dataframe
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.