The goal of the dyntaxa
R package is to provide a read-only R package
to interface with Dyntaxa - the taxonomic database of organisms in
Sweden.
Dyntaxa contains information about 61,500 species occurring in Sweden. This includes about 95% of known multicellular species – remaining gaps mainly found among the fungi. The scope of organisms include multicellular species documented in Sweden and such unicellular species that are included in environmental monitoring by the Swedish EPA. In addition to these species there are many names at other taxonomic levels, scientific synonyms, Swedish vernaculars.
The Dyntaxa database is published by Artdatabanken at GBIF.org by Johan Liljeblad.
Liljeblad J (2019). Dyntaxa. Svensk taxonomisk databas. ArtDatabanken. Checklist dataset https://doi.org/10.15468/j43wfc.
You can install the dyntaxa
R package from
GitHub with:
remotes::install_github("mskyttner/dyntaxa")
This package can be used to automate the following tasks:
- Taxonomic identifier from a taxonomic name and vice versa
- Taxonomic name from a vernacular (common) name and vice versa
- Taxonomic hierarchy/classification from identifier or name
- Taxonomic children of an identifier or name
- All taxa downstream to a certain rank from identifier or name
- Taxonomic synonyms from identifier or name
Here are some short and simple usage examples which shows you how to download and access data from Dyntaxa for those tasks.
# we use dplyr for data manipulation (pipe, filtering etc)
suppressPackageStartupMessages(library(dplyr))
library(dyntaxa)
__ __
.--| .--.--.-----| |_.---.-.--.--.---.-.
| _ | | | | _| _ |_ _| _ |
|_____|___ |__|__|____|___._|__.__|___._|
|_____|
Cannot find Dyntaxa data locally...
... attempting download using library(dyntaxa); dyntaxa_init()
#lookup taxonomic name from taxonomic identifier
dyntaxa_search('"urn:lsid:dyntaxa.se:Taxon:220023"') %>%
pull(scientificName)
[1] "Campanula rotundifolia"
# lookup taxonomic identifier from taxonomic name
dyntaxa_search("Alces+alces") %>% pull(taxonId)
[1] "urn:lsid:dyntaxa.se:Taxon:206046"
# search fulltext index for several terms
dyntaxa_search("blåklocka OR vitsippa")
# A tibble: 7 x 17
taxonId acceptedNameUsa… parentNameUsage… scientificName taxonRank
<chr> <chr> <chr> <chr> <chr>
1 urn:ls… urn:lsid:dyntax… urn:lsid:dyntax… Anemone nemor… species
2 urn:ls… urn:lsid:dyntax… urn:lsid:dyntax… Campanula rot… species
3 urn:ls… urn:lsid:dyntax… urn:lsid:dyntax… Campanula rot… subspeci…
4 urn:ls… urn:lsid:dyntax… urn:lsid:dyntax… Campanula ame… species
5 urn:ls… urn:lsid:dyntax… urn:lsid:dyntax… Anemone nemor… species
6 urn:ls… urn:lsid:dyntax… urn:lsid:dyntax… Campanula per… species
7 urn:ls… urn:lsid:dyntax… urn:lsid:dyntax… Campanula per… variety
# … with 12 more variables: scientificNameAuthorship <chr>,
# taxonomicStatus <chr>, nomenclaturalStatus <chr>, taxonRemarks <chr>,
# kingdom <chr>, phylum <chr>, class <chr>, order <chr>, family <chr>,
# genus <chr>, species <chr>, vern <chr>
Available older dyntaxa database files can be listed from the file mirror archive:
dyntaxa_archive() %>% slice(1:5)
# A tibble: 5 x 3
fn ts url
<chr> <dttm> <chr>
1 dyntaxa-dwca-2020_1… 2020-11-16 02:00:00 https://archive.infrabas.se/dyntaxa/…
2 dyntaxa-dwca-2020_1… 2020-11-15 02:00:00 https://archive.infrabas.se/dyntaxa/…
3 dyntaxa-dwca-2020_1… 2020-11-14 02:00:00 https://archive.infrabas.se/dyntaxa/…
4 dyntaxa-dwca-2020_1… 2020-11-13 02:00:00 https://archive.infrabas.se/dyntaxa/…
5 dyntaxa-dwca-2020_1… 2020-11-12 02:00:00 https://archive.infrabas.se/dyntaxa/…
Some files are duplicates, find out which ones:
knitr::kable(dyntaxa_archive_diffs())