Skip to content

Instantly share code, notes, and snippets.

@debpaul
Last active July 11, 2019 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debpaul/30f8db15f665ebea9d59d8ed87b50988 to your computer and use it in GitHub Desktop.
Save debpaul/30f8db15f665ebea9d59d8ed87b50988 to your computer and use it in GitHub Desktop.
query iDigBio for preparationType information
Need: search of data where specimen "preparation" information exists.
Possibilities:
https://search.idigbio.org/v2/search/records/?rq={"data.dwc:dynamicProperties":["preparationType","preparation"]}
returns hits where the strings _preparationType_ or _preparation_ are found in the dynamicProperties data
currently returns over 200 records
note with this query - you could also search for strings like "alcohol" or similar
https://search.idigbio.org/v2/search/records/?rq={"data.dwc:preparations":{"type":"exists"}}
returns over 53M records where the field dwc:preparations is present
https://search.idigbio.org/v2/search/records/?rq={"family":["cyprinidae","ictaluridae"],"data.dwc:preparations":{"type":"exists"}}
returns now limited by family, returning records that have dwc:preparations for specimens with
cyprinidae or ictaluridae provided as family
Options for Downloading Data:
Using Firefox as your Browser: once search is run, you can filter the results using the Filter JSON option
(see top right of your screen). (Chrome does not have this feature automatically, you would need to add an extension).
simply type in text string like
alcohol or perhaps just a partial string like alc
and the software will limit the recordset to only records with the string you entered.
Once search is run (using any browser), you can download the data (in JSON format).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment