Description Usage Arguments Details Value Examples
This function manipulates and cleans the earthquake data from the U.S. National Oceanographic and Atmospheric Administration (NOAA) on significant earthquakes around the world. This dataset contains information about 5,933 earthquakes over an approximately 4,000 year time span, and is avaialable at the URL: https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1
1 | eq_clean_data(data_raw)
|
data_raw |
The raw NOAA data frame to be cleaned. |
The function reads the raw NOAA data and returns a clean data frame. The clean data frame has the following:
1. A date column created by uniting the year, month, day and converting it to the Date class, 2. LATITUDE and LONGITUDE columns converted to numeric class, 3. A LOCATION_NAME column which has been cleaned by stripping out the country name (including the colon) and converting the names to title case (as opposed to all caps).
This function returns a data.frame containing the cleaned NOAA earthquake data. A DATE column is created by uniting the year, month and day columns and converting the result to the Date class. LATITUDE and LONGITUDE columns are converted to numeric class and the LOCATION_NAME column has been cleaned by stripping out the country name (including the colon) and converting the names to title case (as opposed to all caps).
1 | ## Not run: eq_clean_data(earthquake_raw_df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.