Commit aed8d036 authored by vbaudrot's avatar vbaudrot

hide part code immunity to fix bug

parent b4373bd8
Pipeline #1889 passed with stages
in 3 minutes and 18 seconds
......@@ -299,31 +299,32 @@ server <- function(input, output, session){
mapFranceDepartement$Rt_immunity = immun_M3_k[[input$DateSelectImmunty]][selection]
mapFranceDepartement # return
return(mapFranceDepartement) # return
})
palImmunity <- colorNumeric(palette = "YlOrRd",
domain = unlist(immun_M3_k))
output$mapImmunity <- renderLeaflet({
leaflet(data = dataImmunity()) %>%
addTiles() %>%
fitBounds(~-5.142238, ~42.332755, ~8.231781, ~51.089842) %>%
addLegend(position = "bottomright",
title = "Rate immunity",
pal = palImmunity,
values = ~unlist(immun_M3_k))
})
# Use a separate observer to recreate polygons as needed.
observe({
proxy <- leafletProxy("mapImmunity", data = dataImmunity())
proxy %>%
addPolygons( weight = 2,
color = ~palImmunity(Rt_immunity),
fillOpacity = 0.7)
})
# palImmunity <- colorNumeric(palette = "YlOrRd",
# domain = unlist(immun_M3_k))
#
# output$mapImmunity <- renderLeaflet({
# leaflet(data = dataImmunity()) %>%
# addTiles() %>%
# fitBounds(~-5.142238, ~42.332755, ~8.231781, ~51.089842) %>%
# addLegend(position = "bottomright",
# title = "Rate immunity",
# pal = palImmunity,
# values = ~unlist(immun_M3_k))
# })
#
# # Use a separate observer to recreate polygons as needed.
# observe({
# proxy <- leafletProxy("mapImmunity", data = dataImmunity())
#
# proxy %>%
# addPolygons( weight = 2,
# # title = immunDays[[input$DateSelectImmunty]]
# color = ~palImmunity(Rt_immunity),
# fillOpacity = 0.7)
# })
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment