Description Usage Arguments Value Examples
View source: R/data_cleaning.R
Reads in the raw data taken from the NCEI/WDS database. Expect tab-separated data with column names: Year, Mo, Dy, Hr, Mn, Sec, Tsu, Vol, and "Location Name". Renames some columns, drops some irrelevant columns and converts all column names to uppercase.
1 2 3 4 | eq_read_data(
filename = system.file("extdata", "earthquakes-2021-03-08_17-02-58_-0500.tsv",
package = "earthquakes")
)
|
filename |
a path to a file, a connection, or literal data (either a single string or a raw vector). |
dataframe
1 2 3 4 5 6 7 8 9 | ## Not run:
# Retrieve all earthquake data from 2020
data <- eq_read_data() %>%
dplyr::filter(YEAR == 2020) %>%
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.