knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

noaa

R-CMD-check Travis build status

The goal of noaa is to visualize earthquake data obtained from U.S. National Oceanographic and Atmospheric Administration (NOAA): Earthquake Database. NOAA National Centers for Environmental Information. doi:10.7289/V5TD9V7K

Installation

You can install the development version of noaa from GitHub with:

# install.packages("devtools")
devtools::install_github("philippB-on-git/noaa")

Example

The package provides functionality to read, clean and visualize noaa data:

library(dplyr)
library(noaa)

noaa_data <- system.file("extdata", "noaa_earthquakes.tsv", package = "noaa") %>%
    eq_read_data %>%
    eq_clean_data %>%
    filter(COUNTRY %in% c("MEXICO", "JAPAN") & YEAR > 1800)

timeline <- noaa_data %>%
    plot_eq_timeline(label = NULL)

timeline +
    geom_timeline_label(data = noaa_data, mapping = ggplot2::aes(y = COUNTRY, label = LOCATION_NAME), n_max = 3)

Mapping of earthquake locations on maps:

noaa_data %>%
    mutate(info_text = eq_create_label(.)) %>%
    eq_map(annot_col = "info_text")

eq_map example



philippB-on-git/noaa documentation built on Dec. 22, 2021, 7:49 a.m.