eq_location_clean: Cleans the LOCATION_NAME column

Description Usage Arguments Value Examples

View source: R/clean_data.R

Description

As per the instructions on Coursera: write a function eq_location_clean() that cleans the LOCATION_NAME column by stripping out the country name (including the colon) and converts names to title case (as opposed to all caps). This will be needed later for annotating visualizations.

Usage

1

Arguments

df

a dataframe containing a column LOCATION_NAME that will be cleaned

Value

Returns a cleaned dataframe as described

Examples

1
2
3
4
5
6
## Not run: 
  df <- load_data() %>% eq_location_clean()
  print(class(df))
  head(df)

## End(Not run)

simongarisch/R-Capstone-NOAA documentation built on Dec. 23, 2017, 10:28 a.m.