Created
March 7, 2022 11:16
-
-
Save ammojamo/b03d48284ad8172aab0bf8cb00657b70 to your computer and use it in GitHub Desktop.
Convert Bionet Species Names to Sqlite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://data.bionet.nsw.gov.au/biosvcapp/odata/SpeciesNames > SpeciesNames.json | |
cat SpeciesNames.json | jq -r '(.value|map(keys)|add|unique) as $cols | (.value | map(. as $row | $cols | map($row[.]))) as $rows | $cols, $rows[] | @csv' > SpeciesNames.csv | |
echo '.mode csv | |
.import SpeciesNames.csv spname' | sqlite3 spname.sqlite |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment