Description Usage Arguments Value Examples
View source: R/data_cleaning.R
Takes the output from eq_read_data
, but will work on any data from with LOCATION column. Creates COUNTRY and REGION columns by splitting input from the LOCATION column which should contain strings of the form "COUNTRY: REGION"
(e.g. "JAPAN:TOKYO"
).
1 |
data |
a dataframe or tibble with a LOCATION column |
dataframe
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# Retrieve all earthquake data for Japan since 2000
data <- eq_read_data() %>%
filter(COUNTRY == "JAPAN", YEAR >= 2000) %>%
dplyr::filter(!is.na(TOTAL_DEATHS)) %>%
dplyr::select(DATE, YEAR, COUNTRY, REGION, LONGITUDE, LATITUDE, MAG, TOTAL_DEATHS) %>%
tidyr::drop_na()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.