En raison d'une intervention électrique, les services GitLab and co. seront arrêtés le Lundi 12 Octobre au soir pour 24H.

Commit 1a66edf5 authored by Jean-Francois Rey's avatar Jean-Francois Rey

Merge branch 'master' of gitlab.paca.inrae.fr:biosp/shinyMapCovid19

parents ddf6758a 26a3b843
Pipeline #1938 passed with stages
in 3 minutes and 17 seconds
......@@ -92,11 +92,11 @@ labelText = function(x,y,z){
# library(sf)
# library(dplyr)
# mapFranceDepartement = sf::st_read("../immunity/departements-20140306-100m.shp",
# stringsAsFactors = FALSE,
# options = "ENCODING=WINDOWS-1252")
# stringsAsFactors = FALSE)
#
# mapFranceDepartement_Metropolitan = mapFranceDepartement %>%
# dplyr::filter(!(nom %in% c("Martinique", "Guadeloupe", "La Réunion", "Guyane", "Mayotte", "Corse-du-Sud", "Haute-Corse")))
# dplyr::filter(!(code_insee %in% c("971", "972", "973", "974", "976", "2A", "2B")))
# mapFranceDepartement = mapFranceDepartement_Metropolitan
#
# mapFranceDepartement_Corse = sf::st_union(dplyr::filter(mapFranceDepartement, nom == "Corse-du-Sud"),
# dplyr::filter(mapFranceDepartement, nom == "Haute-Corse"))
......
......@@ -313,22 +313,27 @@ server <- function(input, output, session){
addLegend(position = "bottomright",
title = "Rate immunity",
pal = palImmunity(),
values = ~ unlist(immun_M3_k)) %>%
leaflet::addPolygons()
values = ~ unlist(immun_M3_k)) # %>%
# leaflet::addPolygons()
})
#
# Use a separate observer to recreate polygons as needed.
# observe({
#
# proxyImmunity <- leafletProxy("mapImmunity", data = dataImmunity())
# colorpal = palImmunity()
#
# proxyImmunity %>%
# clearShapes() %>%
# leaflet::addPolygons( color = ~colorpal(Rt_immunity),
# fillOpacity = 0.5
# )
# })
observe({
proxyImmunity <- leafletProxy("mapImmunity", data = dataImmunity())
colorpal = palImmunity()
proxyImmunity %>%
clearShapes() %>%
leaflet::addPolygons( data = dataImmunity(),
# color = ~colorpal(Rt_immunity),
fillColor = ~colorpal(Rt_immunity),
weight = 2,
opacity = 1,
color = "white",
dashArray = "3",
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