Project 2: Putting together the last few weeks


Due:  Nov 20th Nov  23rd at 5:00pm


Summary: In this project, you will get some weather data from the weather API, and depending on what the data is show a different picture, play a different sound and text.


Details:

Go to https://www.aerisweather.com/pricing/ and click on the "free 30 day trial"

Fill out the form and confirm your email. You now have 30 days of access to this very powerful weather API

From your account , select app, there you will see your client id and your secret key. You get 1000 queries with the free trial. So don't do a pyportal.fetch() inside of a loop.

ares account

Then use the alerts API in your program, See the example below, you can change the town,state to search a new one.

For example

https://api.aerisapi.com/alerts/Bridgewater,MA?client_id=your_client_id&client_secret=your_secret_key


Get weather alerts, If the alert has a WARNING, then print the warning to the screen, show a warning image and play a warning sound.

otherwise if the alert is an advisory, then print the warning to the screen and play an advisory sound, and show an advisory image.

otherwise if the alert is a statement, then print the statement to the screen, and show a statement image

Finally if there is no alert, then play a happy sound and put text on the screen that there is no alert.


in all cases move the text across the screen for 10-20 seconds, keeping it on the screen (either moving it back and forth or wrapping back to the other side of the screen like we did in class.


To help you find locations with alerts for testing have a look at:

https://alerts.weather.gov/cap/ca.php?x=1




Submission:

To submit, turn in code.py and all of the sounds, images and other files files that you need on blackboard.