eq_clean_data: Clean raw earthquake data

Description Usage Arguments Value Examples

View source: R/clean_data.r

Description

Cleans raw data by creating a date column with year, month and day in one date, converting LATITUDE and LONGITUDE columns to numeric and cleaning the LOCATION_NAME column with the eq_location_clean() function. Negative years have been removed.

Usage

1
eq_clean_data(df_raw)

Arguments

df_raw

dataframe of raw NOAA data

Value

Returns a cleaned version of df_raw

Examples

1
2
3
4
5
6
7
## Not run: 
  df <- load_data() %>% dplyr::filter(YEAR >= 0) %>%
       dplyr::mutate(date = get_date(DAY, MONTH, YEAR))
  print(class(df))
  head(df)

## End(Not run)

lakrobinson/noaar2 documentation built on Dec. 1, 2020, 9:35 p.m.