ECMWFCode4Earth / vAirify

code repository for 2024 Code for Earth project #16
0 stars 0 forks source link

Create an API to query forecast data textures #152

Open sebsteinig opened 4 days ago

sebsteinig commented 4 days ago

We need to get the location and file names for the global pollutant data textures in order to display them as maps on the frontend.

Acceptance Criteria

{
  "forecast_base_time": "2024-06-06T09:00:00+00:00",
  "variables": {
    "pm2_5": [
      {
        "time_start": "2024-06-28 12:00:00",
        "time_end": "2024-06-29 09:00:00",
        "chunk": "1 of 6",
        "min_value": 0,
        "max_value": 1000,
        "units": "kg m**-3 * 1e-9",
        "texture_uri": "/app/data_textures/2024-06-25_12/pm2_5_2024-06-25_12_CAMS_global.chunk_1_of_6.webp"
      },
      {
        "time_start": "2024-06-29 12:00:00",
        "time_end": "2024-06-30 09:00:00",
        "chunk": "2 of 6",
        "min_value": 0,
        "max_value": 1000,
        "units": "kg m**-3 * 1e-9",
        "texture_uri": "/app/data_textures/2024-06-25_12/pm2_5_2024-06-25_12_CAMS_global.chunk_2_of_6.webp"
      }
    ],
    "pm10": [
      {
        "time_start": "2024-06-28 12:00:00",
        "time_end": "2024-06-29 09:00:00",
        "chunk": "1 of 6",
        "min_value": 0,
        "max_value": 1000,
        "units": "kg m**-3 * 1e-9",
        "texture_uri": "/app/data_textures/2024-06-25_12/pm10_2024-06-25_12_CAMS_global.chunk_1_of_6.webp"
      },
      {
        "time_start": "2024-06-29 12:00:00",
        "time_end": "2024-06-30 09:00:00",
        "chunk": "2 of 6",
        "min_value": 0,
        "max_value": 1000,
        "units": "kg m**-3 * 1e-9",
        "texture_uri": "/app/data_textures/2024-06-25_12/pm10_2024-06-25_12_CAMS_global.chunk_2_of_6.webp"
      }
    ]
  }
}