eq_location_clean: LOCATION_NAME Column cleanup

Description Usage Arguments Value Examples

View source: R/capcode.R

Description

This function takes a data frame, ideally from the NOAA Significant Earthquakes dataset, and cleans the LOCATION_NAME column. Specifically, it deletes the name of the country, if there is one included in the string, leaving only the region name. It also changes the string into title case. This function is meant to be used in the geoms of this package, so it does not need to be exported.

Usage

1

Arguments

data

A data frame with a LOCATION_NAME column.

Value

A data frame with the LOCATION_NAME column changed. Specifically, it deletes the name of the country, if there is one included in the string, leaving only the region name. It also changes the string into title case.

Examples

1
2
3
## Not run: load("data/data.rda")
data<-eq_location_clean(data)
## End(Not run)

thechibo/earthquakes documentation built on April 15, 2020, 4:56 p.m.