geom_timeline_label: geom_timeline_label

Description Usage Arguments Value Examples

Description

This geom adds a vertical line to each data point with a text annotation (e.g. the location of the earthquake) attached to each line. and number of deaths.

Usage

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

Arguments

mapping

mapping

data

data

stat

stat

position

position

na.rm

na.rm

show.legend

show.legend

inherit.aes

inherit.aes

...

...

Value

ggplot2 graphical object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
df <- load_data()
df <- eq_clean_data(df)
df <- eq_location_clean(df)

country <- c("JAPAN")
dfFilter <- filterData(df, COUNTRY=country, minYear=1000, maxYear=1400)

test <- (ggplot2::ggplot()+
           geom_timeline(data=dfFilter,ggplot2::aes(x=DataEQ,
                                           xmin=as.Date("1000-01-01"),
                                           xmax=as.Date("1400-12-31"),
                                           colour=DEATHS,
                                           fill=DEATHS,
                                           size=EQ_PRIMARY,
                                          y=COUNTRY))+
           geom_timeline_label(data=dfFilter, ggplot2::aes(x=DataEQ,
                                                  location=LOCATION_NAME,
                                                  size=EQ_PRIMARY,
                                                  n_max=5,
                                                  y=COUNTRY)))

constantin345/NOOA documentation built on May 16, 2019, 7:09 p.m.