eq_location_clean: Cleans the LOCATION_NAME column in NOAA earthquake data

Description Usage Arguments Details Value Examples

Description

This function cleans the LOCATION_NAME column by removing the COUNTRY at the beginning of the string. The function also converts the location names to title case for display purposes.

Usage

1
eq_location_clean(eq_cleanup)

Arguments

eq_cleanup

The dataframe with the NOAA data that has some modified columns.

Details

This function is called from the eq_clean_data function.

Value

This function returns the earthquake data with a cleaned LOCATION_NAME column in a tbl_df object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
Recommended:
filename<-system.file("extdata","earthquakes_data.txt.gz",package="earthquakesViz")
readr::read_delim(filename, delim = "\t") %>%
eq_clean_data()

To clean just the LOCATION_NAME column:
filename<-system.file("extdata","earthquakes_data.txt.gz",package="earthquakesViz")
readr::read_delim(filename, delim = "\t") %>%
eq_location_clean()

## End(Not run)

leigitcode/earthquakesViz documentation built on May 7, 2019, 11:14 a.m.