geom_timeline_label: Geom for labeling the time series plot.

Description Usage Note References Examples

Description

This function provides label meta data for the time series plot of earthquakes.

This function provides label meta data for the time series plot of earthquakes.

Usage

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

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

Note

For BC date ranges, use a one sided inequality e.g. datevalue < '0000-01-01'

For BC date ranges, use a one sided inequality e.g. datevalue < '0000-01-01'

References

The following are usefule references: https://ggplot2.tidyverse.org/reference/geom_text.html https://ggplot2.tidyverse.org/articles/ggplot2-specs.html

The following are usefule references: https://ggplot2.tidyverse.org/reference/geom_text.html https://ggplot2.tidyverse.org/articles/ggplot2-specs.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## Not run: 

# For BC date ranges, use a one sided inequality e.g. datevalue < '0000-01-01'

library(dplyr)
library(ggplot2)

any_name_df<-eq_clean_data(results)

p1<- any_name_df %>% filter(COUNTRY =="CHINA" | COUNTRY=="USA" | COUNTRY=="GREECE") %>% 
filter(datevalue > '1900-01-01', datevalue < '1950-01-01') %>% 
ggplot()

p1<-p1 + geom_timeline(aes(x = datevalue, y = COUNTRY, color = TOTAL_DEATHS, size = EQ_PRIMARY)) 

p1<-p1 + geom_timeline_label(aes(x = datevalue, y = COUNTRY, magnitude = EQ_PRIMARY,label = location_name, max_labels= 5))

p1<-p1 + ggtitle("NOAA Signficant Earthquakes Data with High Profile Events")

p1


## End(Not run)
## Not run: 

# For BC date ranges, use a one sided inequality e.g. datevalue < '0000-01-01'

library(dplyr)
library(ggplot2)

any_name_df<-eq_clean_data(results)

p1<- any_name_df %>% filter(COUNTRY =="CHINA" | COUNTRY=="USA" | COUNTRY=="GREECE") %>% 
filter(datevalue > '1900-01-01', datevalue < '1950-01-01') %>% 
ggplot()

p1<-p1 + geom_timeline(aes(x = datevalue, y = COUNTRY, color = TOTAL_DEATHS, size = EQ_PRIMARY)) 

p1<-p1 + geom_timeline_label(aes(x = datevalue, y = COUNTRY, magnitude = EQ_PRIMARY,label = location_name, max_labels= 5))

p1<-p1 + ggtitle("NOAA Signficant Earthquakes Data with High Profile Events")

p1


## End(Not run)

cowboy2718/QuakeExplorer documentation built on May 26, 2019, 4:41 p.m.