Description Usage Value Examples
View source: R/visualization_tools.R
Custom theme that makes the earthquake visualization prettier and expands the plot margins to allow all text to fit inside the plot.
1 |
A ggplot theme which can be applied to ggplot layers.
1 2 3 4 5 6 7 8 | readr::read_delim(file = system.file("extdata", "signif.txt", package="noaa"), delim = "\t") %>%
eq_clean_data() %>%
dplyr::filter(YEAR >= 1900, !is.na(DEATHS), !is.na(EQ_MAG_ML),
COUNTRY %in% c("CHINA", "USA")) %>%
ggplot2::ggplot(ggplot2::aes(x = DATE, y = COUNTRY, colour = DEATHS, size = EQ_MAG_ML)) +
theme_time() +
geom_timeline() +
ggplot2::labs(x = "DATE", color = "# deaths", size = "Richter scale value")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.