Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khumam/php-air-pollution
A simple library to get air pollution information in various countries.
https://github.com/khumam/php-air-pollution
air-pollution air-quality climate climate-change climate-data
Last synced: about 1 month ago
JSON representation
A simple library to get air pollution information in various countries.
- Host: GitHub
- URL: https://github.com/khumam/php-air-pollution
- Owner: khumam
- License: mit
- Created: 2020-09-25T14:57:24.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-27T04:05:57.000Z (about 4 years ago)
- Last Synced: 2024-07-30T17:38:25.488Z (5 months ago)
- Topics: air-pollution, air-quality, climate, climate-change, climate-data
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Wellcome to Air Pollution Information
---Air pollution has become a serious problem these days. Several countries have been racing to create multiple systems to prevent further air pollution.
This library can help developers to get realtime data on air quality in various worlds of various types.
#### Installation
To install this library, make sure you have composer installed.Run the following command
```
composer require khumam/air-pollution ^1.0
```Then call the data with the code below
```php
searchByCity('Jakarta');
```#### Available Method
1. `getResult($format)` Get all result. Default is JSON format, you can set to ARRAY.
2. `getCity($format)` Get city detail. Default is JSON format, also you can set to ARRAY.
3. `getDominant()` Get dominan pollutan.
4. `getAqi($pollutan)` Get Air Quality Index (AQI). Default is you can get all pollutan quality index, but you can also set spesific pollutan type. Available pollutan type `O3, PM10, PM25, UVI`
5. `getTime()` Get time.
6. `getForecast($pollutan)` You can get the next 7 days forecast of all pollutan, or you can spesific one.#### API-KEY
You can get the API-KEY from [https://aqicn.org/](https://aqicn.org/api/). Register using your email.#### Contributing
Yes, you can help optimize this library by contributing. All contributions are very meaningful to this library.