geom_timeline_label: Geom to create labels for earthquakes on a timeline

Description Usage Arguments Examples

View source: R/Geoms.R

Description

This geom plots labels with a certain number of largest (by size) earthquake on a timeline. The timeline is created by geom_timeline

Usage

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

Arguments

mapping

The mapping

data

The data

stat

The stat

position

The position

na.rm

The na

n_max

The number of the largest earthquakes to be labelled

show.legend

The legend

inherit.aes

The aesthetics

...

Et all

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data %>% eq_clean_data() %>%
   filter(COUNTRY %in% c("CHINA", "USA"), YEAR > 2000) %>%
   ggplot(aes(x = DATE, y = COUNTRY, colour = TOTAL_DEATHS, size = EQ_PRIMARY)) +
   geom_timeline() +
   geom_timeline_label(aes(label = LOCATION_NAME), n_max = 5) +
   theme_timeline() +
   labs(size = "Richter scale value", colour = "# deaths")

## End(Not run)

FerrieHeskes/FinalAssignmentR documentation built on May 26, 2019, 7:26 a.m.