Created
August 28, 2020 13:10
-
-
Save z3tt/f66e5d26c49e248fd34acb2dd653614d to your computer and use it in GitHub Desktop.
tmap fullPage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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