From 8005fffa76c1bf3e5912196cc50efb26e57824e6 Mon Sep 17 00:00:00 2001 From: Lien Reyserhove <32466479+LienReyserhove@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:15:17 +0200 Subject: [PATCH 1/2] update .Rproj name --- src/{src.Rproj => alien-fishes-checklist.Rproj} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{src.Rproj => alien-fishes-checklist.Rproj} (100%) diff --git a/src/src.Rproj b/src/alien-fishes-checklist.Rproj similarity index 100% rename from src/src.Rproj rename to src/alien-fishes-checklist.Rproj From 9db8256eb93c4d9a3d7132ea0353369443ba8b7c Mon Sep 17 00:00:00 2001 From: Lien Reyserhove <32466479+LienReyserhove@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:59:25 +0200 Subject: [PATCH 2/2] update with new dwc terms --- data/processed/description.csv | 60 ------ data/processed/distribution.csv | 62 +++--- src/dwc_mapping.Rmd | 336 +++++++++++++------------------- 3 files changed, 170 insertions(+), 288 deletions(-) diff --git a/data/processed/description.csv b/data/processed/description.csv index 12b5bb8..3492e85 100644 --- a/data/processed/description.csv +++ b/data/processed/description.csv @@ -1,81 +1,21 @@ taxonID,description,type,language alien-fishes-checklist:taxon:078319c97e97d2b50c582b9b9b792bad,Eastern Europe,native range,en -alien-fishes-checklist:taxon:078319c97e97d2b50c582b9b9b792bad,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:078319c97e97d2b50c582b9b9b792bad,cbd_2014_pathway:escape_ornamental,pathway,en -alien-fishes-checklist:taxon:078319c97e97d2b50c582b9b9b792bad,casual,invasion stage,en alien-fishes-checklist:taxon:0b5b04074e4446927e7986999170bf5b,Asia,native range,en -alien-fishes-checklist:taxon:0b5b04074e4446927e7986999170bf5b,cbd_2014_pathway:release_biological_control,pathway,en -alien-fishes-checklist:taxon:0b5b04074e4446927e7986999170bf5b,casual,invasion stage,en -alien-fishes-checklist:taxon:0b628dff961ba5fd7acf4499ca4eb922,cbd_2014_pathway:escape_ornamental,pathway,en -alien-fishes-checklist:taxon:0b628dff961ba5fd7acf4499ca4eb922,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:0b628dff961ba5fd7acf4499ca4eb922,established,invasion stage,en alien-fishes-checklist:taxon:1da48686487fe130179a13661ea90545,Asia,native range,en -alien-fishes-checklist:taxon:1da48686487fe130179a13661ea90545,unintentional,pathway,en -alien-fishes-checklist:taxon:1da48686487fe130179a13661ea90545,cbd_2014_pathway:escape_food_bait,pathway,en -alien-fishes-checklist:taxon:1da48686487fe130179a13661ea90545,established,invasion stage,en alien-fishes-checklist:taxon:22e0c0833feaf2c7e7267d9893c5b2ed,Africa,native range,en -alien-fishes-checklist:taxon:22e0c0833feaf2c7e7267d9893c5b2ed,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:22e0c0833feaf2c7e7267d9893c5b2ed,casual,invasion stage,en alien-fishes-checklist:taxon:35edeae691a00ed23ea01f139e8bfa1f,Eastern Europe,native range,en -alien-fishes-checklist:taxon:35edeae691a00ed23ea01f139e8bfa1f,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:35edeae691a00ed23ea01f139e8bfa1f,cbd_2014_pathway:escape_ornamental,pathway,en -alien-fishes-checklist:taxon:35edeae691a00ed23ea01f139e8bfa1f,casual,invasion stage,en alien-fishes-checklist:taxon:5340e4b13d517176f46c1b9cd4711ea1,Asia,native range,en -alien-fishes-checklist:taxon:5340e4b13d517176f46c1b9cd4711ea1,cbd_2014_pathway:release_biological_control,pathway,en -alien-fishes-checklist:taxon:5340e4b13d517176f46c1b9cd4711ea1,casual,invasion stage,en alien-fishes-checklist:taxon:5d69f2217ba58b9d0c49b318c39e9c01,Eastern Europe,native range,en -alien-fishes-checklist:taxon:5d69f2217ba58b9d0c49b318c39e9c01,cbd_2014_pathway:corridor_water,pathway,en -alien-fishes-checklist:taxon:5d69f2217ba58b9d0c49b318c39e9c01,established,invasion stage,en -alien-fishes-checklist:taxon:641be9ef6247d5891954556e5ddabb7d,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:641be9ef6247d5891954556e5ddabb7d,casual,invasion stage,en alien-fishes-checklist:taxon:68deb7328ae700d1fa49933e484e3af8,Eastern Europe,native range,en -alien-fishes-checklist:taxon:68deb7328ae700d1fa49933e484e3af8,cbd_2014_pathway:stowaway_ballast_water,pathway,en -alien-fishes-checklist:taxon:68deb7328ae700d1fa49933e484e3af8,cbd_2014_pathway:corridor_water,pathway,en -alien-fishes-checklist:taxon:68deb7328ae700d1fa49933e484e3af8,established,invasion stage,en alien-fishes-checklist:taxon:69bdf9b7a061aed637c31e075156f71c,Eastern Europe,native range,en -alien-fishes-checklist:taxon:69bdf9b7a061aed637c31e075156f71c,cbd_2014_pathway:escape_food_bait,pathway,en -alien-fishes-checklist:taxon:69bdf9b7a061aed637c31e075156f71c,established,invasion stage,en -alien-fishes-checklist:taxon:6bcf9c25959c3b2535055ba465ac93b1,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:6bcf9c25959c3b2535055ba465ac93b1,cbd_2014_pathway:escape_food_bait,pathway,en -alien-fishes-checklist:taxon:6bcf9c25959c3b2535055ba465ac93b1,casual,invasion stage,en -alien-fishes-checklist:taxon:6e0fcd4097785a262970615380fdd48d,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:6e0fcd4097785a262970615380fdd48d,cbd_2014_pathway:escape_ornamental,pathway,en -alien-fishes-checklist:taxon:6e0fcd4097785a262970615380fdd48d,established,invasion stage,en -alien-fishes-checklist:taxon:72f50769ed62a241530df9c3c41a0ae8,cbd_2014_pathway:escape_ornamental,pathway,en -alien-fishes-checklist:taxon:72f50769ed62a241530df9c3c41a0ae8,established,invasion stage,en alien-fishes-checklist:taxon:7864ebfbde9459e7ce7192cc405f9077,Eastern Europe,native range,en -alien-fishes-checklist:taxon:7864ebfbde9459e7ce7192cc405f9077,cbd_2014_pathway:escape_food_bait,pathway,en -alien-fishes-checklist:taxon:7864ebfbde9459e7ce7192cc405f9077,established,invasion stage,en alien-fishes-checklist:taxon:798907ff71a3cd93d9940145812760b1,Eastern Europe,native range,en -alien-fishes-checklist:taxon:798907ff71a3cd93d9940145812760b1,cbd_2014_pathway:stowaway_ballast_water,pathway,en -alien-fishes-checklist:taxon:798907ff71a3cd93d9940145812760b1,cbd_2014_pathway:corridor_water,pathway,en -alien-fishes-checklist:taxon:798907ff71a3cd93d9940145812760b1,established,invasion stage,en alien-fishes-checklist:taxon:81f3b13dc63b2940665387c85baefae7,Asia,native range,en -alien-fishes-checklist:taxon:81f3b13dc63b2940665387c85baefae7,cbd_2014_pathway:escape_ornamental,pathway,en -alien-fishes-checklist:taxon:81f3b13dc63b2940665387c85baefae7,casual,invasion stage,en alien-fishes-checklist:taxon:c937610f85ea8a74f105724c8f198049,Eastern Europe,native range,en -alien-fishes-checklist:taxon:c937610f85ea8a74f105724c8f198049,cbd_2014_pathway:escape_food_bait,pathway,en -alien-fishes-checklist:taxon:c937610f85ea8a74f105724c8f198049,established,invasion stage,en alien-fishes-checklist:taxon:d9d4509efbdd5d427f9ee370d645ac02,Asia,native range,en alien-fishes-checklist:taxon:d9d4509efbdd5d427f9ee370d645ac02,Eastern Europe,native range,en -alien-fishes-checklist:taxon:d9d4509efbdd5d427f9ee370d645ac02,unintentional,pathway,en -alien-fishes-checklist:taxon:d9d4509efbdd5d427f9ee370d645ac02,established,invasion stage,en -alien-fishes-checklist:taxon:dd184bae497ac07191f2f84b6c43df8b,cbd_2014_pathway:escape_food_bait,pathway,en -alien-fishes-checklist:taxon:dd184bae497ac07191f2f84b6c43df8b,established,invasion stage,en alien-fishes-checklist:taxon:dec8ee68b3fae146c056b4972e3e6b83,Asia,native range,en -alien-fishes-checklist:taxon:dec8ee68b3fae146c056b4972e3e6b83,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:dec8ee68b3fae146c056b4972e3e6b83,cbd_2014_pathway:escape_ornamental,pathway,en -alien-fishes-checklist:taxon:dec8ee68b3fae146c056b4972e3e6b83,casual,invasion stage,en alien-fishes-checklist:taxon:e77935e4437424387a49b0e89ade96ef,Asia,native range,en -alien-fishes-checklist:taxon:e77935e4437424387a49b0e89ade96ef,cbd_2014_pathway:release_biological_control,pathway,en -alien-fishes-checklist:taxon:e77935e4437424387a49b0e89ade96ef,casual,invasion stage,en alien-fishes-checklist:taxon:ed016d9744c4b866c67ab3bb3bf7a185,Eastern Europe,native range,en -alien-fishes-checklist:taxon:ed016d9744c4b866c67ab3bb3bf7a185,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:ed016d9744c4b866c67ab3bb3bf7a185,established,invasion stage,en alien-fishes-checklist:taxon:f0c5c8c1ae9ec26588b41ead5dfd8261,Eastern Europe,native range,en -alien-fishes-checklist:taxon:f0c5c8c1ae9ec26588b41ead5dfd8261,cbd_2014_pathway:stowaway_ballast_water,pathway,en -alien-fishes-checklist:taxon:f0c5c8c1ae9ec26588b41ead5dfd8261,cbd_2014_pathway:corridor_water,pathway,en -alien-fishes-checklist:taxon:f0c5c8c1ae9ec26588b41ead5dfd8261,established,invasion stage,en alien-fishes-checklist:taxon:f6dfb7309bb723fe8e7f34d32dcd2b35,Africa,native range,en -alien-fishes-checklist:taxon:f6dfb7309bb723fe8e7f34d32dcd2b35,cbd_2014_pathway:escape_aquaculture,pathway,en -alien-fishes-checklist:taxon:f6dfb7309bb723fe8e7f34d32dcd2b35,casual,invasion stage,en diff --git a/data/processed/distribution.csv b/data/processed/distribution.csv index 9da0463..9628561 100644 --- a/data/processed/distribution.csv +++ b/data/processed/distribution.csv @@ -1,26 +1,36 @@ -taxonID,locationID,locality,countryCode,occurrenceStatus,establishmentMeans,eventDate -alien-fishes-checklist:taxon:dec8ee68b3fae146c056b4972e3e6b83,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,2001/2018 -alien-fishes-checklist:taxon:35edeae691a00ed23ea01f139e8bfa1f,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,2005/2018 -alien-fishes-checklist:taxon:078319c97e97d2b50c582b9b9b792bad,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,2000/2018 -alien-fishes-checklist:taxon:6e0fcd4097785a262970615380fdd48d,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1871/2018 -alien-fishes-checklist:taxon:c937610f85ea8a74f105724c8f198049,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1984/2018 -alien-fishes-checklist:taxon:69bdf9b7a061aed637c31e075156f71c,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,2016/2018 -alien-fishes-checklist:taxon:81f3b13dc63b2940665387c85baefae7,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1601/2018 -alien-fishes-checklist:taxon:d9d4509efbdd5d427f9ee370d645ac02,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1601/2018 -alien-fishes-checklist:taxon:f6dfb7309bb723fe8e7f34d32dcd2b35,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1980/2018 -alien-fishes-checklist:taxon:0b5b04074e4446927e7986999170bf5b,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1967/2018 -alien-fishes-checklist:taxon:ed016d9744c4b866c67ab3bb3bf7a185,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1201/2018 -alien-fishes-checklist:taxon:e77935e4437424387a49b0e89ade96ef,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1975/2018 -alien-fishes-checklist:taxon:5340e4b13d517176f46c1b9cd4711ea1,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1975/2018 -alien-fishes-checklist:taxon:641be9ef6247d5891954556e5ddabb7d,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1884/2018 -alien-fishes-checklist:taxon:72f50769ed62a241530df9c3c41a0ae8,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1885/2018 -alien-fishes-checklist:taxon:798907ff71a3cd93d9940145812760b1,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,2015/2018 -alien-fishes-checklist:taxon:68deb7328ae700d1fa49933e484e3af8,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,2010/2018 -alien-fishes-checklist:taxon:6bcf9c25959c3b2535055ba465ac93b1,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1884/2018 -alien-fishes-checklist:taxon:22e0c0833feaf2c7e7267d9893c5b2ed,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1990/2018 -alien-fishes-checklist:taxon:dd184bae497ac07191f2f84b6c43df8b,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1984/2018 -alien-fishes-checklist:taxon:f0c5c8c1ae9ec26588b41ead5dfd8261,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,2012/2018 -alien-fishes-checklist:taxon:5d69f2217ba58b9d0c49b318c39e9c01,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,2010/2018 -alien-fishes-checklist:taxon:1da48686487fe130179a13661ea90545,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1992/2018 -alien-fishes-checklist:taxon:7864ebfbde9459e7ce7192cc405f9077,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1890/2018 -alien-fishes-checklist:taxon:0b628dff961ba5fd7acf4499ca4eb922,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,1920/2018 +taxonID,locationID,locality,countryCode,occurrenceStatus,establishmentMeans,degreeOfEstablishment,pathway,eventDate +alien-fishes-checklist:taxon:dec8ee68b3fae146c056b4972e3e6b83,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,aquacultureMariculture,2001/ +alien-fishes-checklist:taxon:35edeae691a00ed23ea01f139e8bfa1f,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,aquacultureMariculture,2005/ +alien-fishes-checklist:taxon:078319c97e97d2b50c582b9b9b792bad,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,aquacultureMariculture,2000/ +alien-fishes-checklist:taxon:6e0fcd4097785a262970615380fdd48d,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,aquacultureMariculture,1871/ +alien-fishes-checklist:taxon:c937610f85ea8a74f105724c8f198049,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,liveFoodBait,1984/ +alien-fishes-checklist:taxon:69bdf9b7a061aed637c31e075156f71c,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,liveFoodBait,2016/ +alien-fishes-checklist:taxon:81f3b13dc63b2940665387c85baefae7,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,pet,1601/ +alien-fishes-checklist:taxon:d9d4509efbdd5d427f9ee370d645ac02,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,unintentional,1601/ +alien-fishes-checklist:taxon:f6dfb7309bb723fe8e7f34d32dcd2b35,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,aquacultureMariculture,1980/ +alien-fishes-checklist:taxon:0b5b04074e4446927e7986999170bf5b,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,biologicalControl,1967/ +alien-fishes-checklist:taxon:ed016d9744c4b866c67ab3bb3bf7a185,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,aquacultureMariculture,1201/ +alien-fishes-checklist:taxon:e77935e4437424387a49b0e89ade96ef,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,biologicalControl,1975/ +alien-fishes-checklist:taxon:5340e4b13d517176f46c1b9cd4711ea1,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,biologicalControl,1975/ +alien-fishes-checklist:taxon:641be9ef6247d5891954556e5ddabb7d,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,aquacultureMariculture,1884/ +alien-fishes-checklist:taxon:72f50769ed62a241530df9c3c41a0ae8,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,pet,1885/ +alien-fishes-checklist:taxon:798907ff71a3cd93d9940145812760b1,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,ballastWater,2015/ +alien-fishes-checklist:taxon:68deb7328ae700d1fa49933e484e3af8,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,ballastWater,2010/ +alien-fishes-checklist:taxon:6bcf9c25959c3b2535055ba465ac93b1,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,aquacultureMariculture,1884/ +alien-fishes-checklist:taxon:22e0c0833feaf2c7e7267d9893c5b2ed,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,aquacultureMariculture,1990/ +alien-fishes-checklist:taxon:dd184bae497ac07191f2f84b6c43df8b,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,liveFoodBait,1984/ +alien-fishes-checklist:taxon:f0c5c8c1ae9ec26588b41ead5dfd8261,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,ballastWater,2012/ +alien-fishes-checklist:taxon:5d69f2217ba58b9d0c49b318c39e9c01,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,corridor,2010/ +alien-fishes-checklist:taxon:1da48686487fe130179a13661ea90545,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,unintentional,1992/ +alien-fishes-checklist:taxon:7864ebfbde9459e7ce7192cc405f9077,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,liveFoodBait,1890/ +alien-fishes-checklist:taxon:0b628dff961ba5fd7acf4499ca4eb922,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,pet,1920/ +alien-fishes-checklist:taxon:dec8ee68b3fae146c056b4972e3e6b83,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,pet,2001/ +alien-fishes-checklist:taxon:35edeae691a00ed23ea01f139e8bfa1f,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,pet,2005/ +alien-fishes-checklist:taxon:078319c97e97d2b50c582b9b9b792bad,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,pet,2000/ +alien-fishes-checklist:taxon:6e0fcd4097785a262970615380fdd48d,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,pet,1871/ +alien-fishes-checklist:taxon:798907ff71a3cd93d9940145812760b1,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,corridor,2015/ +alien-fishes-checklist:taxon:68deb7328ae700d1fa49933e484e3af8,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,corridor,2010/ +alien-fishes-checklist:taxon:6bcf9c25959c3b2535055ba465ac93b1,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,casual,liveFoodBait,1884/ +alien-fishes-checklist:taxon:f0c5c8c1ae9ec26588b41ead5dfd8261,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,corridor,2012/ +alien-fishes-checklist:taxon:1da48686487fe130179a13661ea90545,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,liveFoodBait,1992/ +alien-fishes-checklist:taxon:0b628dff961ba5fd7acf4499ca4eb922,ISO_3166-2:BE-VLG,Flemish Region,BE,present,introduced,established,aquacultureMariculture,1920/ diff --git a/src/dwc_mapping.Rmd b/src/dwc_mapping.Rmd index b2bc17a..70a92b0 100644 --- a/src/dwc_mapping.Rmd +++ b/src/dwc_mapping.Rmd @@ -303,6 +303,106 @@ We use the [GBIF controlled vocabulary](http://rs.gbif.org/vocabulary/gbif/estab distribution %<>% mutate(establishmentMeans = "introduced") ``` +### degreeOfEstablishment + +Invasion stage information (e.g. `casual`) can be found in `raw_status`. + +Create separate dataframe: + +Show unique values: + +```{r} +distribution %>% + distinct(raw_status) %>% + arrange(raw_status) +``` + +* `A` and `A*` in the raw data file stand for `acclimatized` and refers to the status where the alien species has overcome the geographical barrier, the captivity/cultivation barrier and the survival barier, but where it fails to establish because individuals in the population fail to reproduce. This includes species (like Nile tilapia) in secluded warmer water of power plants. In Blackburn et al. (2011), this corresponds to the term `casual`. +* `N` in the raw data file stands for `naturalized`. We decided **not to use** this term, because often, there's no sensible criterium to distinguish between casual/naturalised and naturalised/established. Thus, here, we consider all `naturalized` species to be `established`. + +```{r} +distribution %<>% mutate(degreeOfEstablishment = case_when( + raw_status == "A" ~ "casual", + raw_status == "A*" ~ "casual", + raw_status == "N" ~ "established" +)) +``` + +### pathway + +Pathway information can be found in `raw_pathway_s`. Show unique values: + +```{r} +distribution %>% + distinct(raw_pathway_s) %>% + arrange(raw_pathway_s) +``` + +`raw_pathway_s` contains multiple values (currently not more than 2), so we separate it in 2 columns: + +```{r} +distribution %<>% separate( + raw_pathway_s, + into = c("pathway_1", "pathway_2"), + sep = ", ", + remove = FALSE, + convert = FALSE, + extra = "merge", + fill = "right" +) +``` + +Gather in a `key` and `value` column: + +```{r} +distribution %<>% gather( + key, value, + pathway_1, pathway_2, + na.rm = TRUE, # Also removes records for which there is no pathway_1 + convert = FALSE +) +``` + +This is a manually created overview of the abbreviations used in this dataset, their interpretation and the mapping to the CBD vocabulary: + +```{r, echo = FALSE} +as.data.frame(matrix(data = c( + "AM", "Active Migration", "corridor_water", + "AN", "Angling/bait fish","escape_food_bait", + "AQ", "Aquaculture", "escape_aquaculture", + "BC", "Biological Control", "release_biologica_control", + "BW", "Ballast Water", "stowaway_ballast_water", + "OR", "Ornamental", "escape_ornamental", + "UN", "Unintentional", "Unintentional"), + nrow = 7, ncol = 3, byrow = TRUE, + dimnames = list(c(1:7), c("abbreviation", "full name", "CBD mapping")) +)) +``` + +Map values: + +```{r} +distribution %<>% mutate(pathway = recode(value, + "AM" = "corridor", + "AN" = "liveFoodBait", + "AQ" = "aquacultureMariculture", + "BC" = "biologicalControl", + "BW" = "ballastWater", + "OR" = "pet", + "UN" = "unintentional" +)) +``` + +Show mapped values: + +```{r} +distribution %>% + select(value, pathway) %>% + group_by_all() %>% + summarize(records = n()) %>% + arrange(value) +``` + ### eventDate The distribution information applies to a certain date range, which we will express here as an ISO 8601 date `yyyy/yyyy` (`start_year/end_year`). @@ -324,10 +424,10 @@ distribution %<>% mutate(start_year = recode(start_year, )) ``` -As there is no `end_year` information, we'll consider the publication year of Verreycken et al. (2018) as the date when the presence of the species was last verified (even though all species are considered established and will probably be present after this year as well): +As there is no `end_year` information, we'll leave this field empty: ```{r} -distribution %<>% mutate(end_year = "2018") +distribution %<>% mutate(end_year = "") ``` Create `eventDate` by combining `start_year/end_year`: @@ -349,7 +449,7 @@ distribution %>% Remove the original columns: ```{r} -distribution %<>% select(-starts_with("raw_"), -start_year, -end_year) +distribution %<>% select(-starts_with("raw_"), -start_year, -end_year, -key, -value) ``` Preview data: @@ -366,38 +466,42 @@ write_csv(distribution, dwc_distribution_file, na = "") # Create description extension -In the description extension we want to include several important characteristics (hereafter refered to as descriptors) about the species: +Map the data to [Taxon Description](http://rs.gbif.org/extension/gbif/1.0/description.xml). -- Native range -- Pathway of introduction -- Invasion stage +Create `description`: -A single taxon can have multiple descriptions of the same type (e.g. multiple native ranges), expressed as multiple rows in the description extension. +```{r} +description <- raw_data +``` -For each descriptor, we create a separate dataframe to process the specific information. We always specify _which descriptor_ we map (`type` column) and its _specific content_ (`description` column). After the mapping of these Darwin Core terms `type` and `value`, we merge the dataframes to generate one single description extension. We then continue the mapping process by adding the other Darwin Core terms (which content is independent of the type of descriptor, such as `language`). +In the description extension we want to include the native range of the species. +A single taxon can have multiple native ranges of the same type, expressed as multiple rows in the description extension. The mapping will be as following: -## Native range +- `type` = `native range` +- `description` = the specific content of the field `raw_origin` +- `language` = `en` -Native range information (e.g. `AS` for Asia) can be found in `raw_origin`. +## Term mapping -Create separate dataframe: +### taxonID -```{r start_native_range} -native_range <- raw_data +```{r} +description %<>% mutate(taxonID = raw_taxon_id) ``` +### description + Show unique values: ```{r} -native_range %>% +description %>% distinct(raw_origin) %>% arrange(raw_origin) ``` - `raw_origin` contains multiple values (currently not more than 2), so we separate it on `" or "` in 2 columns: ```{r} -native_range %<>% separate(raw_origin, +description %<>% separate(raw_origin, into = c("native_range_1", "native_range_2"), sep = " or ", remove = FALSE, @@ -410,7 +514,7 @@ native_range %<>% separate(raw_origin, Gather in a `key` and `value` column: ```{r} -native_range %<>% gather( +description %<>% gather( key, value, native_range_1, native_range_2, na.rm = TRUE, # Also removes records for which there is no native_range_1 @@ -421,7 +525,7 @@ native_range %<>% gather( Map values: ```{r} -native_range %<>% mutate(mapped_value = recode(value, +description %<>% mutate(mapped_value = recode(value, "AS" = "Asia", "EE" = "Eastern Europe", "AFR" = "Africa")) @@ -430,114 +534,7 @@ native_range %<>% mutate(mapped_value = recode(value, Show mapped values: ```{r} -native_range %>% - select(value, mapped_value) %>% - group_by_all() %>% - summarize(records = n()) %>% - arrange(value) -``` - -Drop the `key` and `value` columns and rename `mapped_value` as `description`: - -```{r} -native_range %<>% - select(-key, -value) %>% - rename(description = mapped_value) -``` - -Create a `type` field to indicate the type of description: - -```{r} -native_range %<>% mutate(type = "native range") -``` - -## Pathway of introduction - -Pathway information can be found in `raw_pathway_s`. - -Create separate dataframe: - -```{r start_pathway} -pathway <- raw_data -``` - -Show unique values: - -```{r} -native_range %>% - distinct(raw_pathway_s) %>% - arrange(raw_pathway_s) -``` - -`raw_pathway_s` contains multiple values (currently not more than 2), so we separate it in 2 columns: - -```{r} -pathway %<>% separate( - raw_pathway_s, - into = c("pathway_1", "pathway_2"), - sep = ", ", - remove = FALSE, - convert = FALSE, - extra = "merge", - fill = "right" -) -``` - -Gather in a `key` and `value` column: - -```{r} -pathway %<>% gather( - key, value, - pathway_1, pathway_2, - na.rm = TRUE, # Also removes records for which there is no pathway_1 - convert = FALSE -) -``` - -We use the [CBD 2014 pathway vocabulary](https://www.cbd.int/doc/meetings/sbstta/sbstta-18/official/sbstta-18-09-add1-en.pdf) to standardize this information. The vocubulary has [these values](https://github.com/trias-project/vocab/tree/master/vocabulary/pathway). - -This is a manually created overview of the abbreviations used in this dataset, their interpretation and the mapping to the CBD vocabulary: - -```{r, echo = FALSE} -as.data.frame(matrix(data = c( - "AM", "Active Migration", "corridor_water", - "AN", "Angling/bait fish","escape_food_bait", - "AQ", "Aquaculture", "escape_aquaculture", - "BC", "Biological Control", "release_biologica_control", - "BW", "Ballast Water", "stowaway_ballast_water", - "OR", "Ornamental", "escape_ornamental", - "UN", "Unintentional", "Unintentional"), - nrow = 7, ncol = 3, byrow = TRUE, - dimnames = list(c(1:7), c("abbreviation", "full name", "CBD mapping")) -)) -``` - -Map values: - -```{r} -pathway %<>% mutate(mapped_value = recode(value, - "AM" = "corridor_water", - "AN" = "escape_food_bait", - "AQ" = "escape_aquaculture", - "BC" = "release_biological_control", - "BW" = "stowaway_ballast_water", - "OR" = "escape_ornamental", - "UN" = "unintentional" # Not part of CBD -)) -``` - -Add the prefix `cbd_2014_pathway:` to refer to this standard, except for `unintentional`, which has no alternative in the standard: - -```{r} -pathway %<>% mutate(mapped_value = case_when ( - mapped_value != "unintentional" ~ paste("cbd_2014_pathway", mapped_value, sep = ":"), - mapped_value == "unintentional" ~ mapped_value)) -``` - -Show mapped values: - -```{r} -pathway %>% +description %>% select(value, mapped_value) %>% group_by_all() %>% summarize(records = n()) %>% @@ -547,88 +544,23 @@ pathway %>% Drop the `key` and `value` columns and rename `mapped_value` as `description`: ```{r} -pathway %<>% +description %<>% select(-key, -value) %>% rename(description = mapped_value) ``` -Create a `type` field to indicate the type of description: - -```{r} -pathway %<>% mutate(type = "pathway") -``` - -## Invasion stage - -Invasion stage information (e.g. `casual`) can be found in `raw_status`. - -Create separate dataframe: - -```{r start_invasion_stage} -invasion_stage <- raw_data -``` - -Show unique values: - -```{r} -native_range %>% - distinct(raw_status) %>% - arrange(raw_status) -``` - -We use the [invasion stage vocabulary from Blackburn et al. (2011)](http://doc.rero.ch/record/24725/files/bach_puf.pdf) to standardize this information. - -* `A` and `A*` in the raw data file stand for `acclimatized` and refers to the status where the alien species has overcome the geographical barrier, the captivity/cultivation barrier and the survival barier, but where it fails to establish because individuals in the population fail to reproduce. This includes species (like Nile tilapia) in secluded warmer water of power plants. In Blackburn et al. (2011), this corresponds to the term `casual`. -* `N` in the raw data file stands for `naturalized`. We decided **not to use** this term, because often, there's no sensible criterium to distinguish between casual/naturalised and naturalised/established. Thus, here, we consider all `naturalized` species to be `established`. - -```{r} -invasion_stage %<>% mutate(description = case_when( - raw_status == "A" ~ "casual", - raw_status == "A*" ~ "casual", - raw_status == "N" ~ "established" -)) -``` - -Create a `type` field to indicate the type of description: - -```{r} -invasion_stage %<>% mutate(type = "invasion stage") -``` - -## Union descriptions - -Union native range, pathway of introduction and invasion stage: - -```{r start_description_ext} -description_ext <- bind_rows(native_range, pathway, invasion_stage) -``` - -## Term mapping - -Map the data to [Taxon Description](http://rs.gbif.org/extension/gbif/1.0/description.xml). - -### taxonID - -```{r} -description_ext %<>% mutate(taxonID = raw_taxon_id) -``` - -### description - -```{r} -description_ext %<>% mutate(description = description) -``` - ### type + +Create a `type` field to indicate the type of description: ```{r} -description_ext %<>% mutate(type = type) +description %<>% mutate(type = "native range") ``` ### language ```{r} -description_ext %<>% mutate(language = "en") +description %<>% mutate(language = "en") ``` ## Post-processing @@ -636,31 +568,31 @@ description_ext %<>% mutate(language = "en") Remove the original columns: ```{r} -description_ext %<>% select(-starts_with("raw_")) +description %<>% select(-starts_with("raw_")) ``` Move `taxonID` to the first position: ```{r} -description_ext %<>% select(taxonID, everything()) +description %<>% select(taxonID, everything()) ``` Sort on `taxonID` to group description information per taxon: ```{r} -description_ext %<>% arrange(taxonID) +description %<>% arrange(taxonID) ``` Preview data: ```{r} -description_ext %>% head(10) +description %>% head(10) ``` Save to CSV: ```{r} -write_csv(description_ext, dwc_description_file, na = "") +write_csv(description, dwc_description_file, na = "") ``` # Create species profile extension