eq_location_clean: Clean location name of NOAA earthquake data

Description Usage Arguments Value Note Examples

View source: R/data_preparation.R

Description

The NOAA significant earthquake data has some excess information in the column LOCATION_NAME concerning the country of the earthquake. This function removes the country from the location name leaving only the location itself.

Usage

1

Arguments

data

a dataframe with raw data from the significant earthquake database

Value

returns a dataframe where the contents of the column LOCATION_NAME have been stripped of the country name

Note

In some rare cases the LOCATION_NAME column has more than one country and location. This function will keep only the last location that is present in the column. It removes all information before the last colon (:).

Examples

1
2
3
4
5
6
## Not run: 

clean_data <- eq_clean_data(get_eq_data())
clean_data_location <- eq_location_clean(clean_data)

## End(Not run)

RedTent/earthquakeJT documentation built on May 25, 2019, 1:25 p.m.