knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Some text here.
library(CourseraCapstone)
Quod Erat
library(ggplot2) eq = eq_clean_data( suppressWarnings(readr::read_delim( system.file( "extdata", "signif.txt", package = "CourseraCapstone"), delim = "\t") ) ) eq = eq_clean_data(eq) xmin = ISOdate(2006,1,1) xmax = ISOdate(2016,1,1) eq = dplyr::filter( eq, DATE >= xmin, DATE <= xmax) countries = c("USA","CHINA") ggplot()+ geom_timeline_label( data = dplyr::filter(eq, COUNTRY %in% countries), nmax = 5, aes( label = LOCATION_NAME, x=DATE, y=COUNTRY, size = EQ_PRIMARY))+ geom_timeline( data = dplyr::filter(eq, COUNTRY %in% countries), aes( x=DATE, y=COUNTRY, size = EQ_PRIMARY, colour = DEATHS))
Mas si disfrutas
library(magrittr) eq_clean_data( suppressWarnings(readr::read_delim( system.file( "extdata", "signif.txt", package = "CourseraCapstone"), delim = "\t") )) %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>% dplyr::mutate(popup_text = eq_create_label(.)) %>% eq_map(annot_col = "popup_text")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.