Une mise-à-jour est prévue le 9 juillet entre 13:00 et 14:00. Le service sera inaccessible ou instable pendant cette période. Merci de votre compréhension.

Commit c8644b08 authored by Boulangeat Isabelle's avatar Boulangeat Isabelle

recompile

parents
.DS_Store
*.xlsx
*.csv
CEPAZ_Zone_Etude_et_ZP/*
Reading data
------------
``` r
library("openxlsx")
datphyto = read.xlsx("releves_phyto_CEPAZ_2013+.xlsx")
head(datphyto)
```
## numchrono rel_dateob libobs1 codeinsee nomcommune codesurfac
## 1 1358514 2017-06-26 SANZ Thomas 5118 VAL-BUECH-MEOUGE NA
## 2 1210462 2016-05-23 GARRAUD Luc 5073 LAZER NA
## 3 1210462 2016-05-23 GARRAUD Luc 5073 LAZER NA
## 4 1210462 2016-05-23 GARRAUD Luc 5073 LAZER NA
## 5 1210462 2016-05-23 GARRAUD Luc 5073 LAZER NA
## 6 1210462 2016-05-23 GARRAUD Luc 5073 LAZER NA
## libsurface rel_surfac rel_altiin rel_altisu codeexposi libexposit codepente
## 1 <NA> 0 930 920 S Sud 1
## 2 <NA> 0 650 640 <NA> <NA> NA
## 3 <NA> 0 650 640 <NA> <NA> NA
## 4 <NA> 0 650 640 <NA> <NA> NA
## 5 <NA> 0 650 640 <NA> <NA> NA
## 6 <NA> 0 650 640 <NA> <NA> NA
## libpente rel_pente idreleve_f codestrate
## 1 de 1/2<U+00B0> <U+00E0> 6<U+00B0> 5 6605415 4
## 2 <NA> 0 6256287 4
## 3 <NA> 0 6256290 4
## 4 <NA> 0 6256298 4
## 5 <NA> 0 6256292 4
## 6 <NA> 0 6256302 4
## libstrate precouvres hauteurstr numtaxon
## 1 Herbac<U+00E9>e 30 0.15 7127
## 2 Herbac<U+00E9>e 100 0.00 7168
## 3 Herbac<U+00E9>e 100 0.00 15654
## 4 Herbac<U+00E9>e 100 0.00 6720
## 5 Herbac<U+00E9>e 100 0.00 41178
## 6 Herbac<U+00E9>e 100 0.00 627
## nom_comple taxref_cd_
## 1 Lathyrus venetus (Miller) Wohlf. 105279
## 2 Lotus dorycnium L., 1753 106664
## 3 Bromus erectus Hudson 86601
## 4 Argyrolobium zanonii (Turra) P.W. Ball 83722
## 5 Pilosella officinarum F.W.Schultz & Sch.Bip., 1862 113525
## 6 Seseli galloprovinciale Reduron [1993] 123023
## nom_comp_1 taxref_c_1
## 1 Lathyrus venetus (Mill.) Wohlf., 1892 105279
## 2 Lotus dorycnium L., 1753 106664
## 3 Bromus erectus Huds., 1762 86512
## 4 Argyrolobium zanonii (Turra) P.W.Ball, 1968 83722
## 5 Pilosella officinarum F.W.Schultz & Sch.Bip., 1862 113525
## 6 Seseli galloprovinciale Reduron, 1993 123023
## nom_comp_2 codeabonda codestra_1
## 1 Lathyrus venetus (Mill.) Wohlf., 1892 1 50
## 2 Lotus dorycnium L., 1753 1 41
## 3 Bromopsis erecta (Huds.) Fourr., 1869 + 41
## 4 Argyrolobium zanonii (Turra) P.W.Ball, 1968 + 41
## 5 Pilosella officinarum F.W.Schultz & Sch.Bip., 1862 1 41
## 6 Seseli galloprovinciale Reduron, 1993 + 41
## libstrater
## 1 Observation valide
## 2 Observation plausible <U+00E0> la commune
## 3 Observation plausible <U+00E0> la commune
## 4 Observation plausible <U+00E0> la commune
## 5 Observation plausible <U+00E0> la commune
## 6 Observation plausible <U+00E0> la commune
## rel_milieu
## 1 Ch<U+00EA>naie pubescente <U+00E0> Lathyrus venetus
## 2 Pelouse sur calcaire <U+00E0> aphyllanthes et Stipa hispanica de replat h<U+00E9>lio-x<U+00E9>ro-h<U+00E9>liophile thermophile
## 3 Pelouse sur calcaire <U+00E0> aphyllanthes et Stipa hispanica de replat h<U+00E9>lio-x<U+00E9>ro-h<U+00E9>liophile thermophile
## 4 Pelouse sur calcaire <U+00E0> aphyllanthes et Stipa hispanica de replat h<U+00E9>lio-x<U+00E9>ro-h<U+00E9>liophile thermophile
## 5 Pelouse sur calcaire <U+00E0> aphyllanthes et Stipa hispanica de replat h<U+00E9>lio-x<U+00E9>ro-h<U+00E9>liophile thermophile
## 6 Pelouse sur calcaire <U+00E0> aphyllanthes et Stipa hispanica de replat h<U+00E9>lio-x<U+00E9>ro-h<U+00E9>liophile thermophile
## codetypeca libtypecar longitudel latitudel9 imprecisio codeloc_et
## 1 P Points 923445.5 6354565 10 10
## 2 P Points 927516.8 6363184 10 10
## 3 P Points 927516.8 6363184 10 10
## 4 P Points 927516.8 6363184 10 10
## 5 P Points 927516.8 6363184 10 10
## 6 P Points 927516.8 6363184 10 10
## libloc_eta CODE
## 1 Localisation pr<U+00E9>cise ZP0500502
## 2 Localisation pr<U+00E9>cise ZP0507305
## 3 Localisation pr<U+00E9>cise ZP0507305
## 4 Localisation pr<U+00E9>cise ZP0507305
## 5 Localisation pr<U+00E9>cise ZP0507305
## 6 Localisation pr<U+00E9>cise ZP0507305
``` r
library(rgdal)
```
## Loading required package: sp
## rgdal: version: 1.4-4, (SVN revision 833)
## Geospatial Data Abstraction Library extensions to R successfully loaded
## Loaded GDAL runtime: GDAL 2.4.2, released 2019/06/28
## Path to GDAL shared files: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rgdal/gdal
## GDAL binary built with GEOS: FALSE
## Loaded PROJ.4 runtime: Rel. 5.2.0, September 15th, 2018, [PJ_VERSION: 520]
## Path to PROJ.4 shared files: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rgdal/proj
## Linking to sp version: 1.3-1
``` r
polyZone = readOGR("CEPAZ_Zone_Etude_et_ZP", "CEPAZ_Zones_Pastorales")
```
## OGR data source with driver: ESRI Shapefile
## Source: "/Users/isabelleboulangeat/Documents/PROJETS/(CEPAZ)/CEPAZ_Zone_Etude_et_ZP", layer: "CEPAZ_Zones_Pastorales"
## with 5084 features
## It has 48 fields
## Integer64 fields read as strings: Join_Count TARGET_FID ORIG_FID
``` r
head(polyZone@data)
```
## Join_Count TARGET_FID CODE INSEEDEP INSEECOM NOM1 NOM2 SURFACE
## 0 1 0 ZP0405001 04 04050 LES MAYOLS MAYOLS 221.82
## 1 1 1 ZP0405002 04 04050 LES JAUMES <NA> 403.12
## 2 1 2 ZP0405701 04 04057 CLOT GARCIN <NA> 143.60
## 3 1 3 ZP0405702 04 04057 LES GRAVES <NA> 129.17
## 4 1 4 ZP0405703 04 04057 BANE <NA> 65.45
## 5 1 5 ZP0405704 04 04057 ROUAST <NA> 29.38
## SURF_MNT ETAGE_ALT PROP_TYPE1 PROP_REG USAGE MOTIF TRAITE
## 0 228.56 PM COM N O <NA> N
## 1 425.98 PM COM N O <NA> N
## 2 153.11 PM COM N O <NA> N
## 3 135.37 PM COM N O <NA> N
## 4 70.25 PM COM N N probl\303\250mes fonciers N
## 5 30.97 PM COM N O <NA> N
## TRANSFORM PHAE MAE SURF_MAE ANNEE_REF SOURCE ID_SOURCE AUT_SOURCE PROP_TYPE2
## 0 N N N 0 2012 CERPAM <NA> <NA> PRI
## 1 N N N 0 2012 CERPAM <NA> <NA> PRI
## 2 N N N 0 2012 CERPAM <NA> <NA> PRI
## 3 N N N 0 2012 CERPAM <NA> <NA> PRI
## 4 N N N 0 2012 CERPAM <NA> <NA> PRI
## 5 N N N 0 2012 CERPAM <NA> <NA> PRI
## PROP_TYPE3 DERN_USAGE EXPLOIT TYPE1 TYPE2 TYPE3 PRINTEMPS ETE AUTOMNE HIVER
## 0 N <NA> 1 OA <NA> <NA> O O O N
## 1 N <NA> 1 EQ <NA> <NA> O O O O
## 2 N <NA> 1 OA <NA> <NA> O O O O
## 3 N <NA> 0 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
## 4 N 2009 0 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
## 5 N <NA> 1 AB <NA> <NA> O O N N
## EF_OV_15J EF_CA_15J EF_VL_15J EF_AB_15J EF_EQ_15J CH_MAX_OV CH_MAX_CA
## 0 250 0 0 0 0 250 0
## 1 0 0 0 0 15 0 0
## 2 300 0 0 0 0 300 0
## 3 0 0 0 0 0 0 0
## 4 0 0 0 0 0 0 0
## 5 25 0 0 0 0 0 0
## CH_MAX_VL CH_MAX_AB CH_MAX_EQ DFCI MILIEU ENQUETEUR ORIG_FID
## 0 0 0 0 N L DB 0
## 1 0 0 15 N L DB 0
## 2 0 0 0 N D DB 0
## 3 0 0 0 N H DB 0
## 4 0 0 0 N L DB 0
## 5 0 0 0 N H DB 0
``` r
nrow(polyZone@data)
```
## [1] 5084
``` r
tabZP = read.csv2("ZP_table.csv", encoding = "UTF-8")
head(tabZP)
```
## X.U.FEFF.CODE INSEEDEP INSEECOM NOM1 NOM2 SURFACE SURF_MNT ETAGE_ALT
## 1 ZP0405001 4 4050 LES MAYOLS MAYOLS 221.82 228.56 PM
## 2 ZP0405002 4 4050 LES JAUMES 403.12 425.98 PM
## 3 ZP0405701 4 4057 CLOT GARCIN 143.60 153.11 PM
## 4 ZP0405702 4 4057 LES GRAVES 129.17 135.37 PM
## 5 ZP0405703 4 4057 BANE 65.45 70.25 PM
## 6 ZP0405704 4 4057 ROUAST 29.38 30.97 PM
## PROP_TYPE1 PROP_REG USAGE MOTIF TRAITE TRANSFORM
## 1 COM N O N N
## 2 COM N O N N
## 3 COM N O N N
## 4 COM N O N N
## 5 COM N N probl<U+251C><U+00BF>mes fonciers N N
## 6 COM N O N N
## PHAE MAE SURF_MAE ANNEE_REF SOURCE ID_SOURCE AUT_SOURCE PROP_TYPE2 PROP_TYPE3
## 1 N N 0 2012 CERPAM PRI N
## 2 N N 0 2012 CERPAM PRI N
## 3 N N 0 2012 CERPAM PRI N
## 4 N N 0 2012 CERPAM PRI N
## 5 N N 0 2012 CERPAM PRI N
## 6 N N 0 2012 CERPAM PRI N
## DERN_USAGE EXPLOIT TYPE1 TYPE2 TYPE3 PRINTEMPS ETE AUTOMNE HIVER EF_OV_15J
## 1 NA 1 OA O O O N 250
## 2 NA 1 EQ O O O O 0
## 3 NA 1 OA O O O O 300
## 4 NA 0 0
## 5 2009 0 0
## 6 NA 1 AB O O N N 25
## EF_CA_15J EF_VL_15J EF_AB_15J EF_EQ_15J CH_MAX_OV CH_MAX_CA CH_MAX_VL
## 1 0 0 0 0 250 0 0
## 2 0 0 0 15 0 0 0
## 3 0 0 0 0 300 0 0
## 4 0 0 0 0 0 0 0
## 5 0 0 0 0 0 0 0
## 6 0 0 0 0 0 0 0
## CH_MAX_AB CH_MAX_EQ DFCI MILIEU ENQUETEUR ORIG_FID
## 1 0 0 N L DB 0
## 2 0 15 N L DB 0
## 3 0 0 N D DB 0
## 4 0 0 N H DB 0
## 5 0 0 N L DB 0
## 6 0 0 N H DB 0
``` r
colnames(tabZP)[1] = "CODE"
nrow(tabZP)
```
## [1] 5084
``` r
status = read.xlsx("stat_taxons_zp_statuts.xlsx")
head(status)
```
## numtaxon nom_cbna
## 1 40496 Acer campestre L., 1753
## 2 10912 Agrimonia eupatoria L.
## 3 15467 Anthoxanthum odoratum L. subsp. odoratum
## 4 6684 Anthyllis vulneraria L.
## 5 4948 Arenaria serpyllifolia L.
## 6 15482 Arrhenatherum elatius (L.) P. Beauv. ex J. & C. Presl subsp. elatius
## cd_nom nom_comple
## 1 79734 Acer campestre L., 1753
## 2 80410 Agrimonia eupatoria L., 1753
## 3 131447 Anthoxanthum odoratum subsp. odoratum L., 1753
## 4 82999 Anthyllis vulneraria L., 1753
## 5 9999993 Zz Attente rattachement
## 6 131693 Arrhenatherum elatius (L.) P.Beauv. ex J. & C.Presl subsp. elatius
## cd_ref nom_valid
## 1 79734 Acer campestre L., 1753
## 2 80410 Agrimonia eupatoria L., 1753
## 3 82922 Anthoxanthum odoratum L., 1753
## 4 82999 Anthyllis vulneraria L., 1753
## 5 9999993 Zz Attente rattachement
## 6 131693 Arrhenatherum elatius (L.) P.Beauv. ex J. & C.Presl subsp. elatius
## CODE dep reg _min _max _count DHA2 DHAIV DHAV PRNA1 PRNA2 PRPAC PRRH
## 1 ZP0123901 01 RA 2014 2014 1 NA NA NA NA NA NA NA
## 2 ZP0123901 01 RA 2014 2014 1 NA NA NA NA NA NA NA
## 3 ZP0123901 01 RA 2014 2014 1 NA NA NA NA NA NA NA
## 4 ZP0123901 01 RA 2014 2014 1 NA NA NA NA NA NA NA
## 5 ZP0123901 01 RA 2014 2014 1 NA NA NA NA NA NA NA
## 6 ZP0123901 01 RA 2014 2014 1 NA NA NA NA NA NA NA
## PR01 PR04 PR05 PR38 PR74 lr_fr lr_paca lr_ra
## 1 NA NA NA NA NA LC <NA> LC
## 2 NA NA NA NA NA LC <NA> LC
## 3 NA NA NA NA NA LC <NA> LC
## 4 NA NA NA NA NA LC <NA> LC
## 5 NA NA NA NA NA <NA> <NA> <NA>
## 6 NA NA NA NA NA LC <NA> <NA>
``` r
nrow(status)
```
## [1] 167133
Taille des ZP représentées
--------------------------
``` r
library(dplyr)
```
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
``` r
library(ggplot2)
# taille des ZP représentées
tabZP_phyto = merge(tabZP, datphyto, by = "CODE", all=FALSE)
tabZP_phyto$dataset = "phyto"
tabZP_points = merge(tabZP, status, by = "CODE", all=FALSE)
tabZP_points$dataset = "points"
tabZP$dataset = "all"
selectCol = c("CODE", "dataset", "SURFACE")
rbind(tabZP_phyto[, selectCol], tabZP_points[, selectCol], tabZP[, selectCol]) %>%
ggplot(aes(SURFACE, fill=dataset, colour = dataset, stat(density))) +
geom_histogram(alpha=0.2, position = "identity")
```
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
![](exploration_files/figure-markdown_github/ZP_size-1.png)
Simple stats
------------
``` r
# nb ZP où il y a (au moins) un releve phyto
length(unique(datphyto$CODE))
```
## [1] 104
``` r
# nombre de releve phyto par ZP
zp_releve = datphyto %>% group_by(CODE) %>% summarise(n = length(unique(numchrono)))
summary(zp_releve$n)
```
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 1.000 2.000 4.788 5.000 69.000
``` r
# nb de ZP où il y a (au moins) une observation d'espece
length(unique(status$CODE))
```
## [1] 2422
``` r
# années 1ere et derniere observations
summary(status$`_min`)
```
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1783 1996 2004 1999 2008 2019
``` r
summary(status$`_max`)
```
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1783 1998 2006 2001 2010 2019
``` r
# couper à 2013 (pour avoir la même donnée que les relevés phyto)
status2013 = status[which(status$`_max`>=2013),]
length(unique(status2013$CODE))
```
## [1] 742
Diversité alpha des ZP
======================
``` r
# nombre d'especes par ZP, par observations points
zp_espece = status2013 %>% group_by(CODE) %>% summarise(sp_richness = length(unique(numtaxon)))
summary(zp_espece$sp_richness)
```
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.00 3.00 9.00 29.44 36.00 323.00
``` r
# nombre d'especes par ZP, par releves phyto
zp_espece_phyto = datphyto %>% group_by(CODE) %>% summarise(sp_richness_phyto = length(unique(numtaxon)))
summary(zp_espece_phyto$sp_richness_phyto)
```
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.00 23.00 41.50 53.95 66.25 288.00
``` r
# comparaison des 2 jeux de données
zp_espece.all = merge(zp_espece, zp_espece_phyto, all.x=TRUE, all.y = TRUE, by = "CODE")
head(zp_espece.all)
```
## CODE sp_richness sp_richness_phyto
## 1 ZP0123901 40 NA
## 2 ZP0126801 9 NA
## 3 ZP0400403 1 NA
## 4 ZP0400501 1 NA
## 5 ZP0400802 64 NA
## 6 ZP0401601 184 NA
``` r
nrow(zp_espece.all)==length(unique(status2013$CODE))
```
## [1] TRUE
``` r
zp_espece.all %>%
ggplot(aes(sp_richness, sp_richness_phyto)) +
geom_point(shape=19) +
geom_smooth() +
geom_abline(intercept = 0, slope=1)
```
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## Warning: Removed 638 rows containing non-finite values (stat_smooth).
## Warning: Removed 638 rows containing missing values (geom_point).
![](exploration_files/figure-markdown_github/diversite_alpha-1.png)
Le jeu de données phytosociologique sous-estime la diversité par rapport au jeu de données d'observations individuelles, surtout pour les niveaux de richesse &gt; 100 espèces.
Analyse par département et milieu
---------------------------------
``` r
zp_espece$dataset = "points"
zp_espece_phyto$dataset = "phyto"
names(zp_espece_phyto)[2] = "sp_richness"
zp_espece.all2 = rbind(zp_espece, zp_espece_phyto)
dat_div = merge(tabZP[,-which(colnames(tabZP)=="dataset")], zp_espece.all2, by="CODE", all.x=TRUE)
head(dat_div)
```
## CODE INSEEDEP INSEECOM NOM1 NOM2 SURFACE
## 1 ZP0113301 1 1133 MONTOULVET BOIS_DES_COMBES 9.04
## 2 ZP0113302 1 1133 LA_RIVOIR PARISSIEUX 11.52
## 3 ZP0113303 1 1133 LE_PONT 6.40
## 4 ZP0123901 1 1239 LA_MAREE CHATENAY 23.10
## 5 ZP0126801 1 1268 GROTTE_DE_LA_BONNE_FEMME COCHET 23.81
## 6 ZP0127101 1 1271 MAGNIN MARNIX 21.35
## SURF_MNT ETAGE_ALT PROP_TYPE1 PROP_REG USAGE MOTIF TRAITE TRANSFORM
## 1 9.41 PC PRI N O N N
## 2 11.86 PC PRI N O N N
## 3 6.40 PC PRI N N CNR_NE_LOUE_PAS
## 4 23.63 PC PRI N O N N
## 5 24.31 PC PRI N O N N
## 6 22.34 PC PRI N O N N
## PHAE MAE SURF_MAE ANNEE_REF SOURCE ID_SOURCE AUT_SOURCE PROP_TYPE2 PROP_TYPE3
## 1 N N 0 2013 CA01 N N
## 2 N N 0 2013 CA01 N N
## 3 N N 0 2013 CA01 N N
## 4 O N 0 2013 SEMA N N
## 5 N N 0 2013 CA01 COM N
## 6 O N 0 2013 CA01 N N
## DERN_USAGE EXPLOIT TYPE1 TYPE2 TYPE3 PRINTEMPS ETE AUTOMNE HIVER EF_OV_15J
## 1 NA 1 AB N N O O O O 0
## 2 NA 2 AB N N O O O N 0
## 3 NA 0 0
## 4 NA 2 VL AB N O N O N 0
## 5 NA 1 VL AB N O O O N 0
## 6 NA 3 AB N N O O O N 0
## EF_CA_15J EF_VL_15J EF_AB_15J EF_EQ_15J CH_MAX_OV CH_MAX_CA CH_MAX_VL
## 1 0 0 40 0 0 0 0
## 2 0 0 28 0 0 0 0
## 3 0 0 0 0 0 0 0
## 4 0 0 0 0 0 0 37
## 5 0 50 15 0 0 0 50
## 6 0 0 20 0 0 0 0
## CH_MAX_AB CH_MAX_EQ DFCI MILIEU ENQUETEUR ORIG_FID sp_richness dataset
## 1 40 0 N B MH 0 NA <NA>
## 2 28 0 N H MH 0 NA <NA>
## 3 0 0 N L MH 0 NA <NA>
## 4 60 0 N L MH 0 40 points
## 5 15 0 N H MH 0 9 points
## 6 55 0 N H MH 0 NA <NA>
``` r
dat_div %>%
ggplot(aes(MILIEU, sp_richness, fill = dataset)) +
geom_boxplot(notch=TRUE) +
stat_boxplot(na.rm=TRUE) +
ylim(0,100)
```
## Warning: Removed 4419 rows containing non-finite values (stat_boxplot).
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
![](exploration_files/figure-markdown_github/diversity_groups-1.png)
``` r
dat_div %>% group_by(MILIEU) %>%
ggplot(aes(MILIEU, sp_richness, fill = dataset)) +
geom_boxplot(notch=TRUE) +
stat_boxplot(na.rm=TRUE) +
ylim(0,100) +
facet_wrap(~INSEEDEP)
```
## Warning: Removed 4419 rows containing non-finite values (stat_boxplot).
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
## notch went outside hinges. Try setting notch=FALSE.
![](exploration_files/figure-markdown_github/diversity_groups-2.png)
Statut des espèces des ZP
=========================
Nombre et proportion d'espèces liste rouge parmi les espèces relevées Rappel: Eteinte (EX), Eteinte à l’état sauvage (EW), En danger critique (CR), En danger (EN), Vulnérable (VU), Quasi menacée (NT), Préoccupation mineure (LC), Données insuffisantes (DD), Non évaluée (NE).
``` r
sp_phyto = unique(datphyto$numtaxon)
length(sp_phyto)
```
## [1] 1256
``` r
sp_points = unique(status2013$numtaxon)
length(sp_points)
```
## [1] 2146
``` r
length(unique(status$numtaxon))
```
## [1] 3239
``` r
table(unique(status2013[, c("numtaxon", "lr_fr")])$lr_fr)
```
##
## DD EN LC NT VU
## 33 4 1628 28 4
``` r
status_phyto= status[which(status$numtaxon %in% datphyto$numtaxon),]
length(unique(status_phyto$numtaxon)) == length(unique(datphyto$numtaxon))
```
## [1] FALSE
``` r
# attention 3 especes n'ont pas de statut attribué
table(unique(status_phyto[, c("numtaxon", "lr_fr")])$lr_fr)
```
##
## DD LC NT VU
## 13 1081 6 2
On voit bien que les observations ponctuelles répertorient plus d'espèces vulnérables.
---
title: "EXPLORATION HABITATS CEPAZ"
author: "Isabelle Boulangeat"
date: "22/01/2020"
output:
md_document:
variant: markdown_github
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Reading data
```{r load_data}
library("openxlsx")
datphyto = read.xlsx("releves_phyto_CEPAZ_2013+.xlsx")
head(datphyto)
library(rgdal)
polyZone = readOGR("CEPAZ_Zone_Etude_et_ZP", "CEPAZ_Zones_Pastorales")
head(polyZone@data)
nrow(polyZone@data)
tabZP = read.csv2("ZP_table.csv", encoding = "UTF-8")
head(tabZP)
colnames(tabZP)[1] = "CODE"
nrow(tabZP)
status = read.xlsx("stat_taxons_zp_statuts.xlsx")
head(status)
nrow(status)
```
## Taille des ZP repr??sent??es
```{r ZP_size, fig=TRUE}
library(dplyr)
library(ggplot2)
# taille des ZP repr??sent??es
tabZP_phyto = merge(tabZP, datphyto, by = "CODE", all=FALSE)
tabZP_phyto$dataset = "phyto"
tabZP_points = merge(tabZP, status, by = "CODE", all=FALSE)
tabZP_points$dataset = "points"
tabZP$dataset = "all"
selectCol = c("CODE", "dataset", "SURFACE")
rbind(tabZP_phyto[, selectCol], tabZP_points[, selectCol], tabZP[, selectCol]) %>%
ggplot(aes(SURFACE, fill=dataset, colour = dataset, stat(density))) +
geom_histogram(alpha=0.2, position = "identity")
```
## Simple stats
```{r simple_statistiques}
# nb ZP o?? il y a (au moins) un releve phyto
length(unique(datphyto$CODE))
# nombre de releve phyto par ZP
zp_releve = datphyto %>% group_by(CODE) %>% summarise(n = length(unique(numchrono)))
summary(zp_releve$n)
# nb de ZP o?? il y a (au moins) une observation d'espece
length(unique(status$CODE))
# ann??es 1ere et derniere observations
summary(status$`_min`)
summary(status$`_max`)
# couper ?? 2013 (pour avoir la m??me donn??e que les relev??s phyto)
status2013 = status[which(status$`_max`>=2013),]
length(unique(status2013$CODE))
```
# Diversit?? alpha des ZP
```{r diversite_alpha, fig=TRUE}
# nombre d'especes par ZP, par observations points
zp_espece = status2013 %>% group_by(CODE) %>% summarise(sp_richness = length(unique(numtaxon)))
summary(zp_espece$sp_richness)
# nombre d'especes par ZP, par releves phyto
zp_espece_phyto = datphyto %>% group_by(CODE) %>% summarise(sp_richness_phyto = length(unique(numtaxon)))
summary(zp_espece_phyto$sp_richness_phyto)
# comparaison des 2 jeux de donn??es
zp_espece.all = merge(zp_espece, zp_espece_phyto, all.x=TRUE, all.y = TRUE, by = "CODE")
head(zp_espece.all)
nrow(zp_espece.all)==length(unique(status2013$CODE))
zp_espece.all %>%
ggplot(aes(sp_richness, sp_richness_phyto)) +
geom_point(shape=19) +
geom_smooth() +
geom_abline(intercept = 0, slope=1)
```
Le jeu de donn??es phytosociologique sous-estime la diversit?? par rapport au jeu de donn??es d'observations individuelles, surtout pour les niveaux de richesse > 100 esp??ces.
## Analyse par d??partement et milieu
```{r diversity_groups, fig=TRUE}
zp_espece$dataset = "points"
zp_espece_phyto$dataset = "phyto"
names(zp_espece_phyto)[2] = "sp_richness"
zp_espece.all2 = rbind(zp_espece, zp_espece_phyto)
dat_div = merge(tabZP[,-which(colnames(tabZP)=="dataset")], zp_espece.all2, by="CODE", all.x=TRUE)
head(dat_div)
dat_div %>%
ggplot(aes(MILIEU, sp_richness, fill = dataset)) +
geom_boxplot(notch=TRUE) +
stat_boxplot(na.rm=TRUE) +
ylim(0,100)
dat_div %>% group_by(MILIEU) %>%
ggplot(aes(MILIEU, sp_richness, fill = dataset)) +
geom_boxplot(notch=TRUE) +
stat_boxplot(na.rm=TRUE) +
ylim(0,100) +
facet_wrap(~INSEEDEP)
```
# Statut des esp??ces des ZP
Nombre et proportion d'esp??ces liste rouge parmi les esp??ces relev??es
Rappel: Eteinte (EX), Eteinte ?? l?????tat sauvage (EW), En danger critique (CR), En danger (EN), Vuln??rable (VU), Quasi menac??e (NT), Pr??occupation mineure (LC), Donn??es insuffisantes (DD), Non ??valu??e (NE).
```{r status_especes}
sp_phyto = unique(datphyto$numtaxon)
length(sp_phyto)
sp_points = unique(status2013$numtaxon)
length(sp_points)
length(unique(status$numtaxon))
table(unique(status2013[, c("numtaxon", "lr_fr")])$lr_fr)
status_phyto= status[which(status$numtaxon %in% datphyto$numtaxon),]
length(unique(status_phyto$numtaxon)) == length(unique(datphyto$numtaxon))
# attention 3 especes n'ont pas de statut attribu??
table(unique(status_phyto[, c("numtaxon", "lr_fr")])$lr_fr)
```
On voit bien que les observations ponctuelles r??pertorient plus d'esp??ces vuln??rables.
Markdown is supported
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