Data

Look up observation data.

Query Index:

Observation Data as JSON

Method: GET
URI
/v4/data/(domain)/(key)/(startdate|latest)/(enddate|period)[?aggregationPeriod=(aggregation_period)&aggregationFunction=(aggregation_function)]
Accept
application/json
(this is the default format)

Query Parameters

Required:
domain
For example, dart for Deep-ocean Assessment and Reporting of Tsunami.
key
The key of the data associated to. It should have the format of /station/name/sensorCode/method/aspect, for example, NZE/water-height/40/15s/nil.
sensorCode,method, and aspect can be - for wildcard matching, for instance, NZE/water-height/-/15s/nil will try to match water-height series with any sensor code and method=15s and aspect=nil.
startdate
The start date of the query period in the format of yyyy-mm-dd, UTC time zone.
enddate
The end date of the query period in the format of yyyy-mm-dd, UTC time zone.

Start date and end date may not be today or a day in the future. For the latest data from today please use the latest/(period) style of request.

The start date and the end date are inclusive, for example, 2021-06-04/2021-06-04 returns all data that have a timestamp that occurs on that date i.e, between 2021-06-04 00:00:00 UTC and 2021-06-04 24:00:00 UTC
latest
By specifying latest in (startdate) field in conjuction with (period), the user can simply query for the latest period of data.
period
The latest period to query. Can be 30d (latest 30 days), 7d, 2d, 1d, or 6h (latest 6 hours).
Optional:
aggregationPeriod
Specifying the time window to do aggregation. Can be 1m (1 minute), 5m, 10m, 15m, 30m, 1h (1 hour), 2h, 3h, 4h, 6h, 8h, 12h, or 1d (1 day)
aggregationFunction
Method to aggregate return values. Can be min for minimum, max for maximum, mean for mean, sum for summation, or perc(N) for (N)th percentile (eg. perc95).

Response Properties

Response has the JSON struct of:

[
    {
        "data": [
            {
                "val": 5237100,
                "err": 0,
                "qc": "",
                "ts": "2021-03-05T00:00:00Z"
            },
            (repeated)
        ],
        "series": {
            "domain": "dart",
            "station": "NZE",
            "name": "water-height",
            "sensorCode": "40",
            "method": "15s",
            "aspect": "nil"
        },
        "latitude": -36.0493,
        "longitude": -177.708,
        "elevationM": 0,
        "datum": "WGS84",
        "relativeHeightM": -5779,
        "valueUnit": "m",
        "errorUnit": "m",
        (if present:)
        "additionalMetadataMap": {
            "key": "value",
        },
        "mutableMetadata": [
            {
                "start": "2021-03-05T00:00:00Z",
                "end": "2021-04-05T00:00:00Z",
                "metadataMap": {
                    "key": "value1",
                }
            },
            {
                "start": "2021-04-06T00:00:00Z",
                "end": "2021-05-10T00:00:00Z",
                "metadataMap": {
                    "key": "value2",
                }
            }
        ]
    },
    {
        // repeated JSON objects if multiple series matched
    }
]
    
data object
ts
The date-time of the observation in ISO8601 format, UTC time zone.
val
The observation value.
err
The observation error. 0 is used for an unknown error.
qc
The observation's quality control flag.

series object
domain
The series' domain name, an overall description of the type of observations that have been recorded (e.g. dart). It is an handy label to help in searching for data of a certain use and type.
station
The series' station code, a unique string identifier which can be used to describe where the measurement has been taken ( see /station endpoint [in development] ).
name
The series' name, a general name for the observation. It includes the measurement itself and the object being measured. It is also used to differentiate different series observed at the same Station, eg: water-height, temperature.
sensorCode
The station sensor's code. A measurement specific term used to distinguish between multiple sensors at a given station performing the same operation. For example seismic sensors in the same borehole may have different numbers, or successive DART buoys deployed in the same nominal station but at slightly different locations. SensorCode can also be 'nil' (not applicable).
method
A human readable description of the measurement collection method, typically for manual observations, e.g. 'thermometer', 'lab-analysis', 'cospec', or, for regularly sampled that are available at different resolutions, the time resolution of the series, for e.g. 'high rate', 'low rate', '10-min'.
aspect
Aspect – The series' aspect, a human readable description that captures a discrete part or feature of the time series. Different Aspects of a time series are obtained with the same method (process) and collected by the same station and sensorCode, but are representing a different output in the spectrum of possible results. It can be used to specify exactly which of several related data series is requested. For example, 'east, north, up' are 3 different aspects of the same gnss displacement time series; '10cm, 20cm, 30cm' are different aspects of the same soil-moisture collection sensor, that measures the same entity at different depths. Aspect can also be 'nil' (not applicable)

attributes
latitude
The series' latitude.
longitude
The series' longitude.
valueUnit
The observation's value unit.
errorUnit
The observation's error unit.
elevationM
Height in metres of the Sensor above the free surface for the given Reference Datum.
datum
Geographical reference system used for the latitude, longitude & elevation/height.
relativeHeightM
Relative height of the station with respect to the series elevation and datum, in metres. If station is installed underwater, relative height is the depth of water in metres above the station. If station is installed above the ground, relative height is the height of the station above the ground.
additionalMetadataMap
(Optional) Additional metadata for the series. These meta-data types are not present for all series.
For example (in the future), for LRDCP data, a feature description could be added:
feature-description: Small lake on south east side of crater.
mutableMetadata
(Optional) Additional metadata that define properties of the series that can change over time. These meta-data types are not present for all series.
For example (in the future), for FITS data, relativeHeightOffset could be provided:
start: The start of this period of meta data values coming into effect
end: The end of this period of meta data values coming into effect
relativeHeightOffset: Additional height offset to be added or substracted to relativeHeightM, in metres.

Example Query and Response

[
    {
        "data": [
            {
                "val": 5237100,
                "err": 0,
                "qc": "",
                "ts": "2021-03-05T00:00:00Z"
            },
            (repeated)
        ],
        "series": {
            "domain": "dart",
            "station": "NZE",
            "name": "water-height",
            "sensorCode": "40",
            "method": "15s",
            "aspect": "nil"
        },
        "latitude": -36.0493,
        "longitude": -177.708,
        "elevationM": 0,
        "datum": "WGS84",
        "relativeHeightM": -5779,
        "valueUnit": "m",
        "errorUnit": "m",
    }
]
        
Aggregate by mean with 1-day period
/v4/data/dart/NZE/water-height/40/15s/nil/2020-03-05/2021-03-05?aggregationPeriod=1d&aggregationFunction=mean
(for results, refer to the example above)
Query for latest 6 hours observations
/v4/data/dart/NZE/water-height/40/15s/nil/latest/6h
(for results, refer to the example above)

Observation Data as CSV

Method: GET
URI
/v4/data/(domain)/(key)/(startdate|latest)/(enddate|period)[?aggregationPeriod=(aggregation_period)&aggregationFunction=(aggregation_function)]
Accept
text/csv

Query Parameters

The same as Data as JSON


Response Properties

column 1 to 6
The domain, station, name, sensor code, method, and aspect of the observation.
column 7
The date-time of the observation in ISO8601 format, UTC time zone.
column 8
The observation value.
column 9
The observation value unit.
column 10
The observation error. 0 is used for an unknown error.
column 11
The observation error unit.
column 12
The observation's quality control flag.

Example Query and Response

curl --header "Accept: text/csv" -o dart.csv https://tilde.geonet.org.nz/v4/data/dart/NZE/water-height/40/15s/nil/2021-03-05/2021-03-05
domain,station,name,sensorCode,method,aspect,timestamp,value,valueUnit,error,errorUnit,qualityControl
dart,NZE,water-height,40,15s,nil,2021-03-05T00:00:00Z,5778684.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T00:15:00Z,5778681.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T00:30:00Z,5778679.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T00:45:00Z,5778679.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T01:00:00Z,5778678.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T01:15:00Z,5778676.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T01:30:00Z,5778675.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T01:45:00Z,5778674.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T02:00:00Z,5778671.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T02:15:00Z,5778670.0000000,m,0.0000000,m,
dart,NZE,water-height,40,15s,nil,2021-03-05T02:30:00Z,5778668.0000000,m,0.0000000,m,
...