Returns the included data source scheme_types as a tibble. Names and shortnames from namelist are optionally added, in English by default.

read_scheme_types(
  path = pkgdatasource_path("textdata/scheme_types", ".yml"),
  file = "scheme_types",
  file_namelist = "namelist",
  lang = "en",
  extended = FALSE
)

Arguments

path

Location of the data sources scheme_types, schemes, types and namelist. The default is to use the location of the data sources as delivered by the installed package.

file

The filename of the scheme_types data source, without extension. The default is to use the file delivered by the installed package.

file_namelist

The filename of the namelist data source, without extension. The default is to use the file delivered by the installed package.

lang

An IETF BCP 47 language tag, such as "en" or "nl", to specify the language of names & shortnames to be returned in the tibble.

extended

Should names & shortnames be added for scheme, programme, scheme attributes, type, typeclass and tags of scheme and type?

Value

The scheme_types dataframe as a tibble, with names & shortnames added for the typegroup variable and optionally for scheme, programme, scheme attributes, type and attributes & tags of scheme and type, all according to the lang argument. The tibble has either 5 or many variables, depending on the extended argument. See scheme_types for documentation of the data-source's contents. See namelist for the link between codes or other identifiers and the corresponding names (and shortnames).

The optionally added names and shortnames are represented by the following variables:

  • scheme_name

  • scheme_shortname

  • programme_name

  • attribute_1_name

  • attribute_1_shortname

  • attribute_2_name

  • attribute_2_shortname

  • attribute_3_name

  • attribute_3_shortname

  • schemetag_1_name

  • schemetag_1_shortname

  • schemetag_2_name

  • schemetag_2_shortname

  • schemetag_3_name

  • schemetag_3_shortname

  • type_name

  • type_shortname

  • typeclass_name

  • hydr_class_name

  • hydr_class_shortname

  • groundw_dep_name

  • groundw_dep_shortname

  • flood_dep_name

  • flood_dep_shortname

  • typetag_1_name

  • typetag_1_shortname

  • typetag_2_name

  • typetag_2_shortname

  • typetag_3_name

  • typetag_3_shortname

The added names and shortnames for scheme, programme, attributes and typegroup are factors with their level order according to that of the scheme, programme, attribute or typegroup variable.

Details

scheme_types is a data source in the vc-format which lists the types (using the type-code from types) that belong to each N2KHAB (monitoring or research) scheme (using the scheme-code from schemes). It also defines typegroup memberships of the types within specific schemes, if applicable.

read_scheme_types() reads the scheme_types data source, optionally adds names + shortnames (always done for the typegroup) and returns it as a tibble. A tibble is a dataframe that makes working in the tidyverse a little easier. By default, the data version delivered with the package is used and English names (lang = "en") are returned.

read_scheme_types()

read_scheme_types(lang = "nl")

See also

scheme_types

Other reading functions for n2khab-referencelists: read_env_pressures(), read_namelist(), read_schemes(), read_types()

Examples

read_scheme_types()
#> # A tibble: 764 × 5
#>    scheme   type     typegroup       typegroup_name          typegroup_shortname
#>    <fct>    <fct>    <fct>           <fct>                   <fct>              
#>  1 ATM_03.1 1310_pol ATM_03.1_group2 sensitive non-forest t… sensitive non-fore…
#>  2 ATM_03.1 1310_zk  ATM_03.1_group2 sensitive non-forest t… sensitive non-fore…
#>  3 ATM_03.1 1310_zv  ATM_03.1_group2 sensitive non-forest t… sensitive non-fore…
#>  4 ATM_03.1 1320     ATM_03.1_group2 sensitive non-forest t… sensitive non-fore…
#>  5 ATM_03.1 1330_da  ATM_03.1_group2 sensitive non-forest t… sensitive non-fore…
#>  6 ATM_03.1 1330_hpr ATM_03.1_group2 sensitive non-forest t… sensitive non-fore…
#>  7 ATM_03.1 2110     ATM_03.1_group2 sensitive non-forest t… sensitive non-fore…
#>  8 ATM_03.1 2120     ATM_03.1_group2 sensitive non-forest t… sensitive non-fore…
#>  9 ATM_03.1 2130_had ATM_03.1_group1 very sensitive non-for… very sensitive non…
#> 10 ATM_03.1 2130_hd  ATM_03.1_group1 very sensitive non-for… very sensitive non…
#> # ℹ 754 more rows
read_scheme_types(lang = "nl")
#> # A tibble: 764 × 5
#>    scheme   type     typegroup       typegroup_name          typegroup_shortname
#>    <fct>    <fct>    <fct>           <fct>                   <fct>              
#>  1 ATM_03.1 1310_pol ATM_03.1_group2 gevoelige niet-bostypes gevoelig niet-bos  
#>  2 ATM_03.1 1310_zk  ATM_03.1_group2 gevoelige niet-bostypes gevoelig niet-bos  
#>  3 ATM_03.1 1310_zv  ATM_03.1_group2 gevoelige niet-bostypes gevoelig niet-bos  
#>  4 ATM_03.1 1320     ATM_03.1_group2 gevoelige niet-bostypes gevoelig niet-bos  
#>  5 ATM_03.1 1330_da  ATM_03.1_group2 gevoelige niet-bostypes gevoelig niet-bos  
#>  6 ATM_03.1 1330_hpr ATM_03.1_group2 gevoelige niet-bostypes gevoelig niet-bos  
#>  7 ATM_03.1 2110     ATM_03.1_group2 gevoelige niet-bostypes gevoelig niet-bos  
#>  8 ATM_03.1 2120     ATM_03.1_group2 gevoelige niet-bostypes gevoelig niet-bos  
#>  9 ATM_03.1 2130_had ATM_03.1_group1 zeer gevoelige niet-bo… zeer gevoelig niet…
#> 10 ATM_03.1 2130_hd  ATM_03.1_group1 zeer gevoelige niet-bo… zeer gevoelig niet…
#> # ℹ 754 more rows