Example API searches for specific parameters
This section shows some examples of API search queries for datasets with specific parameters. There are many more parameters that can be searched, please refer to the TERN vocabularies for a full list of parameters. Each entry has its own unique URI that can be used as a search value.
Region
Filter data whose site is located within a specific region.
Example 1 - Data collected in the Bioregion Cape York Peninsula
Code Block |
---|
"region": [ "http://linked.data.gov.au/dataset/bioregion/CYP" ] |
Example 2 - Data collected in the Queensland state
Code Block |
---|
"region": [ "http://linked.data.gov.au/dataset/asgs2016/stateorterritory/3" ] |
Example 3 - Data collected either in Tasmania or in Cape York Peninsula
Code Block |
---|
"region": [ "http://linked.data.gov.au/dataset/asgs2016/stateorterritory/6", "http://linked.data.gov.au/dataset/bioregion/CYP" ] |
Dataset
Filter data by dataset.
Example - Data from “Tern Surveillance Monitoring” or “Williams Wet Tropics Vertebrates”
Code Block |
---|
"dataset": [ "http://linked.data.gov.au/dataset/ausplots", "http://linked.data.gov.au/dataset/wet-tropics-vertebrate" ] |
Site
Retrieve data from 1 or more ecological monitoring sites.
Example - Retrieve all the data from Tern Surveillance Monitoring site nsabbs0001
Code Block |
---|
"site_id": [ "http://linked.data.gov.au/dataset/ausplots/site-nsabbs0001" ] |
Site Visit
Retrieve data from 1 or more ecological monitoring sites.
Example - Retrieve all the data from Tern Surveillance Monitoring sitevisit 58580
Code Block |
---|
"site_visit_id": [ "http://linked.data.gov.au/dataset/ausplots/sv-58580" ] |
Feature type (feature of interest)
EcoPlots observations are categorised in Feature of Interest (FOI). Please see the FOI vocabularies for more detail.
Example - Retrieve all the data from Landform feature of interest
Code Block |
---|
"feature_type": [ "http://linked.data.gov.au/def/tern-cv/2cf3ed29-440e-4a50-9bbc-5aab30df9fcd" ] |
Parameter (observable property)
Each observation in EcoPlots is measuring an observable property (or parameter). Please see the Parameter vocabularies for more detail.
Example - Get all the data from Crown cover parameter.
Code Block |
---|
"observed_property": [ "http://linked.data.gov.au/def/tern-cv/83ac0278-51cd-4d1a-8e05-7c1fc68cf020" ] |
Temporal extent (date)
In addition to all the vocabularised facets, you can filter data based on a temporal resolution.
Code Block |
---|
"date_from": "2006-01-01", "date_to": "2021-07-30" |
Spatial extent
Need to explain how this works and how to do this.
Statial queries in EcoPlots allows three different formats: GeoJSON, Well-Known Text (WKT) and Bounding Box. The spatial query will do an “intersect” between the given geometry and the geometry of the data.
Code Block |
---|
# WKT examples: "spatial": "POINT (-77.03653 38.897676)" "spatial": "LINESTRING (-77.03653 38.897676, -77.009051 38.889939)" "spatial": "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))" "spatial": "MULTIPOINT (102.0 2.0, 103.0 2.0)" "spatial": "MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))" "spatial": "MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))" |
Code Block |
---|
# GEOJSON examples: "spatial": { "type" : "Point", "coordinates" : [-77.03653, 38.897676] } "spatial": { "type" : "LineString", "coordinates" : [[-77.03653, 38.897676], [-77.009051, 38.889939]] } "spatial": { "type" : "Polygon", "coordinates" : [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] } "spatial": { "type" : "MultiPolygon", "coordinates" : [ [ [[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]] ], [ [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] ] ] } "spatial": { "type": "MultiPoint", "coordinates": [ [ 139.213700000, -34.358210000 ], [ 150, -35 ] ] } |
Code Block |
---|
# Bounding Box (BBOX) example "spatial": [139.2, -34.35, 140.0, -35.00] |