devtools::load_all() library(htmltools) library(knitr) library(leaflet) library(mapview) library(tmap) library(ceramic) library(tmaptools) library(dplyr) knitr::opts_chunk$set( echo = FALSE, message = FALSE, warning = FALSE, dpi = 300, out.width = "95%", fig.align = "center" ) level <- params$level neighbourhood <- params$neighbourhood compare <- level == "neighbourhood" title <- switch(level, "neighbourhood" = neighbourhood, "city" = "City of Toronto" ) dataset <- lemr:::determine_dataset_from_level(level, neighbourhood) legend <- if (level == "neighbourhood") { legend_label <- glue::glue("A legend showing {neighbourhood} (dark blue) versus City of Toronto (grey), used for plots on this page.") shiny::HTML(glue::glue("<div role = 'img' aria-label = '{legend_label}'>{lemr::create_neighbourhood_legend(neighbourhood)}</div>")) }
r title
map_alt_text <- glue::glue("A map of {area} showing the locations of apartment buildings, above guideline increase applications, and tenant defense fund grant recipients.", area = ifelse(level == "city", "Toronto", neighbourhood))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.