Build a Python Weather App
Six short lessons. By the end you'll have a program that fetches a real forecast and charts it.
What you'll learn
- How to ask a weather service for data with Python
- How to read and pick apart that data
- How to save your readings to a file
- How to draw a chart from them
Before you start
- Python 3 installed (any recent version)
- A text editor and a terminal
- No coding experience needed
The lessons
- 1Meet the weather APIAsk a real weather service a question and see what it says back.
- 2Fetch the forecastWrap the request in a function and turn the answer into Python data.
- 3Read the dataPull out the times and temperatures and print a tidy table.
- 4Save your readingsWrite the forecast to a file so you can look at it later.
- 5Draw a chartTurn the numbers into a picture with matplotlib.
- 6Make it yoursChange the city, the units and the chart, and plan what to build next.