Hi everyone!
Thank you all for providing example datasets and being patient.
I have created a repository on GitHub which demonstrates how the API can be used with Python and the requests
library to create an application which mass-imports taxonomic data (including synonyms) to a Specify 7 instance.
In short, the demo takes a CSV containing information in the following format, creates a Mammalia
taxon node if one does not exist, and uploads the taxon records under the Mammalia node (at the correct ranks specified in the CSV columns)
Order | Family | Genus | Species | isAccepted | Author | AcceptedGenus | AcceptedSpecies | AcceptedAuthor |
---|---|---|---|---|---|---|---|---|
Afrosoricida | Tenrecidae | Microgale | talazaci | Yes | Major, 1896 | |||
Afrosoricida | Tenrecidae | Oryzorictes | talpoides | No | G.Grandidier & Petit, 1930 | Oryzorictes | hova | A.Grandidier, 1870 |
By default, the application is set to connect to https://sp7demofish.specifycloud.org/ using the sp7demofish
user and logging into the KUFishvoucher
collection, so you can see it in action and independently make edits to the code/data and see the result without worrying about making changes to a live production instance.
(If you plan on developing your own application or apopting the one in the repository, you can use this sp7demofish
instance for API testing purposes. The data in the instance should be regularly wiped).
The code was developed to be minimum-viable product (demo) without optimization in mind, so optimizations can be made to the code.
And/or host a Specify 7 instance locally and have the application connect to the local instance to improve performance.
If interested, please read the README of the repository
If this is not helpful, or an alternative approach should be considered, a demo using SQL directly to accomplish the same task can be made.