From 392059d48f074abc1352a82af95de8ccc4ed3bad Mon Sep 17 00:00:00 2001 From: wkmor1 Date: Thu, 9 Jan 2025 14:51:14 +0200 Subject: [PATCH] Update regulatory statuses --- R/sysdata.R | 18 +++++++++++++++- tests/testthat/_snaps/finbif_metadata.md | 26 ++++++++++++------------ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/R/sysdata.R b/R/sysdata.R index f0c979a5..e0335db2 100644 --- a/R/sysdata.R +++ b/R/sysdata.R @@ -329,13 +329,29 @@ regulatory_status <- function(obj) { MX.finnishEnvironmentInstitute2020conservationProjectVascularSpecies = "FEI2020CPVPS", MX.habitatsDirectiveAnnexII_FinlandNaturaSpecies = "HABDIR2FN", - MX.euRegulation_cites_appendixD = "EU_CITESD" + MX.euRegulation_cites_appendixD = "EU_CITESD", + MX.finlex1066_2023_appendix7 = "FNLX1066_23_7", + MX.concernInvasiveSpeciesNotOnOtherLists = "OTH_INVSV_NO_LIST", + MX.regionallyThreatened2020_1a = "REGTHRT_1A", + MX.regionallyThreatened2020_1b = "REGTHRT_1B", + MX.regionallyThreatened2020_2a = "REGTHRT_2A", + MX.regionallyThreatened2020_2b = "REGTHRT_2B", + MX.regionallyThreatened2020_3a = "REGTHRT_3A", + MX.regionallyThreatened2020_3b = "REGTHRT_3B", + MX.regionallyThreatened2020_3c = "REGTHRT_3C", + MX.regionallyThreatened2020_4a = "REGTHRT_4A", + MX.regionallyThreatened2020_4b = "REGTHRT_4B", + MX.regionallyThreatened2020_4c = "REGTHRT_4C", + MX.regionallyThreatened2020_4d = "REGTHRT_4D", + MX.forestCentreSpecies = "FRSTSP" ) reg_status <- get_sysdata( list(which = "MX.adminStatusEnum", cache = obj[["cache"]]) ) + reg_status <- unique(reg_status) + id <- row.names(reg_status) code <- code[id] diff --git a/tests/testthat/_snaps/finbif_metadata.md b/tests/testthat/_snaps/finbif_metadata.md index 1707a87b..1f82d62e 100644 --- a/tests/testthat/_snaps/finbif_metadata.md +++ b/tests/testthat/_snaps/finbif_metadata.md @@ -54,17 +54,17 @@ regulatory_status Output code - MX.regionallyThreatened2020_1a REGINLLYTHRTND2020_1 - MX.regionallyThreatened2020_1b REGNLLYTHRTND2020_1B - MX.regionallyThreatened2020_2a REGINLLYTHRTND2020_2 - MX.regionallyThreatened2020_2b REGNLLYTHRTND2020_2B - MX.regionallyThreatened2020_3a REGINLLYTHRTND2020_3 - MX.regionallyThreatened2020_3b REGNLLYTHRTND2020_3B - MX.regionallyThreatened2020_3c REGNLLYTHRTND2020_3C - MX.regionallyThreatened2020_4a REGINLLYTHRTND2020_4 - MX.regionallyThreatened2020_4b REGNLLYTHRTND2020_4B - MX.regionallyThreatened2020_4c REGNLLYTHRTND2020_4C - MX.regionallyThreatened2020_4d REGNLLYTHRTND2020_4D + MX.regionallyThreatened2020_1a REGTHRT_1A + MX.regionallyThreatened2020_1b REGTHRT_1B + MX.regionallyThreatened2020_2a REGTHRT_2A + MX.regionallyThreatened2020_2b REGTHRT_2B + MX.regionallyThreatened2020_3a REGTHRT_3A + MX.regionallyThreatened2020_3b REGTHRT_3B + MX.regionallyThreatened2020_3c REGTHRT_3C + MX.regionallyThreatened2020_4a REGTHRT_4A + MX.regionallyThreatened2020_4b REGTHRT_4B + MX.regionallyThreatened2020_4c REGTHRT_4C + MX.regionallyThreatened2020_4d REGTHRT_4D MX.finlex160_1997_appendix2a FNLX160_97_2A MX.finlex160_1997_appendix2b FNLX160_97_2B MX.cites_appendixI CITES1 @@ -109,10 +109,10 @@ MX.finnishEnvironmentInstitute2020conservationProjectSpecies FEI_CPS MX.finnishEnvironmentInstitute2020conservationProjectAapamireSpecies FEI_CPAS MX.finnishEnvironmentInstitute2020conservationProjectVascularSpecies FEI2020CPVPS - MX.finlex1066_2023_appendix7 FNLX1066_2023_PPNDX7 + MX.finlex1066_2023_appendix7 FNLX1066_23_7 MX.finnishEnvironmentInstitute2020protectionPrioritySpecies FEI2020PPS MX.finlex160_1997_appendix4_specialInterest_2021 FNLX160_97_4_SI_2021 - MX.forestCentreSpecies FORESTCENTRESPECIES + MX.forestCentreSpecies FRSTSP MX.finlex160_1997_appendix4_2021 FNLX160_97_4_2021 MX.unprotectedSpecies UNP_SP MX.finlex160_1997_appendix3c FNLX160_97_3C