The 'eq_clean_data' function returns a cleaned NOAA data frame
- A delimited file that is read in by the 'read_delim' function
The eq_clean_data function correct the data type of the columns YEAR, MONTH, DAY, LATITUDE, LONGITUDE, DEATHS and EQ_PRIMARY. The columns YEAR, MONTH and DAY are gathered to form a date (an as.Date object). The missing dates are filtered out. The magnitude of the earthquakes are rounded up to 2, 4, 6, 8 and 10. The locations in the column LOCATION_NAME is extracted and adjusted to title case. The column COUNTRY is alsp adjusted to title case with the eq_location_clean fucntion.
A cleaned NOAA data frame
error - When the column names do not include YEAR, MONTH, DAY, LATITUDE, LONGITUDE, DEATHS, EQ_PRIMARY, LOCATION_NAME and COUNTRY, an error will be given.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.