knitr::opts_chunk$set(echo = FALSE, warning=FALSE, out.width = '50%') library(dplyr) library(satellitereport) library(ggplot2) library(knitr) eb <- readRDS("data-raw/eurobarometer_79_2.rds") unique(eb$indicator) dat <- eb %>% filter ( indicator == "erobarometer_79_2_is_visit_public_library") names ( dat ) this <- eb %>% filter ( indicator == "erobarometer_79_2_is_visit_public_library")
plot2 <- eb %>% filter ( indicator == "erobarometer_79_2_is_visit_public_library") %>% tibble::as_tibble() %>% create_choropleth ( dat = ., level = 2, values_var = 'values', geo_var = 'code16', unit_text = "unit", color_palette = as.character(sr_palette()), type = 'discrete', n=6, style = 'quantile', drop_levels=TRUE) saveRDS ( plot2, "plot2.rds")
You can also embed plots, for example:
readRDS("t.rds")
Note that the echo = FALSE
parameter was added to the code chunk to prevent printing of the R code that generated the plot.
this_tt <- readRDS("this_tt.rds") plot (this_tt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.