Commit c8644b08 authored by Boulangeat Isabelle's avatar Boulangeat Isabelle
Browse files

recompile

parents
No related merge requests found
Showing with 149 additions and 0 deletions
+149 -0
.gitignore 0 → 100644
.DS_Store
*.xlsx
*.csv
CEPAZ_Zone_Etude_et_ZP/*
README.md 0 → 100644
This diff is collapsed.
---
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.
exploration_files/figure-markdown_github/ZP_size-1.png

26.2 KB

exploration_files/figure-markdown_github/diversite_alpha-1.png

47.9 KB

exploration_files/figure-markdown_github/diversity_groups-1.png

28.1 KB

exploration_files/figure-markdown_github/diversity_groups-2.png

56.2 KB

Supports Markdown
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