geom_timeline: Timeline Plot for NOAA

Description Usage Arguments Examples

Description

This function create Timeline Plot of NOAA dataset by Country and Time

Usage

1
2
3
geom_timeline(mapping = NULL, data = NULL, stat = "identity",
  position = "identity", na.rm = FALSE, show.legend = T,
  inherit.aes = TRUE, ...)

Arguments

mapping

See ggplot2 layer

data

See ggplot2 layer

stat

See ggplot2 layer

position

See ggplot2 layer

na.rm

See ggplot2 layer

show.legend

See ggplot2 layer

inherit.aes

See ggplot2 layer

...

other arguments passed on to layer.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(dplyr); library(lubridate);library(ggplot2)
NOAA_quakes%>%
 eq_clean_data()%>%
 dplyr::filter(COUNTRY %in% c('CHINA','MEXICO')) %>%
 dplyr::filter(DATE > '2010-01-01') %>%
 ggplot2::ggplot() +
 geom_timeline(aes(x = DATE, y = COUNTRY, size = as.numeric(EQ_PRIMARY),
                   color = as.numeric(TOTAL_DEATHS))) +
 guides(size = guide_legend(order=1))+
 scale_color_continuous(name = '# deaths') +
 scale_size_continuous(name = 'Richter scale value') +
 NOAA_thm()

jyjek/jyjekNOAA documentation built on May 7, 2019, 10:52 p.m.