eq_location_clean: Clean earthquake locations

Description Usage Arguments Value Examples

View source: R/eq_location_clean.R

Description

eq_location_clean cleans the strings in the LOCATION_NAME column of the supplied NOAA data.frame. eq_location_clean stripps out the country name, including the colon, and converts names to title case, as opposed to all caps.

Usage

1
eq_location_clean(locations)

Arguments

locations

is a character vector of locations. Each vector element should have the "GREECE: THERA ISLAND (SANTORINI)" format.

Value

a character vector of cleaned names with country removed and in title case.

Examples

1
2
3
4
5
6
7
library(data.table)
library(magrittr)
library(quake)

data_file_name <- system.file("extdata", "earthquakes.tsv", package = "quake")
clean_data     <- fread(data_file_name) %>% eq_clean_data
clean_data

RussellPolitzky/quake documentation built on May 23, 2019, 10:35 p.m.