eq_clean_data: Clean data

Description Usage Arguments Value Examples

Description

This function unites temporal information in a DATE column, converts the spatial coordinates (LONGITUDE, LATITUDE), the earthquake magnitude (EQ_PRIMARY), and the number of deaths (TOTAL_DEATHS) to numeric, cleans the LOCATION_NAME by using the eq_location_clean function, and discards several columns not needed for the analysis of earthquakes in this package.

Usage

1

Arguments

raw

A data frame or tibble with the raw data. The country must be separated from the location name by a colon.

Value

A data frame or tibble with the cleaned data.

Examples

1
2
3
file <- system.file("extdata", "earthquakes.tsv.gz", package = "NOAAeq")
data <- readr::read_delim(file = file, delim = "\t")
eq_clean_data(data)

la-sch/NOAAeq documentation built on May 20, 2019, 7:31 p.m.