eq_clean_data: Create a data frame containing a cleaned version of the NOAA...

Description Usage Arguments Details Value Examples

Description

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

Usage

1
eq_clean_data(data_raw)

Arguments

data_raw

The raw NOAA data frame to be cleaned.

Details

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).

Value

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).

Examples

1
## Not run: eq_clean_data(earthquake_raw_df)

GustavoBruges/earthquakeR documentation built on May 17, 2019, 9:10 a.m.