Skip to content

API Documentation

wherop edited this page Oct 30, 2024 · 2 revisions

API Documentation

Constants

Aggregation Methods

  • MEAN
  • MEDIAN
  • MAX
  • MIN

Locations

  • TEMPELHOFER-FELD

  • Coordinates:

    [
      [13.393926142690503, 52.479459342318194],
      [13.39035120841146, 52.47528176851594],
      [13.390475915421774, 52.47274971256647],
      [13.396461851886613, 52.46831826407774],
      [13.403694858449427, 52.466849456987205],
      [13.412964746171014, 52.46897667893188],
      [13.416622818456005, 52.47090121972539],
      [13.415209472346135, 52.47626923084667],
      [13.410969434016465, 52.47728198970532],
      [13.408101172792328, 52.47869981294684],
      [13.405856446618543, 52.479459342318194],
      [13.399662665136049, 52.479889736475684],
      [13.393926142690503, 52.479459342318194]
    ]

Temporal Resolution

  • DAILY (UTC Time Days, start time of day will be rounded down, end time of day will be rounded up)
  • MONTHLY (calendar month, not shifting, round start date to the beginning of calendar month, round end date to the end of calender month)

API Routes

Temperature Data

  • Temperature
    Endpoint: /weather/temperature
    Query Parameters:

    • startDate (required): <UNIX TIMESTAMP SECONDS>
    • endDate (required): <UNIX TIMESTAMP SECONDS>
    • location (required): <STRING,"TEMPELHOFER-FELD">
    • temporalResolution (required): <STRING, "DAILY" | "MONTHLY">
    • aggregation (required): <STRING, "MEAN" | "MEDIAN" | "MAX" | "MIN">

    Response

    {
      "meta":{
        "unit": "Celsius",
        "location": "TEMPELHOFER-FELD",
        "startDate": 1617235200,
        "endDate": 1617321600,
        "temporalResolution": "DAILY",
        "aggregation": "MEAN"
      },
      "data":[
        {
          "value": 13.45,
          "datetime": 1617321600
        },
        {
          "value": 15.5,
          "datetime": 1617555600
        }
        {
          "value": 24,
          "datetime": 1677721600
        }
      ]
    }

NDVI Data

  • NDVI Index
    Endpoint: /index/NDVI
    Query Parameters:

    • startDate (required): <UNIX TIMESTAMP SECONDS>
    • endDate (required): <UNIX TIMESTAMP SECONDS>
    • location (required): <STRING,"TEMPELHOFER-FELD">
    • temporalResolution (required): <STRING, "DAILY" | "MONTHLY">
    • aggregation (required): <STRING, "MEAN" | "MEDIAN" | "MAX" | "MIN">

    Response

    {
      "meta":{
        "index": "NDVI",
        "location": "TEMPELHOFER-FELD",
        "startDate": 1617235200,
        "endDate": 1617321600,
        "temporalResolution": "DAILY",
        "aggregation": "MEAN"
      },
      "data":[
        {
          "value": 0.1,
          "datetime": 1617321600
        },
        {
          "value": 0.5,
          "datetime": 1617555600
        }
        {
          "value": -0.3,
          "datetime": 1677721600
        }
      ]
    }
  • MSAVI Index
    Endpoint: /index/MSAVI
    Query Parameters:

    • startDate (required): <UNIX TIMESTAMP SECONDS>
    • endDate (required): <UNIX TIMESTAMP SECONDS>
    • location (required): <STRING,"TEMPELHOFER-FELD">
    • temporalResolution (required): <STRING, "DAILY" | "MONTHLY">
    • aggregation (required): <STRING, "MEAN" | "MEDIAN" | "MAX" | "MIN">

    Response

  {
    "meta":{
      "index": "MSAVI"
      "location": "TEMPELHOFER-FELD",
      "startDate": 1617235200,
      "endDate": 1617321600,
      "temporalResolution": "DAILY",
      "aggregation": "MEAN"
    },
    "data":[
      {
        "value": 0.1,
        "datetime": 1617321600
      },
      {
        "value": 0.5,
        "datetime": 1617555600
      }
      {
        "value": -0.3,
        "datetime": 1677721600
      }
    ]
  }
  • GNDVI Index
    Endpoint: /index/GNDVI
    Query Parameters:

    • startDate (required): <UNIX TIMESTAMP SECONDS>
    • endDate (required): <UNIX TIMESTAMP SECONDS>
    • location (required): <STRING,"TEMPELHOFER-FELD">
    • temporalResolution (required): <STRING, "DAILY" | "MONTHLY">
    • aggregation (required): <STRING, "MEAN" | "MEDIAN" | "MAX" | "MIN">

    Response

  {
    "meta":{
      "index": "GNDVI",
      "location": "TEMPELHOFER-FELD",
      "startDate": 1617235200,
      "endDate": 1617321600,
      "temporalResolution": "DAILY",
      "aggregation": "MEAN"
    },
    "data":[
      {
        "value": 0.1,
        "datetime": 1617321600
      },
      {
        "value": 0.5,
        "datetime": 1617555600
      }
      {
        "value": -0.3,
        "datetime": 1677721600
      }
    ]
  }