eq_clean_data: Function to clean earthquake data

Description Usage Arguments Value Note

View source: R/functions.R

Description

This function receives a data frame from The Significant Database Earthquake from NOAA (https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1) and return it with new treated columns ABS_DATE, DATE and LOCATION. Also, turn columns of LATITUDE and LONGITUDE to numeric.

Usage

1

Arguments

df

Data frame to be cleaned.

Value

The same data frame with columns ABS_DATE (char column to preserve BC years), DATE and LOCATION added plus LATITUDE, LONGITUDE, EQ_PRIMARY and DEATHS columns treated from char to integer class.

Note

Besides requirements, this function turns columns EQ_PRIMARY and DEATHS numeric, simplifying their use to aesthetic plots later on.


danielfsilva88/quakeTools documentation built on Sept. 13, 2020, 12:13 a.m.