Commit 2e078e8e authored by Grelot Frederic's avatar Grelot Frederic :swimmer_tone5:
Browse files

MAJ map/map_so_ii.rmd

Showing with 32 additions and 1 deletion
+32 -1
......@@ -4,7 +4,7 @@ library(sf)
library(geau)
```
```{r update-map}
```{r update-theme}
path = "data-common/figure/so-ii/map/theme/so-ii-%s.pdf"
map_so_ii(theme = "osm", theme_legend = TRUE, path = sprintf(path, "osm"))
......@@ -13,6 +13,7 @@ map_so_ii(theme = "collectivity", theme_legend = TRUE, detail = "syndicate", pat
map_so_ii(theme = "collectivity", theme_legend = TRUE, detail = "epci", path = sprintf(path, "epci"))
map_so_ii(theme = "clc", theme_legend = TRUE, path = sprintf(path, "clc"))
map_so_ii(theme = "population", theme_legend = TRUE, path = sprintf(path, "population"))
map_so_ii(theme = "population", year = 1931, theme_legend = TRUE, path = sprintf(path, "population-1931"))
map_so_ii(theme = "population", year = 2018:2019, theme_legend = TRUE, path = sprintf(path, "population-last"))
map_so_ii(theme = "population", year = 2014:2019, theme_legend = TRUE, path = sprintf(path, "population-last-5"))
map_so_ii(theme = "catnat", theme_legend = TRUE, path = sprintf(path, "catnat"))
......@@ -28,3 +29,33 @@ map_so_ii(theme = "onrn", detail = "ratio", theme_legend = TRUE, path = sprintf(
map_so_ii(theme = "onrn", detail = "balance", theme_legend = TRUE, path = sprintf(path, "balance"))
map_so_ii(theme = "onrn", detail = "ppri_year", theme_legend = TRUE, path = sprintf(path, "ppri_year"))
```
```{r update-rex-example}
path = "data-common/figure/so-ii/map/rex/so-ii-%s.pdf"
dataset = readODS::read_ods("data-common/table/so-ii/rex-2020-09-19-enquete.ods")
dataset = sf::st_as_sf(dataset, coords = c("longitude", "latitude"), crs = "WGS84")
pch = c(
"habitant" = 21,
"agriculteur" = 24
)
color = c(
"cereale" = "yellow",
"habitant" = "black",
"viticulture" = "purple",
"maraichage" = "red"
)
cex = 2
map_so_ii(
dataset,
main = "Contact",
pch = pch[dataset[["statut"]]],
bg = color[dataset[["activite"]]],
cex = 2,
theme = "clc"
)
```
\ No newline at end of file
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