Open mariofrei opened 1 year ago
looks like all weather is affected. No data since 2023-01-02. please look into this.
weather forecasts are also affected. coincidentally, webapp data flow seems to be intact
Data.gov APIs are too unreliable. It goes down for weeks a few times a year.
Scraping from NEA or weather.sg website is much more reliable, sadly.
looks like it is finally up after 10 days! however, https://api.data.gov.sg/v1/environment/relative-humidity is still not available.
hum... PM25 also not working! https://api.data.gov.sg/v1/environment/pm25 as it also does not return any item.
I dont think anyone maintains this repo
For anyone working in python, I've decided to write a scraper/wrapper that uses data from nea.gov.sg
and weather.gov.sg
to simulate the json responses of the various weather endpoints, so that it is somewhat easy to replace any existing code that depends on the data.gov.sg
weather APIs.
https://github.com/liangleslie/weathersg
Caveat: nea.gov.sg
and weather.gov.sg
are probably not intended to be queried like this, so I can't speak for the reliability, or what the server rate limits are. so please bear this in mind for whatever use case you might have
Weather().api.json
--> simulated json output in the same format as data.gov.sg. Dict keys map to endpoint pathinfo, i.e. simulated json output of https://api.data.gov.sg/v1/environment/24-hour-weather-forecast
can be returned with weathersg.Weather().api.json['24-hour-weather-forecast']
Example
from weathersg import Weather
weather = Weather()
simulated_resp = weather.api.json['24-hour-weather-forecast']
Describe the bug When requesting air temperatures for dates after Jan 1, 2023, the API returns no temperature information but maintains health status as 'healthy'. The main issue is that no real-time temperature readings are accessible. The secondary issue is that the health status appears to be inaccurate.
To Reproduce Steps to reproduce the behavior:
Expected behavior The API still appears to be working for dates until and including Jan 1, 2023:
Desktop (please complete the following information):
Additional context While this issue described above is for the example on the website, the same issue persists if the API is called using Python and the Python module 'Requests'