Description Usage Arguments Value Examples
View source: R/eq_location_clean.R
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. This function should be applied to the raw data to produce a cleaned up version of
the (LOCATION_NAME
) column.
1 | eq_location_clean(eq_datf)
|
eq_datf |
the raw NOAA earthquake dataset as a data frame that contains location names written in upper case. |
returns a clean data frame of the NOAA earthquake dataset.
1 2 3 4 5 6 7 8 9 | ## Not run:
filename <- system.file("extdata", "signif.txt", package = "earthquakes")
library(readr)
eq_data_raw <- readr::read_delim(file = filename, delim = "\t")
eq_data <- eq_location_clean(eq_datf = eq_data_raw)
head(eq_data_raw$LOCATION_NAME)
head(eq_data$LOCATION_NAME)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.