Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update textdata #10

Merged
merged 6 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/textdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ NULL
#' }
#' \itemize{
#' \item{More information on the MHQ-schemes can be found in
#' \href{https://pureportal.inbo.be/portal/files/4339795/Westra_etal_2014_MonitoringNatura2000Habitats.pdf}{Westra \emph{et al.} (2014)}.
#' \href{https://doi.org/10.21436/inbor.85829488}{Westra \emph{et al.} (2022)}.
#' }
#' }
#'
Expand Down Expand Up @@ -257,7 +257,7 @@ NULL
#'
#' \itemize{
#' \item{For the MHQ-schemes, the list of sampled types is based on the report of
#' \href{https://pureportal.inbo.be/portal/files/4339795/Westra_etal_2014_MonitoringNatura2000Habitats.pdf}{Westra \emph{et al.} (2014)}.
#' \href{https://doi.org/10.21436/inbor.85829488}{Westra \emph{et al.} (2022)}.
#' }
#' }
#'
Expand Down
162 changes: 88 additions & 74 deletions inst/textdata/namelist.tsv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/textdata/namelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- lang
- code
hash: 3345146f5a5902a684bc1b965f00486c82952d94
data_hash: 5651825f61a8cf829fd3437ae195ed719f518b75
data_hash: 7c3bb83b09e5613712999d40029af0170cbbd90e
code:
class: character
lang:
Expand Down
134 changes: 67 additions & 67 deletions inst/textdata/scheme_types.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -585,70 +585,70 @@ scheme type typegroup
24 35 NA
24 36 NA
24 76 NA
25 2 NA
25 7 NA
25 8 NA
25 9 NA
25 10 NA
25 11 NA
25 12 NA
25 17 NA
25 18 NA
25 19 NA
25 20 NA
25 21 NA
25 31 NA
25 32 NA
25 33 NA
25 34 NA
25 35 NA
25 36 NA
25 37 NA
25 38 NA
25 39 NA
25 40 NA
25 41 NA
25 42 NA
25 43 NA
25 44 NA
25 45 NA
25 46 NA
25 49 NA
25 50 NA
25 51 NA
25 52 NA
25 53 NA
25 54 NA
25 55 NA
25 57 NA
25 58 NA
25 59 NA
25 60 NA
25 61 NA
25 62 NA
25 63 NA
25 64 NA
25 65 NA
25 67 NA
25 68 NA
25 69 NA
25 70 NA
25 72 NA
25 73 NA
25 74 NA
25 75 NA
25 76 NA
25 77 NA
25 78 NA
25 79 NA
25 80 NA
25 81 NA
25 82 NA
25 84 NA
25 86 NA
25 87 NA
25 88 NA
25 89 NA
25 2 33
25 7 33
25 8 32
25 9 32
25 10 30
25 11 31
25 12 30
25 17 31
25 18 31
25 19 30
25 20 30
25 21 30
25 31 30
25 32 30
25 33 31
25 34 31
25 35 30
25 36 31
25 37 31
25 38 31
25 39 30
25 40 30
25 41 30
25 42 31
25 43 31
25 44 31
25 45 33
25 46 33
25 49 32
25 50 32
25 51 32
25 52 32
25 53 31
25 54 32
25 55 33
25 57 32
25 58 33
25 59 33
25 60 31
25 61 31
25 62 32
25 63 30
25 64 30
25 65 31
25 67 31
25 68 33
25 69 33
25 70 31
25 72 32
25 73 31
25 74 32
25 75 32
25 76 33
25 77 32
25 78 31
25 79 33
25 80 33
25 81 33
25 82 32
25 84 31
25 86 32
25 87 33
25 88 32
25 89 33
26 2 NA
26 7 NA
26 36 NA
Expand Down Expand Up @@ -696,8 +696,8 @@ scheme type typegroup
62 26 24
62 27 21
62 30 24
63 28 NA
63 66 NA
63 28 37
63 66 35
30 28 NA
30 66 NA
31 23 NA
Expand Down Expand Up @@ -731,6 +731,7 @@ scheme type typegroup
65 18 NA
41 19 NA
42 20 NA
42 21 NA
43 22 NA
44 23 NA
44 24 NA
Expand All @@ -740,7 +741,6 @@ scheme type typegroup
40 28 NA
49 31 NA
50 32 NA
51 36 NA
52 39 NA
52 40 NA
52 41 NA
Expand Down
22 changes: 18 additions & 4 deletions inst/textdata/scheme_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
sorting:
- scheme
- type
hash: f524df97d6a2338298f54d28479a4dd150c04492
data_hash: 15566cc555458d0a9108c0d9bec43950db66e6f3
hash: fd5e35e7671efa6e0d9a6fc691da0ac4c745d2fe
data_hash: fc922afef448dda550b49c0d0ac2debc985de441
scheme:
class: factor
labels:
Expand Down Expand Up @@ -64,7 +64,6 @@ scheme:
- HQ3260
- HQ4010
- HQ4030
- HQ6120
- HQ6230
- HQ6410
- HQ6510
Expand Down Expand Up @@ -129,7 +128,6 @@ scheme:
- 40
- 49
- 50
- 51
- 52
- 53
- 54
Expand Down Expand Up @@ -395,10 +393,18 @@ typegroup:
- GW_05.1_terr_group3
- GW_05.1_terr_group4
- GW_05.1_terr_group5
- SOIL_03.2_group1
- SOIL_03.2_group2
- SOIL_03.2_group3
- SOIL_03.2_group4
- SURF_03.4_lentic_group1
- SURF_03.4_lentic_group2
- SURF_03.4_lentic_group3
- SURF_03.4_lentic_group4
- SURF_03.4_lotic_group1
- SURF_03.4_lotic_group2
- SURF_03.4_lotic_group3
- SURF_03.4_lotic_group4
index:
- 1
- 2
Expand All @@ -425,8 +431,16 @@ typegroup:
- 18
- 19
- 20
- 30
- 31
- 32
- 33
- 21
- 22
- 23
- 24
- 34
- 35
- 36
- 37
ordered: no
1 change: 0 additions & 1 deletion inst/textdata/schemes.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ scheme programme attribute_1 attribute_2 attribute_3 spatial_restriction notes t
40 2 34 NA NA NA NA 3 NA NA
49 2 20 NA NA NA NA 4 NA NA
50 2 21 NA NA NA NA 4 NA NA
51 2 22 NA NA NA NA 4 NA NA
52 2 23 NA NA NA NA 4 NA NA
53 2 24 NA NA NA NA 4 NA NA
54 2 25 NA NA NA NA 4 NA NA
Expand Down
8 changes: 2 additions & 6 deletions inst/textdata/schemes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
sorting:
- programme
- scheme
hash: 0d1cc8555f417924aa8c7c08feb9b52c8eb2e212
data_hash: 81182a48ef9d6facf38a0d31fb372ee66882e4da
hash: 673425b8d121998f9d991046eddebbfd25143a4a
data_hash: 75eca4b595176f155b23af80a8fde2ea537ce6a7
scheme:
class: factor
labels:
Expand Down Expand Up @@ -64,7 +64,6 @@ scheme:
- HQ3260
- HQ4010
- HQ4030
- HQ6120
- HQ6230
- HQ6410
- HQ6510
Expand Down Expand Up @@ -129,7 +128,6 @@ scheme:
- 40
- 49
- 50
- 51
- 52
- 53
- 54
Expand Down Expand Up @@ -175,7 +173,6 @@ attribute_1:
- '3260'
- '4010'
- '4030'
- '6120'
- '6230'
- '6410'
- '6510'
Expand Down Expand Up @@ -209,7 +206,6 @@ attribute_1:
- 34
- 20
- 21
- 22
- 23
- 24
- 25
Expand Down
2 changes: 1 addition & 1 deletion man/scheme_types.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/schemes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 14 additions & 10 deletions misc/generate_textdata/10_schemes_and_scheme_types.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ typegroups <-
.name_repair = make.names) %>%
slice(2:n()) %>%
expand_grid(scheme = c("GW_03.3",
"SURF_03.4_lentic")
"SURF_03.4_lentic",
"SURF_03.4_lotic",
"SOIL_03.2")
) %>%
select(scheme,
type = Type,
Expand Down Expand Up @@ -412,20 +414,17 @@ schemes %>%
left_join(namelist %>% select(-shortname),
by = c("attribute_1" = "code", "lang")) %>%
rename(name_1 = name) %>%
left_join(tibble(lang = c("en", "nl"),
name_2 = c("environmental pressure",
"milieudruk")),
by = "lang") %>%
left_join(read_namelist(lang = "all") %>% select(-shortname),
by = c("attribute_2" = "code", "lang")) %>%
rename(name_3 = name) %>%
left_join(read_namelist(lang = "all") %>% select(-name),
by = c("attribute_2" = "code", "lang")) %>%
rename(name_3 = shortname) %>%
rename(shortname_3 = shortname) %>%
left_join(namelist %>% select(-shortname),
by = c("attribute_3" = "code", "lang")) %>%
rename(name_4 = name) %>%
mutate(name = str_c(name_1,
": ",
name_2,
" ",
name_3,
ifelse(is.na(name_4),
"",
Expand All @@ -435,7 +434,7 @@ schemes %>%
),
shortname = str_c(attribute_1,
": ",
name_3,
shortname_3,
ifelse(is.na(attribute_3),
"",
str_c(": ",
Expand Down Expand Up @@ -480,7 +479,12 @@ tribble(~nr, ~lang, ~name, ~shortname,
4, "en", "types from moderately eutrophic to eutrophic environments", "(moderately) eutrophic",
4, "nl", "types van matig eutroof tot eutroof milieu", "(matig) eutroof"
) %>%
crossing(prefix = c("GW_03.3_group", "SURF_03.4_lentic_group")) %>%
crossing(prefix = c(
"GW_03.3_group",
"SURF_03.4_lentic_group",
"SURF_03.4_lotic_group",
"SOIL_03.2_group"
)) %>%
mutate(code = str_c(prefix, nr)) %>%
select(code, lang, name, shortname)
) %>%
Expand Down
2 changes: 2 additions & 0 deletions misc/generate_textdata/generate_textdata.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Website

UseNativePipeOperator: No
Loading