Skip to content

Additional Options

Elizabeth Adams edited this page Apr 10, 2019 · 5 revisions

Is air quality data just not enough for you? Well there are plenty of options to add more to your dashboard or stream this data into a weather dashboard you already have!

weather dashboard

Stream Weather & Air Quality Into a Single Dashboard

If you already implemented our DarkSky API or Hyper-Local Weather Dashboard project, you can add this air quality data to your existing dashboard. It's pretty simple, all you need to do is change your parameters in the air quality script to have the same bucket name, bucket key, and access key as what you used for your weather dashboard. This will allow the data to be sent into that same dashboard. Now you'll have a total weather dashboard!

Have Your Weather Python File Make a Call to Run the Air Quality Python File

Another option if you don't want to run two separate programs is to put the air quality python file in the weather project directory. Have the weather project python file make a call to the air quality file so that it runs when your weather file is running. Again, make sure to put the same bucket name, bucket key, and access key so that they run to the same dashboard.

Create A Single File with Both Weather & Air Quality

And if you are feeling real bold, you can put some of the air quality code into your weather python script and just have a single script to run. It will require a little more coding effort than the other two options but it makes for a simplified program.

Stream Additional Information from the AirVisual API

As you saw when we made a call to the AirVisual API, it has more information than just air quality. It also provides temperature, humidity, wind speed, wind direction, and atmospheric pressure. We can send that information to Initial State the same way we sent the air quality index value and main pollutant. It only requires you to write a few more if statements.

<< Air Quality Dashboard

Clone this wiki locally