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") 

R Markdown

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")

Including Plots

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.

Re-loaded from RDS

this_tt <- readRDS("this_tt.rds")
plot (this_tt)


antaldaniel/satellitereport documentation built on Aug. 7, 2020, 8:37 a.m.