eq_clean_data: Clean and Format NOAA Data

Description Usage Arguments Details Value Examples

View source: R/prep_data.R

Description

This function takes a dataframe and drops date related NAs, converts data types to appropriate type, removes pre-BC dates due to low information, fixes date parts that do not fit conventionall format, and returns a cleaned dataframe.

Usage

1

Arguments

df

The raw dataframe with at least Year, Month, Day, Country, Location_Name, Latitude, Longitiude, EQ_Primary, and TOtal Death fields

Details

Takes a dataframe of earthquake information and drops date realted NAs, changes the date parts to integers, filters for post-BC dates, fixes dates components to YYYY-MM-DD format, combines date parts into a DATE field, and changes remaing fields to proper type.

Value

Returns a tbl_df date.frame

Examples

1
## Not run: eq_clean_data(df= data)

ctaber/NOAA documentation built on Nov. 4, 2019, 9:19 a.m.