ropensci / taxlist

Handling taxonomic lists
https://docs.ropensci.org/taxlist/
12 stars 4 forks source link

New function to exchange data using the Darwing Core Standard #37

Closed kamapu closed 7 months ago

kamapu commented 1 year ago

New functions are needed to import and export data using the Darwin Core Standard. These functions may depend on functions of the package taxastand.

kamapu commented 1 year ago

Some aspects to consider on developing the new functions:

joelnitta commented 1 year ago

I think you mean dwctaxon, not taxastand?

Anyways, dwctaxon has recently been submitted for review by rOpenSci, and I intend to submit to CRAN after it passes.

kamapu commented 1 year ago

I suggest to define a separated function, such as dwc2taxlist() or similar. Function df2taxlist() is written as a data.frame-method and checks mandatory columns in the input data. Once ready, we can insert a check in df2taxlist() that can recognize a standard column form DWC and automatically use this function to create the taxlist object. It is only an idea, though.

joelnitta commented 1 year ago

Update: dwctaxon is now on CRAN, so can be used as a dependency if needed.

kamapu commented 7 months ago

Time has passed @joelnitta. I was looking at a vignette for dwctaxon and noticed that you use tibbles as the class for the tables you handle. I am afraid that including dwctaxon as a dependency for taxlist might imply that several packages from tidyverse become dependencies for taxlist as well, and I would like to avoid that. Instead, I will take care of the coercion routines for data.frames, which need to take Darwin Core into account. From there to tibble may be just one more step.

kamapu commented 7 months ago

TODO:

kamapu commented 7 months ago

Hier it is the conversion table used by taxlist:

taxlist:::dwc_table
                       dwc        taxlist
1                  taxonID TaxonConceptID
2         scientificNameID   TaxonUsageID
3      acceptedNameUsageID   AcceptedName
4      originalNameUsageID       Basionym
5        nameAccordingToID         ViewID
6           scientificName      TaxonName
7                taxonRank          Level
8 scientificNameAuthorship     AuthorName