Commit 2794567a authored by Thierry Feuillet's avatar Thierry Feuillet
Browse files

legendeCarto

parent 4a4af1ad
Pipeline #11980 passed with stage
in 42 seconds
......@@ -17,6 +17,7 @@ output:
library(flexdashboard)
library(mapview)
library(leaflet)
library(dplyr)
library(sf)
library(plotly)
library(tmap)
......@@ -227,11 +228,14 @@ tm_shape(Geomorphons) +
parcelles <- st_read("data/vecteur/parcelles.shp", quiet = T)
vues <- parcelles %>% filter(Terrain == "VU") %>% st_centroid()
parcelles$shift2 <- cut(parcelles$shift,
include.lowest = TRUE,
right = FALSE,
dig.lab = 4,
breaks = c(-212, -30, 40, 80, 308)
)
include.lowest = TRUE,
right = FALSE,
dig.lab = 4,
breaks = c(-212, -30, 40, 80, 308)) %>%
recode_factor(., "[-212,-30)" = "<-30 m",
"[-30,40)" = "-30 à 40 m",
"[40,80)" = "40 à 80 m",
"[80,308]" = ">80 m")
# map <- mapview(parcelles$shftQrt, legend=F, col.regions="red",
# map.types = c("OpenTopoMap"))
......@@ -243,10 +247,10 @@ clustExt <- parcelles %>% filter(change %in% c("1_3","3_1")) %>% st_centroid()
tm_basemap(leaflet::providers$OpenTopoMap) +
tm_shape(parcelles) +
tm_polygons(col = "shift2", palette = "-RdBu", alpha = 0.8) +
tm_polygons(col = "shift2", title = "Changement altitudinal", palette = "-RdBu", alpha = 0.8) +
tm_view(set.view = c(1.84, 42.62, 12)) +
tm_shape(clustExt) +
tm_dots(col = "change", palette = "Set1", size = .08) +
tm_dots(col = "change", title = "Changement de forme", palette = "Set1", size = .08) +
tm_shape(vues) +
tm_dots() +
tm_scale_bar()
......
This diff is collapsed.
Supports Markdown
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