Returns the raw data source habitatquarries as an sf polygon layer in the Belgian Lambert 72 CRS (EPSG-code 31370). Optionally, associated bibliographic references can be returned (arguments references or bibtex).

read_habitatquarries(
  file = file.path(locate_n2khab_data(), "10_raw/habitatquarries/habitatquarries.gpkg"),
  filter_hab = FALSE,
  references = FALSE,
  bibtex = FALSE,
  version = "habitatquarries_2020v1"
)

Arguments

file

The absolute or relative file path of the data source. The default follows the data management advice in the vignette on data storage (run vignette("v020_datastorage")). It uses the first n2khab_data folder that is found when sequentially climbing up 0 to 10 levels in the file system hierarchy, starting from the working directory.

filter_hab

If TRUE, only polygons with (known) habitat 8310 are returned.

references

If TRUE, a list is returned with both the sf object (element habitatquarries) and a data frame of bibliographic references (element extra_references).

bibtex

If TRUE, all that happens is bibliographic references being printed to the console, formatted for usage in a BibTeX file (*.bib).

version

Version ID of the data source. Defaults to the latest available version defined by the package.

Value

Depending on the arguments, one of:

  • a simple feature collection of type POLYGON, with attribute variables:

    • polygon_id: a unique number per polygon.

    • unit_id: a unique number for each quarry unit. Quarry units consisting of several polygons (= partly outside the Flemish region) have a number greater than or equal to 100.

    • name: site name.

    • code_orig: original 'habitattype' code in the raw data source habitatquarries.

    • type: habitat type listed in types - in this case either 8310 or missing (NA).

    • extra_reference: site-specific bibliographic reference(s). Values refer to rows in the non-spatial data frame extra_references.

  • if references = TRUE: a list with both the sf object (element habitatquarries) and a data frame of bibliographic references (element extra_references).

  • if bibtex = TRUE: NULL (invisibly).

Details

The data source habitatquarries is a GeoPackage, available at Zenodo, that contains:

  • habitatquarries: a spatial polygon layer that corresponds with the presence or absence of the Natura 2000 Annex I habitat type 8310 (Caves not open to the public) in the Flemish Region (and border areas), Belgium;

  • extra_references: a non-spatial table of site-specific bibliographic references.

In general, different polygons represent different quarry units with their own internal climatic environment. Units that cross Flemish borders have been split into separate polygons. Exceptionally they may overlap if such units are situated above each other.

Examples

if (FALSE) {
# This example supposes that your working directory or a directory up to 10
# levels above has the 'n2khab_data' folder AND that the latest version of
# the 'habitatquarries'
# data source is present in the default subdirectory.
# In all other cases, this example won't work but at least you can
# consider what to do.

hq <- read_habitatquarries()
hq
hq2 <- read_habitatquarries(filter_hab = TRUE)
hq2
hq3 <- read_habitatquarries(references = TRUE)
hq3
read_habitatquarries(bibtex = TRUE)
}