3. Répresentation cartographique des données

source(paste0(wd$src,"functions/cartographie.R"))

# Graine aléatoire
set.seed(12345)
# Importations
Total <- st_read(paste0(wd$data,"Total.shp"))
## Reading layer `Total' from data source 
##   `/home/onyxia/work/AnalyseDonneesOpportunisteGMB/00_Nouveau/data/Total.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 160754 features and 17 fields
## Geometry type: POINT
## Dimension:     XY
## Bounding box:  xmin: -4.791511 ymin: 47.44135 xmax: -1.034921 ymax: 48.88095
## Geodetic CRS:  WGS 84
carte_bretagne <- st_read(paste0(wd$data,"masques/DepartementsOuest/LIM_ADM_DepartementsOuest.shp"))
## Reading layer `LIM_ADM_DepartementsOuest' from data source 
##   `/home/onyxia/work/AnalyseDonneesOpportunisteGMB/00_Nouveau/data/masques/DepartementsOuest/LIM_ADM_DepartementsOuest.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 5 features and 5 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 99074.43 ymin: 6647488 xmax: 408042.6 ymax: 6885958
## Projected CRS: RGF93 v1 / Lambert-93
Total <- transform_Total()
# Carte bretagne

carte_bretagne <- carte_bretagne%>%
  st_set_crs(2154)%>%
  st_transform(4326)


# GeoNature

GN_sf <- Total %>%
  filter(bdd_originale == GN)

grid_sf <- st_sf(geometry = st_make_grid(carte_bretagne, 
                                         cellsize = c(0.12, 0.09))
              )
grid_sf$density <- lengths(st_intersects(grid_sf, GN_sf))
grid_sf <- st_intersection(grid_sf, carte_bretagne)
## Warning: attribute variables are assumed to be spatially constant throughout all
## geometries
ggplot() +
  geom_sf(data = carte_bretagne) + 
  labs(title = "Densité des observations en bretagne",
       subtitle = GN) +
  geom_sf(data = grid_sf, aes(fill = density)) +
  scale_fill_gradient(low="gray97", high="gray15") +
  theme_bw()

# VisioNature

VN_sf <- Total %>%
  filter(bdd_originale == VN)

grid_sf <- st_sf(geometry = st_make_grid(carte_bretagne, 
                                         cellsize = c(0.12, 0.09)))
grid_sf$density <- lengths(st_intersects(grid_sf, VN_sf))
grid_sf <- st_intersection(grid_sf, carte_bretagne)
## Warning: attribute variables are assumed to be spatially constant throughout all
## geometries
ggplot() +
  geom_sf(data = carte_bretagne) + 
  labs(title = "Densité des observations en bretagne",
       subtitle = VN) +
  geom_sf(data = grid_sf, aes(fill = density)) +
  scale_fill_gradient(low="grey97", high="gray15") +
  theme_bw()

Il semble y avoir un lieu avec une forte densité proche de Sizun dans la BDD GeoNature. On remarque aussi que les observations ont lieu surtout au nord-ouest de la Bretagne et au sud entre le Morbihan et l’Ille-et-Vilaine.

Dans VisioNature, on a deux points avec une très forte densité sont probablement dues à nos deux principaux contributeurs (voir la partie 4), nous décidons de les supprimer pour vérifier.

VN_sf_modif <- VN_sf%>%
  filter(!observateurs %in% c("BELLIER DANIEL", "CHAPUIS MARTINE"))

grid_sf <- st_sf(geometry = st_make_grid(carte_bretagne, 
                                         cellsize = c(0.12, 0.09))
)
grid_sf$density <- lengths(st_intersects(grid_sf, VN_sf_modif))
grid_sf <- st_intersection(grid_sf, carte_bretagne)
## Warning: attribute variables are assumed to be spatially constant throughout all
## geometries
ggplot() +
  geom_sf(data = carte_bretagne) + 
  labs(title = "Densité des observations en bretagne",
       subtitle = "VisioNature, sans les deux principaux observateurs") +
  geom_sf(data = grid_sf, aes(fill = density)) +
  scale_fill_gradient(low="grey97", high="gray15") +
  theme_bw()

# Données geographique

GN_sf <- Total%>% 
  dplyr::filter(bdd_originale == GN)%>%
  dplyr::select(ordre, date)

VN_sf <- Total%>% 
  dplyr::filter(bdd_originale == VN)%>%
  dplyr::select(ordre, date)

ordres <- unique(VN_sf$ordre)

grid <- st_make_grid(carte_bretagne, 
                     cellsize = c(0.12, 0.09)) %>%
  st_sf() %>%
  st_set_crs(4326)

# VisioNature
grid_list <- map(ordres, function(o) {
  vis_ord <- VN_sf %>% filter(ordre == o)
  grid_tmp <- grid
  grid_tmp$density <- lengths(st_intersects(grid_tmp, vis_ord))
  grid_tmp$ordre <- o
  grid_tmp
})
grid_sf <- bind_rows(grid_list)
grid_sf <- st_intersection(grid_sf, carte_bretagne)
## Warning: attribute variables are assumed to be spatially constant throughout all
## geometries
ggplot() +
  geom_sf(data = carte_bretagne) + 
  labs(title = "Densité des observations en bretagne selon les ordres",
       subtitle = VN) +
  geom_sf(data = grid_sf, aes(fill = density), color = NA) +
  scale_fill_gradient(low="gray90", high="gray15") +
  theme_bw() +
  facet_grid(. ~ ordre)

# GeoNature
grid_list <- map(ordres, function(o) {
  vis_ord <- GN_sf %>% filter(ordre == o)
  grid_tmp <- grid
  grid_tmp$density <- lengths(st_intersects(grid_tmp, vis_ord))
  grid_tmp$ordre <- o
  grid_tmp
})
grid_sf <- bind_rows(grid_list)
grid_sf <- st_intersection(grid_sf, carte_bretagne)
## Warning: attribute variables are assumed to be spatially constant throughout all
## geometries
ggplot() +
  geom_sf(data = carte_bretagne) + 
  labs(title = "Densité des observations en bretagne selon les ordres",
       subtitle = "GeoNature") +
  geom_sf(data = grid_sf, aes(fill = density), color = NA) +
  scale_fill_gradient(low="gray90", high="gray15") +
  theme_bw() +
  facet_grid(. ~ ordre)

On ne voit pas grand chose sur la carte de VisioNature à part les 2 principaux observateurs.. Concernant la base de données GeoNature, on dirait que les espèces ont un peu près la même répartition en Bretagne (nord Finistere et Côte d’Armor et sud Ille-et-Vilaine et Morbihan)

Nous prenons la base de données avec toutes les données et je selectionne 40 000 ou 50 000 données avec les proportions.

Pour info, la graine aléatoire est figée a 12345.

graph_ordre_tranche_annee("Carnivora")

graph_ordre_tranche_annee("Cetartiodactyla")

graph_ordre_tranche_annee("Eulipotyphla")

graph_ordre_tranche_annee("Lagomorpha")

graph_ordre_tranche_annee("Rodentia")

  On dirait que plus on avance dans les années, plus on retrouve d’individus aux sud de la Bretagne. Ceci peut être car nous avons plus de données de VisioNature au fil du temps qui provient d’ornithologues et les ornithologues sont souvent proches des littoraux.