Title: | Package for downloading, querying and processing of Natura 2000 data |
---|---|
Description: | This package provides functionalities to download, process and visualize Natura 2000 data. Functions allow the filtering, conversion and exporting of critical habitat and species data. |
Authors: | Martin Jung [aut, cre] |
Maintainer: | Martin Jung <[email protected]> |
License: | CC BY 4.0 + file LICENSE |
Version: | 0.1 |
Built: | 2025-02-11 04:16:25 UTC |
Source: | https://github.com/iiasa/rN2000 |
A grid of Europe at 100-km resolution in EPSG 3035. Based on FAO GAUL level 0 boundary polygons.
europe_100km
europe_100km
A sf
polygon.
code for individual cells
distance East of the data origin(centroid) in m
distance North of the data origin(centroid) in m
European Environment Agency (EEA)
https://www.eea.europa.eu/data-and-maps/data/eea-reference-grids-2
A grid of Europe at 10-km resolution in EPSG 3035. Based on FAO GAUL level 0 boundary polygons.
europe_10km
europe_10km
A sf
polygon.
code for individual cells
distance East of the data origin(centroid) in m
distance North of the data origin(centroid) in m
European Environment Agency (EEA)
https://www.eea.europa.eu/data-and-maps/data/eea-reference-grids-2
Natural Earth data at scale = 110
for countries within a European Bounding Box. Obtained through the rnaturalearth
package at scale = 110
. Reprojected to ETRS89-extended / LAEA Europe
and clipped to a bounding box around Europe using the internal N2000:::get_EuropeanCountries()
function.
europe_countries_lowres
europe_countries_lowres
sf
polygons.
Natural Earth
https://www.naturalearthdata.com/downloads/
Natural Earth data at scale = 50
for countries within a European Bounding Box. Obtained through the rnaturalearth
package at scale = 50
. Reprojected to ETRS89-extended / LAEA Europe
and clipped to a bounding box around Europe using the internal N2000:::get_EuropeanCountries()
function.
europe_countries_midres
europe_countries_midres
sf
polygons.
Natural Earth
https://www.naturalearthdata.com/downloads/
Create a habitat subset from the Natura 2000 data
n2000_filterHabitats(x, name)
n2000_filterHabitats(x, name)
x |
The |
name |
The |
A sf
object with the Natura 2000 sites containing this habitat
Martin Jung
Matt Lewis
## Not run: n2000_filterHabitats('/filepath/Natura2000_end2019.gpkg', name = 'Mountain hay meadows') ## End(Not run)
## Not run: n2000_filterHabitats('/filepath/Natura2000_end2019.gpkg', name = 'Mountain hay meadows') ## End(Not run)
Create a species subset from the Natura 2000 data
n2000_filterSpecies(x, name, option, check.name = F)
n2000_filterSpecies(x, name, option, check.name = F)
x |
The |
name |
The |
option |
The |
check.name |
|
A sf
object with the Natura 2000 sites containing this species
Martin Jung
Matt Lewis
## Not run: n2000_filterSpecies('/filepath/Natura2000_end2019.gpkg', name = 'Asio otus') ## End(Not run)
## Not run: n2000_filterSpecies('/filepath/Natura2000_end2019.gpkg', name = 'Asio otus') ## End(Not run)
Load and reformat Natura 2000 definitions to a list.
n2000_format_definitions(x)
n2000_format_definitions(x)
x |
A ['character'] file path to the Natura 2000 data definitions file. |
Matt Lewis
Martin Jung
Uses the taxize
package to look-up and (hopefully) fix incorrect species names.
n2000_format_species(x, overwrite = T, verbose = F, ...)
n2000_format_species(x, overwrite = T, verbose = F, ...)
x |
A |
overwrite |
A |
verbose |
A |
... |
Other parameters passed on to |
Matt Lewis
Set or download the N2000 database in csv format to a given folder
n2000_getCSV( folder, year = "2019", force = FALSE, nlink = "https://www.eea.europa.eu/data-and-maps/data/natura-11/natura-2000-tabular-data-12-tables/natura-2000-comma-separated-values-files/at_download/file" )
n2000_getCSV( folder, year = "2019", force = FALSE, nlink = "https://www.eea.europa.eu/data-and-maps/data/natura-11/natura-2000-tabular-data-12-tables/natura-2000-comma-separated-values-files/at_download/file" )
folder |
A ['character'] directory path to download the Natura 2000 data set to. Automatic checks to see if the data already exist in the folder (can be overridden by specifying 'force = T'). |
year |
(optional). The ['character'] year version of the Natura 2000 data set to check if it already exists. Defaults to the most recently available version (2019). |
force |
(optional). ['logical'] should a new download be forced even if data already exists in the directory? Defaults to 'FALSE'. |
nlink |
(normally not altered). The ['character'] direct download link for Natura 2000. |
Martin Jung
Matt Lewis
## Not run: n2000_getCSV(folder = 'myfolder', year = "2019") ## End(Not run)
## Not run: n2000_getCSV(folder = 'myfolder', year = "2019") ## End(Not run)
Download Natura 2000 definitions
n2000_getDefinitions( folder, year = "2019", force = FALSE, nlink = "https://www.eea.europa.eu/data-and-maps/data/natura-11/table-definitions/table-definitions-xls-file/at_download/file" )
n2000_getDefinitions( folder, year = "2019", force = FALSE, nlink = "https://www.eea.europa.eu/data-and-maps/data/natura-11/table-definitions/table-definitions-xls-file/at_download/file" )
folder |
A ['character'] directory path to download the Natura 2000 data definitions to. Automatically checks to see if the data already exist in the folder (can be overridden by specifying 'force = T'). |
year |
(optional). The ['character'] year version of the Natura 2000 data set to check if it already exists. Defaults to the most recently available version (2019). |
force |
(optional). ['logical'] should a new download be forced even if data already exists in the directory? Defaults to 'FALSE'. |
nlink |
(normally not altered). The ['character'] direct download link for Natura 2000 definitions file. |
Matt Lewis
Martin Jung
Set or download the N2000 database in geopackage format to a given folder
n2000_getGPGK( folder, year = "2019", force = FALSE, nlink = "https://cmshare.eea.europa.eu/s/GkqdcbbsYmmBSEQ/download" )
n2000_getGPGK( folder, year = "2019", force = FALSE, nlink = "https://cmshare.eea.europa.eu/s/GkqdcbbsYmmBSEQ/download" )
folder |
A ['character'] directory path to download the Natura 2000 data set to. Automatic checks to see if the data already exist in the folder (can be overridden by specifying 'force = T'). |
year |
(optional). The ['character'] year version of the Natura 2000 data set to check if it already exists. Defaults to the most recently available version (2019). |
force |
(optional). ['logical'] should a new download be forced even if data already exists in the directory? Defaults to 'FALSE'. |
nlink |
(normally not altered). The ['character'] direct download link for Natura 2000. |
Martin Jung
Matt Lewis
## Not run: n2000_getGPKG(folder = 'myfolder', year = "2019") ## End(Not run)
## Not run: n2000_getGPKG(folder = 'myfolder', year = "2019") ## End(Not run)
Extract Natura 2000 site information which overlap specified spatial locations.
n2000_intersect(n2000_file, target_areas, byid = T, enclosed = F)
n2000_intersect(n2000_file, target_areas, byid = T, enclosed = F)
n2000_file |
['character'] or ['object'] The file path to the Natura2000 geopackage. Alternatively the name of the loaded geopackage in the environment. |
target_areas |
['character'] or ['object'] The file path to the spatial polygon(s) for the area of interest. Must be readable by |
byid |
['logical']. Should data be extracted for each target area (TRUE) or should they be merged first (FALSE)? Defaults to TRUE. |
enclosed |
['logical']. Should Natura 2000 sites only be included if they are fully enclosed by the target area? Defaults to FALSE. |
If the CRS of the target_areas
does not match that of the Natura 2000 data, the target_areas
are first reprojected.
Matt Lewis
N.b. This function requires the leaflet
, and leaflet.extras2
packages to be installed and a functioning internet connection.
n2000_mapwms(title = "N2000", clng = NA, clat = NA, czoom = NA)
n2000_mapwms(title = "N2000", clng = NA, clat = NA, czoom = NA)
title |
The [‘character'] title of the WMS layer to be rendered. Options are: ’N2000', 'CDDA', and 'N2000_centroids'. Defaults to 'N2000'. See details. |
clng |
The ['numeric'] centre-point longitude coordinate of the field of view. See details. |
clat |
The ['numeric'] centre-point latitude coordinate of the field of view. See details. |
czoom |
The ['numeric'] zoom level to use. See details. |
‘title' has three options: ’N2000' to render Natura 2000 sites, 'CDDA' to render sites listed on the Common Database on Designated Areas (i.e. nationally designated areas) or 'N2000_centroids' to render only the centroids of the Natura 2000 sites.
The default field of view for either title = "N2000"
or title = "CDDA"
focuses on the Schlosspark in Laxenburg, Austria. This is arbitrary, and does not by any means reflect any biases on the parts of the authors. The default for title = "N2000_centroids"
gives view of most of Europe.
Martin Jung
Matt Lewis
## Not run: n2000_mapwms() ## End(Not run)
## Not run: n2000_mapwms() ## End(Not run)
Wrapper around ggplot
for convenience plotting with optional grid or administrative boundaries. Requires ggplot2
to be installed.
n2000_plot(x, option, borders = "midres", grid = F, sea = T)
n2000_plot(x, option, borders = "midres", grid = F, sea = T)
x |
A |
option |
The |
borders |
(optional) A |
grid |
(optional) A |
sea |
(optional) A |
Matt Lewis
Show N2000 database definitions
n2000_showdefinitions(table = NULL)
n2000_showdefinitions(table = NULL)
table |
(optional). Table of the definitions (optional) |
Martin Jung
## Not run: def_list <- n2000_getdefinitions() def_list$HABITATS ## End(Not run)
## Not run: def_list <- n2000_getdefinitions() def_list$HABITATS ## End(Not run)
Prepares a target species multipolygon feature for modelling using
n2000_SpatialSpecies( species, metric = "pa", abundance_bound = "UPPERBOUND", what = "polygon", ref_grid = "1km" )
n2000_SpatialSpecies( species, metric = "pa", abundance_bound = "UPPERBOUND", what = "polygon", ref_grid = "1km" )
species |
A data.frame obtained via the n2000_filterSpecies function |
metric |
How is biodiversity encoded in the output. As presence only ('po'), presence absence ('pa') or a population estimate ('abundance') |
abundance_bound |
Which estimate to use for metric option 'abundance'. Default is 'UPPERBOUND' |
what |
What should be created. Possible options ('polygon','raster') |
ref_grid |
Which European reference grid to use. Default is '1km' |
A spatial object of the respective species. The
Martin Jung
## Not run: species <- n2000_species('/media/martin/data/EuropeanBiodiversityData/N2000/Natura2000_end2019.gpkg', sname = 'Asio otus') o <- n2000_SpatialSpecies(species, 'Asio_otus', metric = 'pa', what = 'raster' ) plot(o) ## End(Not run)
## Not run: species <- n2000_species('/media/martin/data/EuropeanBiodiversityData/N2000/Natura2000_end2019.gpkg', sname = 'Asio otus') o <- n2000_SpatialSpecies(species, 'Asio_otus', metric = 'pa', what = 'raster' ) plot(o) ## End(Not run)
Get list of unique habitat names from Natura 2000 checklists
n2000_unique_habitats(x)
n2000_unique_habitats(x)
x |
A [‘character'] directory to the Natura 2000 csv files (i.e. containing ’Natura2000_end2019_HABITATS.csv'). Or a [‘character'] file path to the Natura 2000 geopackage file (’Natura2000_end2019.gpkg'). |
Works with either geopackage (.gpkg) or csv (.csv) file extensions of downloaded data.
If you haven't downloaded the data yet, see 'rN2000::n2000_getCSV()' or 'rN2000::n2000_getGPKG()'
A vector
of habitat names.
Matt Lewis
Get list of unique species names from Natura 2000 checklists
n2000_unique_species(x)
n2000_unique_species(x)
x |
A [‘character'] directory to the Natura 2000 csv files (i.e. containing ’Natura2000_end2019_SPECIES.csv'). Or a [‘character'] file path to the Natura 2000 geopackage file (’Natura2000_end2019.gpkg'). |
Works with either geopackage (.gpkg) or csv (.csv) file extensions of downloaded data.
If you haven't downloaded the data yet, see 'rN2000::n2000_getCSV()' or 'rN2000::n2000_getGPKG()'
A vector
of species binomial names.
Matt Lewis