KL Air & Weather WatchPemantau Udara & Cuaca KL

How this works Bagaimana ia berfungsi

Method Kaedah

Where every number comes from, what the colours mean, when an alert fires, and what this site cannot tell you.

Data sources

Weather: the Open-Meteo Forecast API, which blends national weather models and picks the best ones for each place. Current conditions, 7 days of daily forecast and hourly values, in Malaysia time.

Air quality: the Open-Meteo Air Quality API, which serves the Copernicus Atmosphere Monitoring Service (CAMS) global forecast: a model on a grid of about 45 km, updated twice a day. We show 3 days of it. The US AQI and European AQI are computed by Open-Meteo; for PM2.5 and PM10 the US AQI uses a 24-hour rolling mean.

Attribution. Weather data by Open-Meteo.com, under CC BY 4.0. Contains modified Copernicus Atmosphere Monitoring Service information. We round values, compute daily summaries, and pick the category and advice text; those are our changes.

Places: 16 points, one per city: Kuala Lumpur, Putrajaya, Shah Alam, Seremban, Melaka, Johor Bahru, Kuantan, Kuala Terengganu, Kota Bharu, Ipoh, George Town, Alor Setar, Kangar, Kuching, Labuan, Kota Kinabalu. One request to each API carries all of them.

Why not Malaysia's official API (Indeks Pencemar Udara)?

Malaysia's official Air Pollutant Index is published by the Department of Environment (Jabatan Alam Sekitar) on APIMS, from real monitoring stations. We looked for a documented public API with terms that allow reuse and did not find one: the government's open data catalogue lists APIMS with its licence "not specified", and the openly licensed DOE-derived dataset on data.gov.my is monthly. So this site does not copy APIMS readings. Check APIMS for official numbers; they use Malaysia's own breakpoints, so an API of 100 and a US AQI of 100 are not the same thing.

Colours, advice and alerts

Colours follow the US EPA Air Quality Index categories. The advice is a plain-language summary of the EPA's guidance for each category, in English and Malay. It is general information, not medical advice.

US AQI categories used on this site
US AQICategoryKategoriOn this site
0–50GoodBaik—
51–100ModerateSederhana—
101–150Unhealthy for sensitive groupsTidak sihat bagi kumpulan sensitifNotice banner
151–200UnhealthyTidak sihatAlert banner and a feed entry
201–300Very unhealthySangat tidak sihatAlert banner and a feed entry
301–500HazardousBerbahayaAlert banner and a feed entry

Notice: any of the 16 places at US AQI 101 or more right now. Alert: any place at 151 or more, or Kuala Lumpur forecast to reach 151 within 24 hours. An alert is written to the alert log and the feeds once per place, local day and category.

The WHO comparison

The hero card compares the past 24 hours' mean PM2.5 with the World Health Organization's 2021 Air Quality Guidelines. The WHO sets a guideline and four interim targets for countries working towards it.

WHO 2021 24-hour guideline values, µg/m³
PollutantInterim 1Interim 2Interim 3Interim 4Guideline
PM2.5755037.52515
PM10150100755045

History

Each update asks for the past 3 days as well, so a missed run does not leave a gap. For every complete day (Malaysia time) with at least 20 hours of data, it stores one small summary per place: peak and mean US AQI, mean PM2.5 and PM10, peak ozone and NO₂, high and low temperature and rainfall. A day already stored is never rewritten. These are the model's values for those hours, not station measurements.

Schedule and costs

A GitHub Actions workflow runs every 3 hours: it fetches, records new history days and alerts, builds this site and uploads it to Cloudflare Pages. GitHub can start scheduled runs late, or skip them when it is busy, so every page shows the data's own model hour and when it was built, and says so when the numbers are more than 7 hours old.

Limits