This package is the result of the Mastering Software Developmentin R Capstone project. This course proposed by Johns Hopkins University was created adn taught by Roger D. Peng and Brooke Anderson of
This project is centered around a dataset obtained from the U.S. National Oceanographic and Atmospheric Administration (NOAA). Source: National Geophysical Data Center / World Data Service (NGDC/WDS); Significant Earthquake Database; NOAA. doi:10.7289/V5TD9V7K. This dataset is focussed on significant earthquakes around the world and contains information about 5,933 earthquakes over an approximately 4,000 year time span.
The goal of NOAAsignifEarthQuakes is to:
library(NOAAsignifEarthQuakes)
library(magrittr)
## set the file input
file_noaa <- system.file("extdata","signif.txt",
package="NOAAsignifEarthQuakes",
mustWork=TRUE)
## Read and clean data
noaa <- load_NOAA_db(file_noaa) %>% eq_clean_data()
knitr::kable(tail(noaa))
| DATE | COUNTRY | LOCATION_NAME | LONGITUDE | LATITUDE | DEATHS | MAG | | :--------- | :-------- | :------------------- | --------: | -------: | -----: | --: | | 2018-09-08 | CHINA | Mojiang Hani | 101.552 | 23.332 | NA | 5.6 | | 2018-09-12 | INDIA | West Bengal | 90.165 | 26.374 | 1 | 5.3 | | 2018-09-28 | INDONESIA | Sulawesi | 119.840 | -0.178 | 2256 | 7.5 | | 2018-10-07 | HAITI | Port-Dex-Paix | -72.975 | 20.041 | 18 | 5.9 | | 2018-10-10 | INDONESIA | Madura Island, Java | 114.453 | -7.456 | 4 | 6.0 | | 2018-10-25 | GREECE | Zakynthos, Strofades | 20.563 | 37.506 | NA | 6.8 |
geom_timeline(noaa,
mapping=ggplot2::aes(size=MAG,fill=DEATHS),
countries='USA',
xmin='2000-01-01',
xmax='2017-01-01')
g <- geom_timeline(noaa,
mapping=ggplot2::aes(size=MAG,fill=DEATHS,y=COUNTRY),
countries=c('USA','China'),
xmin='2000-01-01',
xmax='2017-01-01')
g + geom_timeline_label()
filt_noaa <- noaa %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000)
m <- eq_map(filt_noaa,annot_col = "popup_text")
The map is fully interactive, for documentation purposes we show the following static version.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.