eq_clean_data: Creates the earthquakes' date of occurrence and prepares some...

Description Usage Arguments Value Notes See Also Examples

Description

eq_clean_data processes the following variables in the NOAA's raw database in order to create the date of each reported earthquake: YEAR, MONTH, and DAY. So too, it transforms to numeric the variables with the latitude (LATITUDE), longitude (LONGITUDE), magnitude (EQ_PRIMARY), and total deaths (TOTAL_DEATHS) to make easier the data analysis.

Usage

1

Arguments

data

A data frame or tibble object with the information about the earthquakes' occurrence: YEAR, MONTH, and DAY. In addition, the dataset must have the variables with the quakes' latitude, longitude, magnitude, and total deaths.

Value

Returns a tibble object with the quake's date (the DATE variable) and changes to numeric type the variables described above.

Notes

One of the benefits of using this function is that it converts dates B.C.E. into the Date class; futhermore, when the month or/and day is/are missing, the date is approximated at the midpoint of the period.

See Also

eq_location_clean for process the location name variable.

Examples

1
2
raw_data <- download_earthquake_data()
clean_data <- eq_clean_data(raw_data)

Cesar-Urteaga/rnoaa documentation built on May 10, 2019, 5:16 a.m.