theme_time: Custom theme that makes the earthquake visualization prettier...

Description Usage Value Examples

View source: R/visualization_tools.R

Description

Custom theme that makes the earthquake visualization prettier and expands the plot margins to allow all text to fit inside the plot.

Usage

1

Value

A ggplot theme which can be applied to ggplot layers.

Examples

1
2
3
4
5
6
7
8
readr::read_delim(file = system.file("extdata", "signif.txt", package="noaa"), delim = "\t") %>%
eq_clean_data() %>%
dplyr::filter(YEAR >= 1900, !is.na(DEATHS), !is.na(EQ_MAG_ML),
              COUNTRY %in% c("CHINA", "USA")) %>%
ggplot2::ggplot(ggplot2::aes(x = DATE, y = COUNTRY, colour = DEATHS, size = EQ_MAG_ML)) +
theme_time() +
geom_timeline() +
ggplot2::labs(x = "DATE", color = "# deaths", size = "Richter scale value")

chrpihl/noaa documentation built on May 25, 2019, 3:26 p.m.