From 597b5168ffd6eb394bb762ae13eaced32f9109b6 Mon Sep 17 00:00:00 2001 From: Damiano Oldoni Date: Wed, 30 Oct 2024 10:20:38 +0100 Subject: [PATCH] Add mapping of Watersla --- sql/dwc_occurrence.sql | 2 ++ tests/test_dwc_occurrence.R | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/dwc_occurrence.sql b/sql/dwc_occurrence.sql index b07dc0e..e2a9712 100644 --- a/sql/dwc_occurrence.sql +++ b/sql/dwc_occurrence.sql @@ -106,6 +106,7 @@ SELECT WHEN o."Sporen Waarnemingen Naam" = 'Moerashyacint' THEN 'Pontederia cordata' WHEN o."Sporen Waarnemingen Naam" = 'Moerasanemoon' THEN 'Houttuynia cordata' WHEN o."Sporen Waarnemingen Naam" = 'Gele maskerbloem' THEN 'Mimulus guttatus DC.' + WHEN o."Sporen Waarnemingen Naam" = 'Watersla' THEN 'Pistia stratiotes' -- Animalia WHEN o."Sporen Waarnemingen Naam" = 'Muskusrat' THEN 'Ondatra zibethicus' WHEN o."Sporen Waarnemingen Naam" = 'Muskusr. > 400gr' THEN 'Ondatra zibethicus' @@ -184,6 +185,7 @@ SELECT o."Sporen Waarnemingen Naam" = 'Watercrassula' OR o."Sporen Waarnemingen Naam" = 'Moerashyacint' OR o."Sporen Waarnemingen Naam" = 'Moerasanemoon' OR + o."Sporen Waarnemingen Naam" = 'Watersla' OR o."Sporen Waarnemingen Naam" = 'Gele maskerbloem' THEN 'Plantae' ELSE 'Animalia' END AS kingdom diff --git a/tests/test_dwc_occurrence.R b/tests/test_dwc_occurrence.R index 017b008..23879f2 100644 --- a/tests/test_dwc_occurrence.R +++ b/tests/test_dwc_occurrence.R @@ -215,7 +215,8 @@ testthat::test_that("scientificName is never NA and one of the list", { "Pontederia cordata", "Houttuynia cordata", "Mimulus guttatus DC.", - "Procambarus" + "Procambarus", + "Pistia stratiotes" ) testthat::expect_true(all(!is.na(dwc_occurrence$scientificName))) testthat::expect_true(all(dwc_occurrence$scientificName %in% species))