Skip to content

Commit 9ed2c17

Browse files
committed
improve 05_summary
1 parent 088e307 commit 9ed2c17

4 files changed

Lines changed: 80 additions & 81 deletions

File tree

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ panel.cor <- function(x, y, digits = 2, prefix = "", cex.cor, ...) {
4242
}
4343

4444

45-
plotly_df <- function(df, xlab = "dataset") {
45+
plotly_df <- function(df, xlab = "project") {
4646
pal <- pals::glasbey(ncol(df)) #cols25
4747
fig <- plot_ly(df, type = "bar", name = "Land cover")
4848
for (i in 1:ncol(df)) {

analysis/05_summary.qmd

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ execute:
2727

2828
### Datasets
2929

30-
- **Registre Parcellaire Graphique (RPG)**(45Gb): annual field crop data for the period 2007-2023 available at France scale on IGN website: <https://geoservices.ign.fr/rpg>. Definition of field (parcelles) are coherent only in the recent period 2015-2023.
30+
- **Registre Parcellaire Graphique (RPG)**(45Gb): annual field crop data for the period 2007-2024 available at France scale on IGN website: <https://geoservices.ign.fr/rpg>. Definition of field (parcelles) are coherent only in the recent period 2015-2023.
3131
- **Carte d’occupation des sols du CES OSO – THEIA (OSO)**(6.6Gb): annual land cover data for the period 2016-2024. Available for France in raster format and 10m resolution <https://doi.org/10.57745/UZ2NJ7>. Official access through the CNES website <https://geodes-portal.cnes.fr>.
3232
- **BD Haies v2** (6.8Gb): hedgerows dataset for France available on the IGN website: <https://geoservices.ign.fr/bdhaie>. BD Haie v2 was produced from satellite images of 2020-2022 (which is a better fit to our data than v1 from images of 2011-2014).
3333

34-
- *RPG complété*: add missing crop field data that was not officially reported in the Common Agricultural Policy (PAC in French acronym) so absent from the `RPG` dataset. It uses a combination of datasets from cadastre, IGN BD TOPO and OSO. Data is publicly available for the period 2018-2023 and it could be retrieve for the year 2016-2017 directly from Pierre Cantelaube (INRAE - ODR). The year 2024 will not be available in time for our project. The dataset is stored in multiple files per year and per regions or department <https://entrepot.recherche.data.gouv.fr/dataverse/rpg_complete_2022>. The main issue is that the definition of parcelle in `RPG` is different from cadastre in `RPG complété`, so if may bring biases in the vectorial calculations (based on the field definition). Additionally, it is heavy to process (download hundreds of files, merge them per year, ensure consistent classes with RPG) and it might bring only little information on land cover. For this first exploration, **RPG complété was not included but the discussion is open**.
34+
- *RPG complété*: add missing crop field data that was not officially reported in the Common Agricultural Policy (PAC in French acronym) so absent from the `RPG` dataset. It uses a combination of datasets from cadastre, IGN BD TOPO and OSO. Data is publicly available for the period 2018-2023 and it could be retrieve for the year 2016-2017 directly from Pierre Cantelaube (INRAE - ODR). The year 2024 will not be available in time for our project. The dataset is stored in multiple files per year and per regions or department <https://entrepot.recherche.data.gouv.fr/dataverse/rpg_complete_2022>. The main issue is that the definition of parcelle in `RPG` is different from cadastre in `RPG complété`, so it may bring biases in the vectorial calculations (based on the field definition). Additionally, it is heavy to process (download hundreds of files, merge them per year, ensure consistent classes with RPG) and it might bring only limited information on land cover. For this first exploration, **RPG complété was not included but the discussion is open**.
3535

3636
- [Land cover class harmonization](https://github.com/FunBioDiv/gis-diversification/raw/refs/heads/main/data/derived-data/RPG-OSO_classes.csv): list all classes from RPG and OSO and categorize them. This file must be double checked by expert and customized for the project objectives.
3737

@@ -198,7 +198,7 @@ mapview(pts_vcg, zcol = "in_RPG", layer.name = "in_RPG") +
198198

199199
**To be discussed:**
200200

201-
- Some coordinates were taken at the edge or on the boundary of the field (@fig-outsebiopagvcg), so it is not possible to clearly identify the field. In such case, using RPG complété will probably not help. Should we consider the closest field within a distance threshold (e.g. 10m)?
201+
- Some coordinates were taken at the edge or on the boundary of the field (@fig-outsebiopagvcg), so it is not possible to clearly identify in which field they belong. In such case, using RPG complété will probably not help. Should we consider the closest field within a distance threshold (e.g. 10m)?
202202

203203

204204
### Field size
@@ -345,7 +345,7 @@ mapview(minF) + mapview(minP) # not up to date
345345

346346
**To be discussed:**
347347

348-
- Some fields are defined as ```r ref$nom[ref$original_code == "BOR"]``` which are not field but borders (as in @fig-smallarea). Should we remove non crop fields from RPG before running the calculations?
348+
- Some fields are defined as ```r ref$nom[ref$original_code == "BOR"]``` which are not proper fields but borders (as in @fig-smallarea). Should we remove non crop fields from RPG before running the calculations (e.g. `Bordure`, `Bande tampon`, `Surface non agricole`, `Truffière`, `Bois paturés`)?
349349

350350

351351
### Hedgerows length
@@ -469,8 +469,8 @@ legend(
469469

470470
**To be discussed:**
471471

472-
- Which buffer size should we use to calculate the hedgerows lengths? Without buffer, it might be too restrictive, but is 10m to large, or not enough?
473-
- Should we consider the position of the field sampling when calculating the hedgerows length?
472+
- Which buffer size should we use to calculate the hedgerows lengths? Without buffer, it might be too restrictive, but is 10m too large, or not enough?
473+
- Should we consider the location of the sampling when calculating the hedgerows length?
474474

475475

476476
### Field size within buffer
@@ -751,10 +751,10 @@ legend(
751751
### Summary and questions about vector indicators
752752

753753
- Most observations have a corresponding crop field in RPG dataset (@tbl-inrpg).
754-
- But some coordinates were taken at the very edges of field (@fig-outsebiopagvcg), so we might need to identify the closest field instead (and add a distance threshold, e.g. 10m).
755-
- Adding the `RPG complété` require more data processing, and in any case it won't cover all observations (but it will complete some wineyards that are not registered in PAC). The `RPG complété` classes might also be less consistent within our timeframe (e.g. issue of 2016-2017) and it would require to be further checks.
756-
- We might need to exclude some fields from RPG (e.g. Bordure, Bande tampon, Culture sous serre, Bois paturés, Surface non agricole, Truffière) to only includes crop fields that are relevant for us. This information should be added in the file [RPG-OSO_classes.csv](https://github.com/FunBioDiv/gis-diversification/raw/refs/heads/main/data/derived-data/RPG-OSO_classes.csv).
757-
- The position of the observations within the field might influence the results (influence of hedgerows, or of agricultural practices). We might want to add an indicator reflecting the distance to the center of the field and/or the distance to the closest field boundary?
754+
- But some coordinates were taken at the outside edge of the field (@fig-outsebiopagvcg), so we might need to identify the closest field instead (and add a distance threshold, e.g. 10m).
755+
- Adding the `RPG complété` requires more data processing and it won't cover all observations (but it will help characterizing some wineyards that are not registered in the PAC). The `RPG complété` classes might be less consistent within our timeframe (e.g. issue with data from 2016-2017) so it would require further checks.
756+
- We might need to exclude some fields from RPG (e.g. `Bordure`, `Bande tampon`, `Surface non agricole`, `Truffière`, `Bois paturés`) to includes only crop fields that are relevant for us. This information should be added in the file [RPG-OSO_classes.csv](https://github.com/FunBioDiv/gis-diversification/raw/refs/heads/main/data/derived-data/RPG-OSO_classes.csv).
757+
- The sampling location within the field might influence the results (different impact of hedgerows, or of agricultural practices). We might want to add an indicator reflecting the distance to the center of the field and/or the distance to the closest field boundary?
758758

759759

760760
## Indicators from raster datasets (RPG+OSO)
@@ -821,13 +821,13 @@ knitr::kable(info)
821821

822822
```{r}
823823
#| label: fig-coverstudy
824-
#| fig-cap: "Land cover of the observations (at year N) per dataset"
824+
#| fig-cap: "Land cover of the observations (at year N) per project"
825825
826826
nlulc <- data.frame(table(lulc_group[, 1], indr$Study_ID))
827-
names(nlulc) <- c("Cover", "Dataset", "Nobs")
827+
names(nlulc) <- c("Cover", "Project", "Nobs")
828828
plot_ly(
829829
nlulc,
830-
x = ~Dataset,
830+
x = ~Project,
831831
y = ~Nobs,
832832
color = ~Cover,
833833
text = ~Cover,
@@ -840,14 +840,14 @@ plot_ly(
840840
config(modeBarButtons = list(list("toImage")), displaylogo = FALSE)
841841
```
842842

843-
Vigne is the most common land cover (@tbl-coverclass), but the information might come from `RPG` (two classes: `Vigne (sauf vigne rouge)` and `Vigne : raisins de cuve non en production`) or `OSO`. The land cover depends greatly on dataset (@fig-coverstudy) with `OSCAR` and `BACCHUS` studying wineyards, `FRAMEwork` and `SBIOPAG` studying orchard, and the other datasets focusing on annual crops.
843+
Vigne is the most common land cover (@tbl-coverclass), but the information might come from `RPG` (two classes: `Vigne (sauf vigne rouge)` and `Vigne : raisins de cuve non en production`) or `OSO`. The land cover depends greatly on the project (@fig-coverstudy) with `OSCAR` and `BACCHUS` studying wineyards, `FRAMEwork` and `SBIOPAG` studying orchard, and the other projects focusing on annual crops.
844844

845845
Let's have a look at the crop rotations over the 6-year period (N:N-5).
846846

847847

848848
```{r}
849849
#| label: fig-nyearstudy
850-
#| fig-cap: "Length of the land cover time series per dataset."
850+
#| fig-cap: "Length of the land cover time series per project."
851851
852852
# barplot(
853853
# table(nyear),
@@ -1033,15 +1033,14 @@ plotly_df(data.frame(t(mean_buffer)), xlab = "Buffer size")
10331033
## year
10341034
```{r}
10351035
#| label: fig-coveryear
1036-
#| fig-cap: "Average land cover grouped in 36 categories per buffer size"
1037-
# number of classes per buffer
1036+
#| fig-cap: "Average land cover grouped in 36 categories per year"
10381037
10391038
py1500 <- data.frame(
10401039
rowsum(gr1500, indr$Year, na.rm = TRUE) /
10411040
as.numeric(tapply(rowSums(gr1500) > 0, indr$Year, sum))
10421041
)
10431042
1044-
plotly_df(py1500)
1043+
plotly_df(py1500, xlab = "Year")
10451044
10461045
```
10471046

@@ -1060,7 +1059,7 @@ The average land cover within buffers among all observations is not really influ
10601059

10611060
```{r}
10621061
#| label: fig-bcoverstudy500
1063-
#| fig-cap: "Average land cover per dataset with buffer of 500m"
1062+
#| fig-cap: "Average land cover per project with buffer of 500m"
10641063
10651064
pc500 <- data.frame(
10661065
rowsum(gr500, indr$Study_ID, na.rm = TRUE) /
@@ -1074,7 +1073,7 @@ plotly_df(pc500)
10741073

10751074
```{r}
10761075
#| label: fig-bcoverstudy1000
1077-
#| fig-cap: "Average land cover per dataset with buffer of 1000m"
1076+
#| fig-cap: "Average land cover per project with buffer of 1000m"
10781077
10791078
pc1000 <- data.frame(
10801079
rowsum(gr1000, indr$Study_ID, na.rm = TRUE) /
@@ -1088,7 +1087,7 @@ plotly_df(pc1000)
10881087

10891088
```{r}
10901089
#| label: fig-bcoverstudy1500
1091-
#| fig-cap: "Average land cover per dataset with buffer of 1500m"
1090+
#| fig-cap: "Average land cover per project with buffer of 1500m"
10921091
10931092
pc1500 <- data.frame(
10941093
rowsum(gr1500, indr$Study_ID, na.rm = TRUE) /
@@ -1366,13 +1365,13 @@ boxplot(
13661365

13671366
### Summary and questions about raster indicators:
13681367

1369-
- Annual raster combining RPG and OSO for the whole France simplify the extraction of information on crop rotations, proportion of land cover within buffers and edge length density.
1368+
- Annual rasters combining RPG and OSO for the whole France simplify the extraction of indicators on crop rotations, proportion of land cover within buffers and edge length density.
13701369

1371-
- There are up to ```r info$n_classes[3]``` land cover in the RPG+OSO dataset. Here we simplified it using the *Référentiel des cultures* as an illustration. Before the extracted information can be usefull in the project, it requires further work on land cover class homogeneization. This will be done independantly from the GIS data extraction.
1370+
- There are up to ```r info$n_classes[3]``` land cover classes in the RPG+OSO dataset. Here we simplified it using the *Référentiel des cultures* (36 categories) as an illustration. Further work on land cover class homogeneization is needed to make use of the extracted information. This will be done independantly from the GIS data extraction.
13721371

13731372
- The edge density needs further thinking to decide which kind of edges should be quantified, and at what scale. At 10m, the indicators might be more influenced by artefacts. At 50m, the indicators might ignore important small patches.
13741373

1375-
- The OSO data for year 2016-2017 use different classes and crops are grouped into only two classes: `cultures d'été` and `culture d'hiver`. This might artificially inflate the crop rotations (changes in land cover due to changes in GIS methodology instead of changes in crop practices) and it could potentially impact all indicators. Yet it is quite important to get *older* historical land cover.
1374+
- The OSO data for year 2016-2017 use different classes, e.g. crops are grouped into only two classes: `cultures d'été` and `culture d'hiver`. This might artificially inflate crop rotations (changes in land cover due to changes in GIS methodology instead of changes in crop practices) and it could potentially impact all indicators. Yet it is important to use *older* land cover if we want to characterize crop rotations on multiple years.
13761375

1377-
- We could add `RPG complété` in the land cover rasters, but that might create discrepancies among classes and it would require more care in the class homogeneization step.
1376+
- We could add `RPG complété` in the land cover rasters, but that might create discrepancies among classes and it would require additional care in the class homogeneization step.
13781377

0 commit comments

Comments
 (0)