eq_clean_data: Clean NOAA Earthquake Data

Description Usage Arguments Details Value Note Examples

View source: R/eqvis.R

Description

This function cleans an NOAA earthquake significant earthquake data.frame.

Usage

1

Arguments

data

data.frame of NOAA significant earthquake dataset

Details

If MONTH or DAY are missing, 1 is used (January or 1st of month, respectively). The data.frame must include 'YEAR', 'MONTH', 'DAY', 'LATITUDE', and 'LONGITUDE' columns.

Value

Returns a cleaned data.frame. The country and colon are removed from the LOCATION_NAME and it is converted to title case. A new DATE column is derived from the date parts (YEAR, MONTH, DAY). LATITUDE and LONGITUDE are converted to numeric.

Note

The NOAA earthquake dataset can be accessed at: https://www.ngdc.noaa.gov/nndc/struts/results?type_0=Exact&query_0=$ID&t=101650&s=13&d=189&dfn=signif.txt. This dataset contains information about 5,933 earthquakes around the world over an approximately 4,000 year time span. This package was developed to work with positive years (A.D.) only.

Examples

1
## Not run: eq_clean_data(sample_eq)

kaquilino/eqvis documentation built on May 17, 2019, 2:44 p.m.