Skip to contents

Add static data layer (not updated from year to year), based on the spatial grid of the map obtained by the get_map() function

Usage

get_static_layer(layer)

Arguments

layer

type of data to be added ("soil" for soil feature, "crops" for main crops distribution, "herds" for farm animal density (aggregated from departmental scale), "herds_municipality" for farm animal density (aggregated from municipality scale), "human" for human population density)

Value

a tibble with the hexagon number ("hex_id" column) and the selected features values

References

- Soil features from [SoilGrids](https://soilgrids.org/) - Crop distribution from the Land-Parcel Identification System ([Registre Parcellaire Graphique](https://www.data.gouv.fr/fr/datasets/registre-parcellaire-graphique-rpg-contours-des-parcelles-et-ilots-culturaux-et-leur-groupe-de-cultures-majoritaire/) in France) of the European Common Agricultural Policy - Organic crop distribution from [Agence Bio](https://www.data.gouv.fr/fr/datasets/parcelles-en-agriculture-biologique-ab-declarees-a-la-pac/) - Herd density from [Agreste](https://agreste.agriculture.gouv.fr/agreste-web/) - Human population density from [Global Human Settlement Layer](https://ghsl.jrc.ec.europa.eu/download.php?ds=pop)

Examples

# Get soil features and plot clay content
if (FALSE) { # \dontrun{
library(sf)
library(tidyverse)

get_map()%>%
  left_join(get_static_layer("soil"))%>%
  ggplot()+
  geom_sf(aes(fill=clay_0to30cm_percent))
} # }