4  Les covariables

4.1 Question internes

  • Faut-il intégrer des scripts pour récupérer certaines covariables –> peut-être à fournir en annexe
  • Où héberger la pile de covariables que nous allons utiliser? –> tout dépend de leur poids. Sur une AOBOX ou un nextcloud
  • Faut-il présenter toutes les covariables? Avec quel niveau de détail? –> présenter les groupes de covariables. Méanmoins il ne semble important que les gens sachent ce qu’ils utilisent.
Nom de la variable Description Type Groupe de covariable DSM Source
bioX 18 bioclimatic variables (X means the id of the bioclimatic variable, eg bio1, bio2, etc.) continuous Climate Wordclim
bdforet Land use for forest areas only categorical organism Data from the French forest database (version 1 (2006 data) IGN BDForêt)
PC1_NDVI Principal component of a stack of combined NDVI images for a dry and wet period continuous organism SentinelII Loiseau et al
NDVI Principal component of a set of NDVI images during dry and wet periods continuous organism
clc90 Corine Land Cover 1990 categorical organism Corine Land Cover
clc00 Corine Land Cover 2000 categorical organism Corine Land Cover
clc06 Corine Land Cover 2006 categorical organism Corine Land Cover
clc18 Corine Land Cover 2018 categorical organism Corine Land Cover
ecoclim Land use from the ECOCLIMAP II database continuous Parental Material
graviAL2000 Gravimetric data from the BRGM continuous Parental Material BRGM
graviBg2000 Gravimetric data from the BRGM continuous Parental Material BRGM
graviG2000 Gravimetric data from the BRGM continuous Parental Material BRGM
mrrtf Multi-resolution Ridge Top Flatness index continuous Relief dem derivative
cti Compound Topographic Index (calculated with the Geomorphometric and Gradient Metrics Toolbox) continuous Relief dem derivative
curv_long Longitudinal curvature continuous Relief dem derivative
curv_trans Transversal curvature continuous Relief dem derivative
curvature Mean curvature continuous Relief dem derivative
dissection Describes dissection in a continuous raster surface within rectangular or circular window index continuous Relief dem derivative
eros Estimated erosion rates in Europe continuous Relief Cerdan et al
exposition Exposition continuous Relief
flow_acc Flow accumulation continuous Relief
flow_dir Flow direction categorical Relief
hli Heat Load Index (A southwest-facing slope should have warmer temperatures than a southeast-facing slope, even though the amount of solar radiation they receive is equivalent) continuous Relief
flow_length Flow length continuous Relief
mrvbf Multi-resolution Valley Bottom Flatness index continuous Relief
roughness Represents the roughness in a continuous raster within a specified window continuous Relief
ruprh1 Available water capacity (mm, “réserve utile”, or RU, in French). Calculated by Wosten pedotransfer function continuous Soil
slopeascos Slope sinus transformations continuous Relief
slopeastrasp Slope TRASP (Topographic Radiation Aspect Index) transformations continuous Relief
srr Surface relief ratio continuous Relief
pHIFN Combined predictions of pH from large datasets of soil test results for arable land areas and from interpreted pH from indicator plants for forest areas continuous Soil French Forest Institute
soil1 Dominant soil type of the SMU of the European Soil Map at 1/1,000,000 scale continuous Soil European Soil Map at 1/1,000,000 scale
arg1 Dominant topsoil clay content of the European Soil Map at 1/1,000,000 scale continuous Soil European Soil Map at 1/1,000,000 scale
profsolMillion Dominant soil depth of the European Soil Map at 1/1,000,000 scale continuous Soil European Soil Map at 1/1,000,000 scale
mat11 Dominant parental material level 1 of the European Soil Map at 1/1,000,000 scale continuous Soil European Soil Map at 1/1,000,000 scale
lim1 Dominant topsoil silt content of the European Soil Map at 1/1,000,000 scale continuous Soil European Soil Map at 1/1,000,000 scale
sab1 Dominant topsoil sand content of the European Soil Map at 1/1,000,000 scale continuous Soil European Soil Map at 1/1,000,000 scale
linear_aspect Transforms circular aspect to a linear variable continuous Relief
idpr Network Development and Persistence Index continuous Relief
srtm Elevation from SRTM DEM continuous Relief
FBS_B12 Mosaic of Sentinel 2 images, Spectral band B12, Sentinel 2 sensor, from March 1 to April 30 in 2016 and 2017 and from November 1 to December 31 in 2016 continuous Soil ScienceDirect
FBS_B2 Mosaic of Sentinel 2 images, Spectral band B2 continuous Soil ScienceDirect
FBS_B4 Mosaic of Sentinel 2 images, Spectral band B4, Sentinel 2 sensor continuous Soil ScienceDirect
FBS_CalcRIND Mosaic of Sentinel 2 images, Carbonate Index continuous Soil ScienceDirect
FBS_ClayRIND Mosaic of Sentinel 2 images, Clay response, Sentinel 2 sensor indices continuous Soil ScienceDirect
FBS_ColIND Mosaic of Sentinel 2 images, Coloration Index (CI) continuous Soil ScienceDirect
FBS_FeIND Mosaic of Sentinel 2 images, Ferrous Iron (FeI) continuous Soil ScienceDirect
FBS_HueIND Mosaic of Sentinel 2 images, Hue Index (HI) continuous Soil ScienceDirect
class_aspect Classifies aspect into discrete classes (calculated with the Geomorphometric and Gradient Metrics Toolbox) categorical Relief Data from DEM and derived attributes
Modis2001_01_01.Land_Cover_Type_1.tif MODIS Land Cover Type (MCD12Q1) - Annual global land cover types at 500m resolution. Year in the title. categorical organism NASA LP DAAC - Mark Friedl, Damien Sulla-Menashe. 2018.
Modis2001_01_01.Npp_1km.tif MODIS Net Primary Production (NPP) for CONUS - Estimates NPP using MODIS surface reflectance. Year in the title. continuous organism Robinson et al. 2018 - Remote Sensing in Ecology and Conservation.
Modis2002_01_01.Land_Cover_Type_1.tif MODIS Land Cover Type (MCD12Q1) - Annual global land cover types at 500m resolution. Year in the title. categorical organism NASA LP DAAC
Modis2002_01_01.Npp_1km.tif MODIS Net Primary Production (NPP) for CONUS - Estimates NPP using MODIS surface reflectance. Year in the title. continuous organism Robinson et al. 2018
Modis2003_01_01.Land_Cover_Type_1.tif MODIS Land Cover Type (MCD12Q1) - Annual global land cover types at 500m resolution. Year in the title. categorical organism NASA LP DAAC
Modis2003_01_01.Npp_1km.tif MODIS Net Primary Production (NPP) for CONUS - Estimates NPP using MODIS surface reflectance. Year in the title. continuous organism Robinson et al. 2018
Modis2004_01_01.Land_Cover_Type_1.tif MODIS Land Cover Type (MCD12Q1) - Annual global land cover types at 500m resolution. Year in the title. categorical organism NASA LP DAAC
Modis2004_01_01.Npp_1km.tif MODIS Net Primary Production (NPP) for CONUS - Estimates NPP using MODIS surface reflectance. Year in the title. continuous organism Robinson et al. 2018
Modis2005_01_01.Land_Cover_Type_1.tif MODIS Land Cover Type (MCD12Q1) - Annual global land cover types at 500m resolution. Year in the title. categorical organism NASA LP DAAC
Modis2005_01_01.Npp_1km.tif MODIS Net Primary Production (NPP) for CONUS - Estimates NPP using MODIS surface reflectance. Year in the title. continuous organism Robinson et al. 2018
Modis2006_01_01.Land_Cover_Type_1.tif MODIS Land Cover Type (MCD12Q1) - Annual global land cover types at 500m resolution. Year in the title. categorical organism NASA LP DAAC
Modis2006_01_01.Npp_1km.tif MODIS Net Primary Production (NPP) for CONUS - Estimates NPP using MODIS surface reflectance. Year in the title. continuous organism Robinson et al. 2018
Modis2007_01_01.Land_Cover_Type_1.tif MODIS Land Cover Type (MCD12Q1) - Annual global land cover types at 500m resolution. Year in the title. categorical organism NASA LP DAAC
Modis2007_01_01.Npp_1km.tif MODIS Net Primary Production (NPP) for CONUS - Estimates NPP using MODIS surface reflectance. Year in the title. continuous organism Robinson et al. 2018
Modis2008_01_01.Land_Cover_Type_1.tif MODIS Land Cover Type (MCD12Q1) - Annual global land cover types at 500m resolution. Year in the title. categorical organism NASA LP DAAC
Modis2008_01_01.Npp_1km.tif MODIS Net Primary Production (NPP) for CONUS - Estimates NPP using MODIS surface reflectance. Year in the title. continuous organism [Robinson et al.

==> CE TABLEAU EST TROP PEU LISIBLE. POSSIBLE D’ALEMIORER SA MISE EN FORME ?

4.2 Initialisation

library(sf)
Linking to GEOS 3.12.2, GDAL 3.11.4, PROJ 9.4.1; sf_use_s2() is TRUE
library(terra)
terra 1.9.6
library(httr)
library(ggplot2)
library(tidyterra)

Attachement du package : 'tidyterra'
L'objet suivant est masqué depuis 'package:stats':

    filter
pts_sf <- readRDS("donnees/sorties/pointsSpline.rds") 
bbox <- st_bbox(pts_sf)  # Étendue des points

4.3 Importation des covariables

4.3.1 Modèle numérique d’altitude

Le Modlèle Numérique d’Altitude (MNA) est obtenu via les services Copernicus.

# Définir l'étendue + résolution (ex: 10m)
ext <- ext(bbox["xmin"], bbox["xmax"], bbox["ymin"], bbox["ymax"])
# Convertit l'étendue de la zone d'étude (bbox) en un polygone
poly_l93 <- st_as_sfc(bbox)

4.3.2 Chargement des cartes des covariables

covariables <- terra::rast("donnees/covariables/clipped_raster_stack.tif")

# Exploration des données : nuage de points (plot) des 6 premières covariables
terra::plot(covariables, y = 1:6)

4.3.3 Extraction des points et graphique, exemple de la température

require(ggplot2)
X <- terra::extract(covariables, vect(pts_sf))
variables_categorielles <- c("Modis2006_01_01.Land_Cover_Type_1",            "clc90" ,
"Modis2009_01_01.Land_Cover_Type_1", "Modis2011_01_01.Land_Cover_Type_1",
"TMN_rgf93", "PJE_rgf93", "PDE_rgf93")
variables_quantitatives <- setdiff(names(X), variables_categorielles)[-1]
X[, variables_categorielles] <- lapply(X[, variables_categorielles], as.factor)

ggplot() +
    tidyterra::geom_spatvector(
    data = vect(cbind(pts_sf,X)),
    aes(color = tmean),
    size = 2
  ) +
  scale_color_viridis_c()

4.3.4 Inspection des covariables

GGally::ggpairs(
  data = X,
  columns = variables_quantitatives,
  title = "Correlation entre la variables quantitatives",
  upper = list(continuous = GGally::wrap("cor", size = 3)),
  lower = list(continuous = GGally::wrap("smooth", alpha = 0.3, linewidth = 0.3)) , #,  mapping = aes(color = children_fac)
  progress = FALSE
)
Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning in geom_point(...): Ignoring unknown parameters: `linewidth`
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).

GGally::ggpairs(data = X,   
                columns = variables_quantitatives, 
                title = "Correlation entre la variables quantitatives",  progress = FALSE

                )
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).
Warning in ggally_statistic(data = data, mapping = mapping, na.rm = na.rm, :
Removed 3 rows containing missing values
Warning: Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Removed 3 rows containing missing values or values outside the scale range
(`geom_point()`).
Warning: Removed 3 rows containing non-finite outside the scale range
(`stat_density()`).