There and Back Again competition entry https://shiny.petras.space/commute/
rstats
rshiny
census
competition
leaflet
javascript
stats-nz

app.R 456B

1234567891011121314151617181920
  1. library(shiny)
  2. library(leaflet)
  3. library(rgdal)
  4. sf <- readOGR(dsn="../shapefiles/sa20025WGSfilcth")
  5. leaflet(sf, options = leafletOptions(minZoom = 3, maxZoom = 13)) %>%
  6. addPolygons(color="#000", opacity = 1, weight=1,
  7. popup = sf@data$SA22018__1) %>%
  8. setView(174, -41, 5)
  9. # Define UI
  10. ui <- fluidPage(
  11. )
  12. # Define server logic
  13. server <- function(input, output) {
  14. }
  15. # Run the application
  16. shinyApp(ui = ui, server = server)