R/read_textdata.R
read_schemes.Rd
Returns the included data source schemes
as a
tibble
.
Names and shortnames from namelist
are added,
in English by default.
read_schemes( path = pkgdatasource_path("textdata/schemes", ".yml"), file = "schemes", file_namelist = "namelist", lang = "en" )
path | Location of the data sources |
---|---|
file | The filename of the |
file_namelist | The filename of the |
lang | An
IETF BCP 47 language tag, such as |
The schemes
data frame as a tibble
,
with names & shortnames added for scheme, programme, attributes and tags
according to the lang
argument.
The tibble has 25 variables.
See schemes
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 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
tag_1_name
tag_1_shortname
tag_2_name
tag_2_shortname
tag_3_name
tag_3_shortname
The added names and shortnames for scheme, programme and attributes are factors with their level order according to that of the scheme, programme or attribute variable.
schemes
is a data source in the
vc-format which provides
a list of (monitoring) schemes for N2KHAB monitoring programmes or
other N2KHAB projects, together
with defining attributes and optional information.
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.
read_schemes()
reads the schemes
data source, adds
names + shortnames and returns it as a
tibble
.
A tibble is a data frame 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 for scheme, programme, attributes
and tags.
read_schemes()
read_schemes(lang = "nl")
An efficient way with base R to avoid function masking and conflict warnings
when attaching both {n2khab}
and {n2khabmon}
, regardless of the order
in which they're loaded, is by specifying something as below in your
script, at least before loading {n2khab}
:
conflictRules("n2khab", exclude = c("read_schemes", "read_scheme_types"))
Other reading functions for n2khabmon-referencelists:
read_namelistmon()
,
read_scheme_types()
read_schemes() #> # A tibble: 63 × 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 #> # ℹ 53 more rows #> # ℹ 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>, … read_schemes(lang = "nl") #> # A tibble: 63 × 25 #> scheme scheme_name scheme_shortname programme programme_name attribute_1 #> <fct> <fct> <fct> <fct> <fct> <fct> #> 1 ATM_03.1 Atmosferis… ATM: 03.1_eutr_… MNE Monitoringpro… ATM #> 2 ATM_04.1 Atmosferis… ATM: 04.1_verzu… MNE Monitoringpro… ATM #> 3 ATM_08.1 Atmosferis… ATM: 08.1_veron… MNE Monitoringpro… ATM #> 4 ATM_101 Atmosferis… ATM: 101_klim_d… MNE Monitoringpro… ATM #> 5 ATM_102 Atmosferis… ATM: 102_klim_n… MNE Monitoringpro… ATM #> 6 GW_03.3 Grondwater… GW: 03.3_eutr_gw MNE Monitoringpro… GW #> 7 GW_04.2 Grondwater… GW: 04.2_verzu_… MNE Monitoringpro… GW #> 8 GW_05.1_aq Grondwater… GW: 05.1_verdro… MNE Monitoringpro… GW #> 9 GW_05.1_qu… Grondwater… GW: 05.1_verdro… MNE Monitoringpro… GW #> 10 GW_05.1_te… Grondwater… GW: 05.1_verdro… MNE Monitoringpro… GW #> # ℹ 53 more rows #> # ℹ 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>, …