datagovsg / datagovsg-datasets

A repository to track dataset request, issues and suggestions.
87 stars 25 forks source link

Air temperature across Singapore #914

Closed nchlsgh1 closed 3 years ago

nchlsgh1 commented 3 years ago

Please provide the name of the dataset or describe the dataset that you're requesting:

https://data.gov.sg/dataset/realtime-weather-readings

Air temperature across Singapore & Relative Humidity across Singapore

Do you know which agency provides/can provide this data?

National Environment Agency

If there's an issue with a dataset, please provide a description of the problem

If the current time now is 10:41PM and using the current time in the API call, only 3 weather station values are retrieved:

curl -X GET "https://api.data.gov.sg/v1/environment/air-temperature?date_time=2020-11-08T22%3A41%3A00" -H "accept: application/json"

Only gets:

{
  "metadata": {
    "stations": [
      {
        "id": "S50",
        "device_id": "S50",
        "name": "Clementi Road",
        "location": {
          "latitude": 1.3337,
          "longitude": 103.7768
        }
      },
      {
        "id": "S116",
        "device_id": "S116",
        "name": "West Coast Highway",
        "location": {
          "latitude": 1.281,
          "longitude": 103.754
        }
      },
      {
        "id": "S100",
        "device_id": "S100",
        "name": "Woodlands Road",
        "location": {
          "latitude": 1.4172,
          "longitude": 103.74855
        }
      }
    ],
    "reading_type": "DBT 1M F",
    "reading_unit": "deg C"
  },
  "items": [
    {
      "timestamp": "2020-11-08T22:35:00+08:00",
      "readings": [
        {
          "station_id": "S50",
          "value": 26.5
        },
        {
          "station_id": "S116",
          "value": 27.2
        },
        {
          "station_id": "S100",
          "value": 26.7
        }
      ]
    }
  ],
  "api_info": {
    "status": "healthy"
  }
}

Only on subtracting some time from the current timestamp (About 10 minutes back from 10:41PM) will the full list be displayed:

curl -X GET "https://api.data.gov.sg/v1/environment/air-temperature?date_time=2020-11-08T22%3A34%3A00" -H "accept: application/json"

Full list manually back tracking on the timestamp

{
  "metadata": {
    "stations": [
      {
        "id": "S109",
        "device_id": "S109",
        "name": "Ang Mo Kio Avenue 5",
        "location": {
          "latitude": 1.3764,
          "longitude": 103.8492
        }
      },
      {
        "id": "S117",
        "device_id": "S117",
        "name": "Banyan Road",
        "location": {
          "latitude": 1.256,
          "longitude": 103.679
        }
      },
      {
        "id": "S50",
        "device_id": "S50",
        "name": "Clementi Road",
        "location": {
          "latitude": 1.3337,
          "longitude": 103.7768
        }
      },
      {
        "id": "S107",
        "device_id": "S107",
        "name": "East Coast Parkway",
        "location": {
          "latitude": 1.3135,
          "longitude": 103.9625
        }
      },
      {
        "id": "S43",
        "device_id": "S43",
        "name": "Kim Chuan Road",
        "location": {
          "latitude": 1.3399,
          "longitude": 103.8878
        }
      },
      {
        "id": "S108",
        "device_id": "S108",
        "name": "Marina Gardens Drive",
        "location": {
          "latitude": 1.2799,
          "longitude": 103.8703
        }
      },
      {
        "id": "S44",
        "device_id": "S44",
        "name": "Nanyang Avenue",
        "location": {
          "latitude": 1.34583,
          "longitude": 103.68166
        }
      },
      {
        "id": "S121",
        "device_id": "S121",
        "name": "Old Choa Chu Kang Road",
        "location": {
          "latitude": 1.37288,
          "longitude": 103.72244
        }
      },
      {
        "id": "S106",
        "device_id": "S106",
        "name": "Pulau Ubin",
        "location": {
          "latitude": 1.4168,
          "longitude": 103.9673
        }
      },
      {
        "id": "S111",
        "device_id": "S111",
        "name": "Scotts Road",
        "location": {
          "latitude": 1.31055,
          "longitude": 103.8365
        }
      },
      {
        "id": "S115",
        "device_id": "S115",
        "name": "Tuas South Avenue 3",
        "location": {
          "latitude": 1.29377,
          "longitude": 103.61843
        }
      },
      {
        "id": "S24",
        "device_id": "S24",
        "name": "Upper Changi Road North",
        "location": {
          "latitude": 1.3678,
          "longitude": 103.9826
        }
      },
      {
        "id": "S116",
        "device_id": "S116",
        "name": "West Coast Highway",
        "location": {
          "latitude": 1.281,
          "longitude": 103.754
        }
      },
      {
        "id": "S104",
        "device_id": "S104",
        "name": "Woodlands Avenue 9",
        "location": {
          "latitude": 1.44387,
          "longitude": 103.78538
        }
      },
      {
        "id": "S100",
        "device_id": "S100",
        "name": "Woodlands Road",
        "location": {
          "latitude": 1.4172,
          "longitude": 103.74855
        }
      }
    ],
    "reading_type": "DBT 1M F",
    "reading_unit": "deg C"
  },
  "items": [
    {
      "timestamp": "2020-11-08T22:34:00+08:00",
      "readings": [
        {
          "station_id": "S109",
          "value": 26.6
        },
        {
          "station_id": "S117",
          "value": 27.7
        },
        {
          "station_id": "S50",
          "value": 26.5
        },
        {
          "station_id": "S107",
          "value": 27.4
        },
        {
          "station_id": "S43",
          "value": 27.3
        },
        {
          "station_id": "S108",
          "value": 27.2
        },
        {
          "station_id": "S44",
          "value": 26.1
        },
        {
          "station_id": "S121",
          "value": 26.1
        },
        {
          "station_id": "S106",
          "value": 25.3
        },
        {
          "station_id": "S111",
          "value": 26.2
        },
        {
          "station_id": "S115",
          "value": 27.1
        },
        {
          "station_id": "S24",
          "value": 26.5
        },
        {
          "station_id": "S116",
          "value": 27.2
        },
        {
          "station_id": "S104",
          "value": 26.5
        },
        {
          "station_id": "S100",
          "value": 26.7
        }
      ]
    }
  ],
  "api_info": {
    "status": "healthy"
  }
}

Please provide the fields expected in this dataset:

Expected behaviour is that when calling with timestamp 10:41PM(Current timestamp) the last known values are returned from the API as is mentioned in the API specs: -Has per-minute readings from NEA -Use the date_time parameter to retrieve the latest available data at that moment in time

Currently the latest available data is only 3 weather stations instead of the full list. S50, S116, S100

This bug can be tested directly from: https://data.gov.sg/dataset/realtime-weather-readings Selecting the map view as well will only show 3 data points.

How frequently would you need this dataset to be updated?

Can you give a short explanation on how you're planning to use this dataset?

N/A

EDIT: Added in that it affects both Air Temperature across Singapore as well as Relative Humidity across Singapore

Thanks!

lennardl commented 3 years ago

@nchlsgh1 Thanks for highlighting it to us, we will inform NEA who are the data owners

nchlsgh1 commented 3 years ago

@nchlsgh1 Thanks for highlighting it to us, we will inform NEA who are the data owners

Hi Lennard, the bug is still not fixed, do you have a timeline on this?

Thanks!