Skip to content

Commit

Permalink
add schema.jq file
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpoelen committed Jun 20, 2022
1 parent 655447a commit 325efda
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ Machine readable version of Handbook of the Mammals of the World

Physical copies of Handbook of the Mammals of the World are a valuable taxonomic resource for mammals.

This repository uses Plazi digitized versions of these physical copies to generate [hmw.json](hmw.json), and [hmw.csv](hmw.csv). For your convenience, the first 10 records can be found [hmw-sample.json](hmw-sample.json), [hmw-sample-pretty.json](hmw-sample-pretty.json) and [hmw-sample.csv](hmw-sample.csv). The json and csv files are derived from a Preston tracked version of Plazi's treatment bank available via https://github.com/plazi/treatments-xml. You can find a copy of a tracked copy of this in the [Releases](../releases) section of this repository.


[Preston](https://preston.guoda.bio), [jq](https://stedolan.github.io/jq/), Miller (https://miller.readthedocs.io/en/latest/), and other commandline tools (e.g., ```time```, ```grep```, ```gzip```, ```tee```).
This repository uses Plazi digitized versions of these physical copies to generate [hmw.json](hmw.json), and [hmw.csv](hmw.csv). For your convenience, the first 10 records can be found [hmw-sample.json](hmw-sample.json), [hmw-sample-pretty.json](hmw-sample-pretty.json) and [hmw-sample.csv](hmw-sample.csv). The json and files are derived from a Preston tracked version of Plazi's treatment bank available via https://github.com/plazi/treatments-xml. You can find a copy of a tracked copy of this in the [Releases](../releases) section of this repository.
The csv files are generated using [jq](https://stedolan.github.io/jq/) using [schema.jq](schema.jq) and Miller (https://miller.readthedocs.io/en/latest/).


```bash
Expand Down
27 changes: 27 additions & 0 deletions schema.jq
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"docId" : .docId,
"docOrigin" : .docOrigin,
"docISBN" : .docISBN,
"docName" : .docName,
"docMasterId" : .docMasterId,
"docPageNumber" : .docPageNumber,
"derivedFrom" : .["http://www.w3.org/ns/prov#wasDerivedFrom"],
"name" : .name,
"interpretedGenus" : .interpretedGenus,
"interpretedSpecies" : .interpretedSpecies,
"interpretedAuthorityName" : .interpretedAuthorityName,
"interpretedAuthorityYear" : .interpretedAuthorityYear,
"commonNames" : .commonNames,
"taxonomy" : .taxonomy,
"subspeciesAndDistribution" : .subspeciesAndDistribution,
"descriptiveNotes": .descriptiveNotes,
"habitat" : .habitat,
"foodAndFeeding" : .foodAndFeeding,
"breeding" : .breeding,
"activityPatterns" : .activityPatterns,
"movementsHomeRangeAndSocialOrganization" : .movementsHomeRangeAndSocialOrganization,
"statusAndConservation": .statusAndConservation,
"bibliography" : .bibliography,
"distributionImageURL" : .distributionImageURL,
"verbatimText" : .verbatimText
}

0 comments on commit 325efda

Please sign in to comment.