4. Data

4.1. Time Series

The following link contains some data, which stores the date and time of the measurement, a representing value, an id and a version, which should be 1.0 for every measurement.
With a combination of query options from both TOARDB REST interface - 2.4 Stationmeta and TOARDB REST interface - 2.5 Timeseries you can filter the data you want to get. (https://toar-data.fz-juelich.de/api/v2/data/timeseries/[?QUERY-OPTIONS])

Here are some examples to use as query options:

daterange = <list of two datetimes: date range for which to extract data>
flags = <list of strings: only select data points with the specified quality flags> (for a description of flags and all available flag names see User Guide - 5.2 Data Quality Flags)
format = <string> (json|csv) (default: json)

Response: The query will return a unique task identifier and a link to check the status of your query.
Example: https://toar-data.fz-juelich.de/api/v2/analysis/data/timeseries/?country=DE&variable_id=5&limit=3&daterange=2010-01-01T00:00:00,2020-12-31T23:59:59&flags=AllOK&format=csv
Result: {
“task_id”:”94e3888a-33f8-4adf-a6d6-4d8627c9ecc0”,
“status”:”https://toar-data.fz-juelich.de/api/v2/analysis/status/94e3888a-33f8-4adf-a6d6-4d8627c9ecc0”
}

To retrieve the result send a request to the status endpoint with your task identifier. If the result is there you will be redirected. The result will be a zip archive containing one file per time series in the format you have chosen.

4.2. Map

The following link contains some data, which stores an id and a value for every measurement.

Here are some examples to use as query options:

datetime = <datetime: date and time for which to extract data>
variable_id = <integer: variable to extract>
bounding_box = <list of four numbers: bounding_box (min_lat,min_lon,max_lat,max_lon) in degrees_north/degrees_east to define a geographical rectangle (do not set anything for global extraction)> (default: None)
format = <string> (json|csv) (default: json)

Response: The query qill return tuples of latitude, longitude and value at the location in the specified format.
Example: https://toar-data.fz-juelich.de/api/v2/analysis/data/map/?datetime=2020-07-23T13:00:00&variable_id=5&bounding_box=47.5,6.5,54.5,14.5
Result:
[{“lat”:47.81564999946587,”lon”:13.03488,”value”:68.0628783549876}, {“lat”:47.8055555994659,”lon”:13.043333,”value”:65.96268275498761}, … {“lat”:53.2465,”lon”:6.60894,”value”:43.978797594987604}, {“lat”:52.0918,”lon”:6.60537,”value”:54.1289075949876}]