Skip to content

Instantly share code, notes, and snippets.

@z3tt
Created August 28, 2020 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save z3tt/f66e5d26c49e248fd34acb2dd653614d to your computer and use it in GitHub Desktop.
Save z3tt/f66e5d26c49e248fd34acb2dd653614d to your computer and use it in GitHub Desktop.
tmap fullPage
library(shiny)
library(tmap)
library(tidyverse)
library(fullPage)
data(World)
world_vars <- setdiff(names(World), c("iso_a3", "name", "sovereignt", "geometry"))
ui <- pagePiling(
sections.color = c('#ebebeb', '#f1f1f1'),
opts = options,
menu = c(
"Start" = "home",
"Introduction" ="intro"
),
pageSection(
pageContainer(
tmapOutput("map")
)
),
fullPage::pageSection(
)
)
server <- function(input, output, session) {
output$map <- renderTmap({
tm_shape(World) +
tm_polygons(world_vars[1], zindex = 401)
})
}
shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment