knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

Introduction to NOAAeq

Travis-CI Build Status

The NOAAeq package analyses data from the Significant Earthquake Database of the U.S. National Oceanographic and Atmospheric Administration (NOAA). This dataset contains information about 5,933 earthquakes over an approximately 4,000 year time span.

The package has 3 main functionalities:

Timelines

Here is an example of a timeline plot for the USA, covering the recent period 2000-2017.

require("knitr")
require("NOAAeq")
require("magrittr")
opts_knit$set(root.dir = system.file("extdata", package = "NOAAeq"))
data <- readr::read_delim(file = "earthquakes.tsv.gz", delim = "\t")
data %>%
 eq_clean_data() %>%
 dplyr::filter(lubridate::year(DATE) %in% 2000:2017 & COUNTRY == "USA") %>%
 ggplot(aes(x = DATE, size = EQ_PRIMARY, fill = TOTAL_DEATHS)) +
 geom_timeline() +
 theme_classic() +
 theme(legend.position = "bottom") +
 scale_size_continuous(name = "Richter scale value") +
 scale_fill_continuous(name = "# deaths") +
 guides(size = guide_legend(order = 1),
        fill = guide_colourbar(order = 2))


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