options(stringsAsFactors = FALSE) knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(n2khab)
With reference lists we mean complete and authorative lists of all items or categories that constitute some collection. Their purpose is typically to promote standardization and thereby to ease collaborative work.
The n2khab
package provides the following built-in reference lists,
relevant to N2KHAB projects [^N2KHAB]:
types
: checklist of types (habitat (sub)types and regionally important biotopes) (documentation links: this website / installed package),
represented by their current codesenv_pressures
: checklist of environmental pressures, represented by codes (documentation links: this website / installed package)Additionally, namelist
provides names and (optionally) shortnames for IDs/codes used in the above lists (documentation links: this website / installed package).
[^N2KHAB]: With N2KHAB projects, we mean scientific monitoring programmes and research projects regarding Flemish Natura 2000 habitats and regionally important biotopes (RIBs).
Beside enlisting all items, the reference lists provide additional information on them, sometimes in a generic way with variables like 'attribute_1', 'attribute_2', 'tag_1' and so on (explained in the documentation files). This information may be of a defining nature (and obligate), or may just provide useful categories and tags to filter by.
Reading functions of the n2khab
package return the reference lists as tibbles, with appropriate text from namelist
added.
A tibble is a data frame that makes working in the tidyverse a little easier.
In the data source on disk, each item envisaged by a reference list is always represented by a code (sometimes a combination of two codes) -- not a name. The same approach is often followed for other attributes (use of codes, not names or descriptions). However for some variables English has been used directly in the data source.
The splitting between code and explanatory names, shortnames and other language-dependent text made it possible to store the latter in multiple languages in namelist
, in the variables name
and shortname
.
Currently, this list systematically provides English and Dutch text for each code. This can be extended in future versions of the package (not necessarily in a systematic way).
Making the types
reference list available in the R environment is as easy as:
read_types()
By default, English is used. But, you can also choose to get a tibble in another language:
read_types(lang = "nl")
The lang
argument is available in the below functions as well.
env_pressures
is made available with:
read_env_pressures()
When actually using these reading functions, you will -- of course -- assign its result to an object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.