eq_location_clean: Takes the output from 'eq_read_data', but will work on any...

Description Usage Arguments Value Examples

View source: R/data_cleaning.R

Description

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").

Usage

1

Arguments

data

a dataframe or tibble with a LOCATION column

Value

dataframe

Examples

 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)

rsizem2/noaa-earthquakes documentation built on Dec. 22, 2021, 7:17 p.m.