Overview

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 1:

  • types: checklist of types (habitat (sub)types and regionally important biotopes) (documentation links: this website / installed package), represented by their current codes
  • env_pressures: checklist of environmental pressures, represented by codes (documentation links: this website / installed package)
  • schemes: list of schemes 2 for N2KHAB monitoring programmes or other N2KHAB projects (documentation links: this website / installed package)
  • scheme_types: lists the types that belong to each N2KHAB scheme, and optionally defines typegroups within a scheme (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).

More on list contents and package functionality

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 dataframe that makes working in the tidyverse a little easier.

Multilanguage support

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).

Get the reference lists in R

Making the types reference list available in the R environment is as easy as:

read_types()
#> # A tibble: 111 × 25
#>    type    typelevel main_type type_name type_shortname typeclass typeclass_name
#>    <fct>   <fct>     <fct>     <fct>     <fct>          <fct>     <fct>         
#>  1 1130    main_type 1130      Estuaries Estuaries      CH        Coastal and h…
#>  2 1140    main_type 1140      Mudflats… Mud- and sand… CH        Coastal and h…
#>  3 1310    main_type 1310      Salicorn… Brackish pion… CH        Coastal and h…
#>  4 1310_p… subtype   1310      Salicorn… Salicornia ha… CH        Coastal and h…
#>  5 1310_zk subtype   1310      Low salt… Low saltmarsh… CH        Coastal and h…
#>  6 1310_zv subtype   1310      High sal… High saltmars… CH        Coastal and h…
#>  7 1320    main_type 1320      Spartina… Spartina swar… CH        Coastal and h…
#>  8 1330    main_type 1330      Atlantic… Atlantic salt… CH        Coastal and h…
#>  9 1330_da subtype   1330      Saltmars… Saltmarshes d… CH        Coastal and h…
#> 10 1330_h… subtype   1330      Halophyt… Halophytic gr… CH        Coastal and h…
#> # … with 101 more rows, and 18 more variables: hydr_class <fct>,
#> #   hydr_class_name <fct>, hydr_class_shortname <fct>, groundw_dep <fct>,
#> #   groundw_dep_name <fct>, groundw_dep_shortname <fct>, flood_dep <fct>,
#> #   flood_dep_name <fct>, flood_dep_shortname <fct>, tag_1 <chr>,
#> #   tag_1_name <chr>, tag_1_shortname <chr>, tag_2 <chr>, tag_2_name <chr>,
#> #   tag_2_shortname <chr>, tag_3 <chr>, tag_3_name <chr>, tag_3_shortname <chr>

By default, English is used. But, you can also choose to get a tibble in another language:

read_types(lang = "nl")
#> # A tibble: 111 × 25
#>    type    typelevel main_type type_name type_shortname typeclass typeclass_name
#>    <fct>   <fct>     <fct>     <fct>     <fct>          <fct>     <fct>         
#>  1 1130    main_type 1130      Estuaria  estuaria       CH        Kust- en zilt…
#>  2 1140    main_type 1140      Bij eb d… bij eb droogv… CH        Kust- en zilt…
#>  3 1310    main_type 1310      Eenjarig… zilte pionier… CH        Kust- en zilt…
#>  4 1310_p… subtype   1310      binnendi… binnendijkse … CH        Kust- en zilt…
#>  5 1310_zk subtype   1310      buitendi… buitendijks l… CH        Kust- en zilt…
#>  6 1310_zv subtype   1310      buitendi… buitendijks h… CH        Kust- en zilt…
#>  7 1320    main_type 1320      Schorren… schorren met … CH        Kust- en zilt…
#>  8 1330    main_type 1330      Atlantis… Atlantische s… CH        Kust- en zilt…
#>  9 1330_da subtype   1330      buitendi… buitendijkse … CH        Kust- en zilt…
#> 10 1330_h… subtype   1330      binnendi… zilte graslan… CH        Kust- en zilt…
#> # … with 101 more rows, and 18 more variables: hydr_class <fct>,
#> #   hydr_class_name <fct>, hydr_class_shortname <fct>, groundw_dep <fct>,
#> #   groundw_dep_name <fct>, groundw_dep_shortname <fct>, flood_dep <fct>,
#> #   flood_dep_name <fct>, flood_dep_shortname <fct>, tag_1 <chr>,
#> #   tag_1_name <chr>, tag_1_shortname <chr>, tag_2 <chr>, tag_2_name <chr>,
#> #   tag_2_shortname <chr>, tag_3 <chr>, tag_3_name <chr>, tag_3_shortname <chr>

The lang argument is available in the below functions as well.

env_pressures is made available with:

read_env_pressures()
#> # A tibble: 35 × 7
#>    ep_code ep_abbrev        ep_name   ep_class ep_class_name explanation remarks
#>    <fct>   <fct>            <fct>     <fct>    <fct>         <chr>       <chr>  
#>  1 ep_011  011_struct       11 Chang… ep_clas… 1 Physical m… <NA>        <NA>   
#>  2 ep_012  012_soildyn_incr 12 Soil … ep_clas… 1 Physical m… <NA>        <NA>   
#>  3 ep_013  013_soildyn_decr 13 Soil … ep_clas… 1 Physical m… <NA>        <NA>   
#>  4 ep_014  014_aqconn       14 Aquat… ep_clas… 1 Physical m… <NA>        <NA>   
#>  5 ep_015  015_terrconn     15 Terre… ep_clas… 1 Physical m… <NA>        <NA>   
#>  6 ep_03.1 03.1_eutr_air    3.1 Eutr… ep_clas… 3 Eutrophica… <NA>        <NA>   
#>  7 ep_03.2 03.2_eutr_soil   3.2 Eutr… ep_clas… 3 Eutrophica… <NA>        <NA>   
#>  8 ep_03.3 03.3_eutr_gw     3.3 Eutr… ep_clas… 3 Eutrophica… <NA>        <NA>   
#>  9 ep_03.4 03.4_eutr_sw     3.4 Eutr… ep_clas… 3 Eutrophica… <NA>        <NA>   
#> 10 ep_04.1 04.1_acidif_air  4.1 Acid… ep_clas… 4 Acidificat… <NA>        <NA>   
#> # … with 25 more rows

When actually using these reading functions, you will – of course – assign its result to an object. E.g. with the schemes reference list:

schemes <- read_schemes()
schemes
#> # A tibble: 64 × 25
#>    scheme      scheme_name scheme_shortname programme programme_name attribute_1
#>    <fct>       <fct>       <fct>            <fct>     <fct>          <fct>      
#>  1 ATM_03.1    Atmospheri… ATM: 03.1_eutr_… MNE       Monitoring pr… ATM        
#>  2 ATM_04.1    Atmospheri… ATM: 04.1_acidi… MNE       Monitoring pr… ATM        
#>  3 ATM_08.1    Atmospheri… ATM: 08.1_poll_… MNE       Monitoring pr… ATM        
#>  4 ATM_101     Atmospheri… ATM: 101_clim_d… MNE       Monitoring pr… ATM        
#>  5 ATM_102     Atmospheri… ATM: 102_clim_w… MNE       Monitoring pr… ATM        
#>  6 GW_03.3     Groundwate… GW: 03.3_eutr_gw MNE       Monitoring pr… GW         
#>  7 GW_04.2     Groundwate… GW: 04.2_acidif… MNE       Monitoring pr… GW         
#>  8 GW_05.1_aq  Groundwate… GW: 05.1_des_gw… MNE       Monitoring pr… GW         
#>  9 GW_05.1_qu… Groundwate… GW: 05.1_des_gw… MNE       Monitoring pr… GW         
#> 10 GW_05.1_te… Groundwate… GW: 05.1_des_gw… MNE       Monitoring pr… GW         
#> # … with 54 more rows, and 19 more variables: attribute_2 <fct>,
#> #   attribute_3 <fct>, attribute_1_name <fct>, attribute_1_shortname <fct>,
#> #   attribute_2_name <fct>, attribute_2_shortname <fct>,
#> #   attribute_3_name <fct>, attribute_3_shortname <fct>,
#> #   spatial_restriction <chr>, notes <chr>, tag_1 <chr>, tag_2 <chr>,
#> #   tag_3 <chr>, tag_1_name <chr>, tag_1_shortname <chr>, tag_2_name <chr>,
#> #   tag_2_shortname <chr>, tag_3_name <chr>, tag_3_shortname <chr>

The read_scheme_types() function provides the extra ability to toggle the presence of most textual information, because these comprise many extra variables (combining all additional information of the concerned schemes and the types). This behaviour is controlled by the argument extended, which is FALSE by default.

read_scheme_types()
#> # A tibble: 764 × 5
#>    scheme   type     typegroup       typegroup_name             typegroup_short…
#>    <fct>    <fct>    <fct>           <fct>                      <fct>           
#>  1 ATM_03.1 1310_pol ATM_03.1_group2 sensitive non-forest types sensitive non-f…
#>  2 ATM_03.1 1310_zk  ATM_03.1_group2 sensitive non-forest types sensitive non-f…
#>  3 ATM_03.1 1310_zv  ATM_03.1_group2 sensitive non-forest types sensitive non-f…
#>  4 ATM_03.1 1320     ATM_03.1_group2 sensitive non-forest types sensitive non-f…
#>  5 ATM_03.1 1330_da  ATM_03.1_group2 sensitive non-forest types sensitive non-f…
#>  6 ATM_03.1 1330_hpr ATM_03.1_group2 sensitive non-forest types sensitive non-f…
#>  7 ATM_03.1 2110     ATM_03.1_group2 sensitive non-forest types sensitive non-f…
#>  8 ATM_03.1 2120     ATM_03.1_group2 sensitive non-forest types sensitive non-f…
#>  9 ATM_03.1 2130_had ATM_03.1_group1 very sensitive non-forest… very sensitive …
#> 10 ATM_03.1 2130_hd  ATM_03.1_group1 very sensitive non-forest… very sensitive …
#> # … with 754 more rows
read_scheme_types(extended = TRUE)
#> # A tibble: 764 × 53
#>    scheme   type     typegroup       typegroup_name typegroup_short… scheme_name
#>    <fct>    <fct>    <fct>           <fct>          <fct>            <fct>      
#>  1 ATM_03.1 1310_pol ATM_03.1_group2 sensitive non… sensitive non-f… Atmospheri…
#>  2 ATM_03.1 1310_zk  ATM_03.1_group2 sensitive non… sensitive non-f… Atmospheri…
#>  3 ATM_03.1 1310_zv  ATM_03.1_group2 sensitive non… sensitive non-f… Atmospheri…
#>  4 ATM_03.1 1320     ATM_03.1_group2 sensitive non… sensitive non-f… Atmospheri…
#>  5 ATM_03.1 1330_da  ATM_03.1_group2 sensitive non… sensitive non-f… Atmospheri…
#>  6 ATM_03.1 1330_hpr ATM_03.1_group2 sensitive non… sensitive non-f… Atmospheri…
#>  7 ATM_03.1 2110     ATM_03.1_group2 sensitive non… sensitive non-f… Atmospheri…
#>  8 ATM_03.1 2120     ATM_03.1_group2 sensitive non… sensitive non-f… Atmospheri…
#>  9 ATM_03.1 2130_had ATM_03.1_group1 very sensitiv… very sensitive … Atmospheri…
#> 10 ATM_03.1 2130_hd  ATM_03.1_group1 very sensitiv… very sensitive … Atmospheri…
#> # … with 754 more rows, and 47 more variables: scheme_shortname <fct>,
#> #   programme <fct>, programme_name <fct>, attribute_1 <fct>,
#> #   attribute_2 <fct>, attribute_3 <fct>, attribute_1_name <fct>,
#> #   attribute_1_shortname <fct>, attribute_2_name <fct>,
#> #   attribute_2_shortname <fct>, attribute_3_name <fct>,
#> #   attribute_3_shortname <fct>, spatial_restriction <chr>, notes <chr>,
#> #   schemetag_1 <chr>, schemetag_1_name <chr>, schemetag_1_shortname <chr>, …

When you request all this extra information (some of which is currently empty), you will want to select the columns that you need with dplyr::select().


  1. With N2KHAB projects, we mean scientific monitoring programmes and research projects regarding Flemish Natura 2000 habitats and regionally important biotopes (RIBs).↩︎

  2. A ‘scheme’ refers to a monitoring or research setup that determines which types (habitat/RIBs) are to be investigated for a question or for a bunch of related questions.↩︎