Description Usage Note References Examples
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.
1 2 3 4 5 6 7 |
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'
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.