Air Quality
Number of APIs: 2
Qodex Air Quality Collection
Welcome to the Qodex Air Quality Collection. This collection was created in response to the 2017 wildfires that devastated Northern California. The fires brought tragedy, and also caused hazardous ash and smoke pollution in the surrounding areas. As Qodex has an office in San Francisco, we thought it was important to help our fellow Northern Californians and the rest of the world stay aware of the air quality in their surroundings.
This collection gets air quality updates from the AccuWeather API and posts them to Twitter according to your account and location specifications.
Technologies Used
Qodex - This collection utilizes Qodex Collections, Qodex Monitors, and Qodex Environments.
AccuWeather API - AccuWeather’s API allows users to obtain real weather data, including air quality data.
- Using the AccuWeather API - To use AccuWeather’s API you will need to create an account and obtain a trial API key from their website. You can make up to 50 calls to the API per day on the trial, which should be enough to run this collection as an individual user.
- Twitter - We’ve chosen to use the Twitter API as a platform to reach out to our community and spread the message about the state of the San Francisco air quality since the Northern California fires have started. You can configure your own Twitter account to post periodic air quality updates.
- Using the Twitter API - To use Twitter’s API, you will need to create a Twitter app and get OAuth credentials.
Environment Variables
You need to set several environment variables before this collection will run:
Environment Variable Name | Description |
---|---|
location | A string describing the location you would like to monitor |
accuweatherApiKey | An AccuWeather API key |
twitterConsumerKey | A Twitter OAuth Consumer Key |
twitterConsumerSecret | A Twitter OAuth Consumer Secret |
twitterAccessToken | A Twitter OAuth Access Token |
twitterAccessSecret | A Twitter OAuth Access Token Secret |