knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width=8, fig.height=5 )
The earthquakes
library allows users to-
eq_clean_data
and be returned date, city and numeric coordinatesYEAR
, MONTH
, DAY
(defaults NA to 1 for MONTH and DAY and excludes BCE events)LOCATION_NAME
value and format as Full Title Caselibrary(earthquakes) library(dplyr) data <- eq_clean_data(raw) summary(data[c('DATE','LONGITUDE','LATITUDE','LOCATION_CITY')]) head(data[,c('DATE','LONGITUDE','LATITUDE','LOCATION_CITY')])
eq_clean_data
passes COUNTRY
and LOCATION_NAME
like "ITALY: POMPEI"example_country <- "ITALY" example_location <- "ITALY: POMPEI" clean_location <- eq_location_clean(example_country, example_location) clean_location
test_g <- geom_timeline(data, "2000-01-01", "2018-01-01", "NEW ZEALAND") test_g
test_g <- geom_timeline_label(data, "2000-01-01", "2018-01-01", "NEW ZEALAND",7) test_g
test_m <- eq_clean_data(raw) %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) eq_map(test_m, "DATE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.