knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
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))
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.
map_png <- "README-map_mexico-1.png" mapview::mapshot(m, file = map_png) knitr::include_graphics(map_png)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.