tdwg / camtrap-dp

Camera Trap Data Package (Camtrap DP)
https://camtrap-dp.tdwg.org
MIT License
43 stars 5 forks source link

Question about full json descriptors... #379

Closed saulgreenberg closed 5 months ago

saulgreenberg commented 5 months ago

Feel free to continue this by emailing me: saul.greenberg@ucalgary.ca . If so, you can just mark this as handled.

I am the creator of Timelapse, a widely used image analyzer (that also works with Megadetector) for camera trap images. See https://saul.cpsc.ucalgary.ca/timelapse/

Timelapse is highly customizable, where it can work with different metadata standards. I recently turned to CamtrapDP, where I wrote a bit of code that allows me to create all the CamtrapDP fields by reading in the json files (e.g., by importing deployments-table-schema.json). However, I can't find a complete definition of the various possible json fields in the schema except by inferring them from what is included in the schema. To illustrate, there are various fields possible under constraints (required, unique, minimum, maximum etc). However, I can only infer which constraints fields are possible by scanning through all schemas and seeing which ones are present.

Is there a definition file or web page that actually lists all the possible field and sub-field names? Or is the only way to do it is by merging all the field names mentioned in the schema files?

Thanks, Saul Greenberg

peterdesmet commented 5 months ago

I recently turned to CamtrapDP, where I wrote a bit of code that allows me to create all the CamtrapDP fields by reading in the json files (e.g., by importing deployments-table-schema.json) Cool! When reading files from a URL, I recommend using a URL that contains the version (1.0):

However, I can only infer which constraints fields are possible by scanning through all schemas and seeing which ones are present. The constraints properties are derived from the Table Schema standard, a full list is available athttps://specs.frictionlessdata.io/table-schema/#constraints and includes:

The Table Schema standard also lists all the available properties per field ("Field Descriptors"), their types ("Types and Formats") and table-level properties, such as missing fields. Camtrap DP uses:

Per field:

Per table:

Hope this helps! If so, you can close this issue.