SHARE
TWEET

Untitled

a guest Jun 18th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. renderLeaflet ({
  2.  
  3.     pal8 <- c("#FFFFE5", "#D9F0A3", "#78C679", "#006837")
  4.   bins=quantile(mapdata_1()$Per), na.color = "#808080",  alpha = FALSE, reverse = F)
  5.    pal <- colorFactor(palette = pal8, domain =NULL, levels=(mapdata_1()$cat), ordered = TRUE, na.color = "#808080",  alpha = FALSE, reverse = F)
  6.  
  7.      leaflet (mapdata_()) %>%
  8.  
  9.                       addProviderTiles("CartoDB.Positron") %>%
  10.                      clearControls() %>%
  11.                      clearShapes()%>%
  12.                         addPolygons(fillColor = ~pal(cat)) %>%
  13.  
  14.  
  15.  
  16.                                    addTiles() %>%
  17.  
  18.       setView(-82.706838, 40.358615, zoom=7) %>%
  19.  
  20.                         addLegend(position = "bottomright",
  21.                          values = ~cat,
  22.  
  23.                          pal = pal,
  24.                          title = (paste("%",input$Age_Group_map, input$sex_map, "in", input$Year_map)) ,
  25.                        labFormat = labelFormat(
  26.                       ))
  27.  
  28.         })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top