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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>ALA Static Species Map Generator</title> | |
| <style> | |
| body { font-family: sans-serif; padding: 20px; background-color: #f4f4f9; } | |
| #map-container { margin-top: 15px; } | |
| img { border: 1px solid #ccc; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } | |
| #status { font-weight: bold; color: #555; } |
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
| async function generateStaticMapImage(speciesName) { | |
| const width = 800; | |
| const height = 700; | |
| const bbox = "112,-44,154,-9"; // Australia bounding box | |
| const canvas = document.createElement('canvas'); | |
| canvas.width = width; | |
| canvas.height = height; | |
| const ctx = canvas.getContext('2d'); |
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
| { | |
| "id": "transportation", | |
| "type": "line", | |
| "source": "openmaptiles", | |
| "source-layer": "transportation", | |
| "filter": [ | |
| "!in", | |
| "class", | |
| "path", | |
| "footway", |
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
| import urllib.request | |
| import json | |
| import csv | |
| # pull out names, imageID, image URL, etc., from ALA occurrences API | |
| url = "https://biocache-ws.ala.org.au/ws/occurrences/search?q=data_resource_uid:dr660&pageSize=5000" | |
| req = urllib.request.Request(url) | |
| r = urllib.request.urlopen(req).read() | |
| content = json.loads(r.decode('utf-8')) | |
| counter = 0 |
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
| # find all DwC terms in index/fields | |
| curl -s https://biocache-ws.ala.org.au/ws/index/fields | jq -r '.[] | select(.dwcTerm != null) | .dwcTerm ' | |
| curl -s "https://biocache-ws.ala.org.au/ws/index/fields" | jq -r '.[] | select(.dwcTerm != null) | "\(.name)|\(.dwcTerm)" ' |
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
| #!/usr/local/bin/bash | |
| # | |
| # Script to generate distinct values and counts for DwC fields in the ALA (CSV output) | |
| # Requires the jq tool to be installed - see https://stedolan.github.io/jq/ | |
| # Requires BASH v.4+ | |
| # | |
| # Author: Nick dos Remedios <nick.dosremedios@csiro.au> 2018-07-04 | |
| # | |
| # requested fields: | |
| # |
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
| #!/usr/local/bin/bash | |
| # | |
| # Iterate over list of GBIF DOI keys from data_resource table and get a count of the | |
| # distinct publication citations via GBIF API by storing each citation DOI (ID) in an | |
| # associative array and then reading the length of the this array. | |
| # | |
| # Requires BASH version > 4 and JQ command line tool (https://github.com/stedolan/jq) | |
| # | |
| # SQL: select gbif_registry_key from data_resource where gbif_registry_key <> ''; | |
| # |
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
| #!/bin/bash | |
| # https://unix.stackexchange.com/a/295528 | |
| # get list of fields: | |
| # mysql -u root -ppassword -D collectory -s -e "describe data_resource;" (paste into Excel and copy first column) | |
| # | |
| # run as ./collectory-sql-script-1.sh data_resource_fields.txt > data_resource_fields.csv | |
| TABLE="data_hub" | |
| USER="root" # change to your DB user |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <style type="text/css"> | |
| html { height: 100% } | |
| body { height: 100%; margin: 0px; padding: 0px } | |
| #map_canvas { height: 100% } | |
| </style> |
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
| license: apache-2.0 | |
| height: 800 |
NewerOlder