eq_clean_data: Clean Earthquakes NOAA dataset

Description Usage Arguments Value Examples

Description

This function clean the input data by cpnverting it into a data frame, bluid a new variable representing the date of the earthquake, assure relevant variables are numeric (LATITUDE, LONGITUDE, EQ_PRIMARY, DEATHS), and finally clean the LOCATION_NAME by calling the eq_location_clean function. If any of those variables is not present, the function stops and return an error message.

Usage

1

Arguments

raw

a data frame or matrix containing the information about earthquakes. Must contain the following columns: YEAR, MONTH, DAY, LATITUDE, LONGITUDE, EQ_PRIMARY, DEATHS.

Value

a data frame with cleaned data

Examples

1
2
3
4
## Not run: 
data <- eq_clean_data(raw_data)

## End(Not run)

frenkg/coursera.eq documentation built on May 12, 2019, 1:04 p.m.