Can only work if data-common is a symbolic link

Data to be plotted

dataset = rio::import("data-common/table/so-ii/rex-2020.ods", which = 1) dataset = dataset[!is.na(dataset$latitude), ] dataset = sf::st_as_sf(dataset, coords = c("longitude", "latitude"), crs = "WGS84")

Data preparation

bg = rep(NA, nrow(dataset)) bg[dataset[["viticulture"]]] = "deeppink4" bg[dataset[["habitant"]]] = "cornflowerblue" col = "black" cex = 1.4 pch = 21

Legend definition

dataset_legend = list( title = "Enquêtes du REX 19 septembre 2020", legend = c("Agriculteurs", "Habitants membre ROI"), pch = 21, pt.bg = c("deeppink4", "cornflowerblue"), pt.cex = 1.4 )

map_so_ii(dataset, dataset_legend, path = "toto.pdf", bg = bg, cex = cex, col = col, pch = pch) map_so_ii(dataset, dataset_legend, path = "toto.png", bg = bg, cex = cex, col = col, pch = pch) map_so_ii(dataset, dataset_legend, path = "toto.pdf", bg = bg, pch = 22) map_so_ii(dataset, dataset_legend, path = "toto.pdf", bg = bg, pch = 22, theme = "gaspar")