This frontend app provides current, forecast, and historical air pollution data for any coordinates on the globe. Besides basic Air Quality Index, the app returns data about polluting gases, such as Carbon monoxide (CO), Nitrogen monoxide (NO), Nitrogen dioxide (NO2), Ozone (O3), Sulphur dioxide (SO2), Ammonia (NH3), and particulates (PM2.5 and PM10).
Before you begin, ensure you have met the following requirements:
- You have installed Node.js and npm.
- You have a valid API token from aqicn.org.
To setup the development environment, follow these steps:
On Mac / Linux:
ln -nfs .env.local.example .env.local
On Windows:
mklink .env.local .env.local.example
Then, install the dependencies:
npm ci
To run the application, use the following command:
npm run dev
Open localhost:3000
in your browser to see the application.
Below is a description of Europe Air Quality Index levels: https://openweathermap.org/air-pollution-index-levels
Here is an example of the data format:
{
"status": "ok",
"data": {
"aqi": 70,
"time": {
"s": "2024-01-19 04:00:00"
},
"city": {
"name": "Shanghai",
"url": "http://aqicn.org/city/shanghai/",
"geo": [
"31.2047372",
"121.4489017"
]
},
"iaqi": {
"pm25": "..."
}
}
}
Check out our CONTRIBUTING.md file for more information.