Commit b4373bd8 authored by vbaudrot's avatar vbaudrot

test bug immunity

parent 8762a519
Pipeline #1888 passed with stages
in 3 minutes and 31 seconds
......@@ -302,29 +302,27 @@ server <- function(input, output, session){
mapFranceDepartement # return
})
pal <- colorNumeric(palette = "YlOrRd",
domain = unlist(immun_M3_k)*100)
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 = "% Immunity",
pal = pal,
values = ~unlist(immun_M3_k)*100)
title = "Rate immunity",
pal = palImmunity,
values = ~unlist(immun_M3_k))
})
# Use a separate observer to recreate the legend as needed.
# Use a separate observer to recreate polygons as needed.
observe({
proxy <- leafletProxy("mapImmunity", data = dataImmunity())
proxy %>%
addPolygons( weight = 2,
color = ~pal(Rt_immunity),
fillOpacity = 0.5)
color = ~palImmunity(Rt_immunity),
fillOpacity = 0.7)
})
......
......@@ -167,7 +167,7 @@ ui <- tagList(
)
),
fluidRow(
leafletOutput("mapImmunity", width = "100%", height = 500)
leafletOutput("mapImmunity")
)
),
#############################################################################
......
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