Question: In this assignment, you are to again read in that weather data from the file, but instead of answering statistical queries, you are to plot
In this assignment, you are to again read in that weather data from the file, but instead of answering statistical queries, you are to plot the data in a set of graphs. You may re-use the code from the previous assignment for reading in data from a file. Using matplotlib, you are to create the following 4 graphs.
Create a line graph that shows both average temperature and pressure plotted over the period of time. Both should be plotted on the same graph, with date on the x-axis, and different y axes for the two different measurements.
Create a histogram showing amounts of precipitation. The x axis should cover a reasonable range of precipitation levels, and the y axis should show number of days that had precipitation in the specific range.
Create a scatterplot indicating relationships between average temperature and average dew point (one on each axis).
Create a bar chart, with one bar per month, showing the average temperature along with error bars indicating the high and low temperatures from that month.
Note: You will want to create new lists of data, but you may find it useful to use the max/min/sum functions on lists.
| Date | Temp High | Temp Avg | Temp Low | Dew Point High | Dew Point Avg | Dew Point Low | Humidity High | Humidity Avg | Humidity Low | Pressure High | Pressure Avg | Pressure Low | Precipitation (in.) |
| 1/1/2015 | 41 | 38 | 35 | 41 | 38 | 32 | 100 | 96 | 73 | 30.38 | 30.25 | 30.14 | 0.72 |
| 1/2/2015 | 44 | 42 | 40 | 44 | 42 | 40 | 100 | 99 | 97 | 30.17 | 30.08 | 29.95 | 0.17 |
| 1/3/2015 | 51 | 45 | 39 | 44 | 41 | 38 | 100 | 93 | 73 | 30.13 | 30 | 29.89 | 1.19 |
| 1/4/2015 | 46 | 38 | 31 | 39 | 31 | 24 | 99 | 74 | 48 | 30.68 | 30.45 | 30.13 | 0 |
| 1/5/2015 | 50 | 38 | 26 | 30 | 25 | 22 | 84 | 64 | 36 | 30.7 | 30.59 | 30.43 | 0 |
| 1/6/2015 | 64 | 48 | 33 | 36 | 32 | 27 | 86 | 58 | 28 | 30.47 | 30.39 | 30.33 | 0 |
| 1/7/2015 | 54 | 42 | 28 | 43 | 30 | 12 | 90 | 62 | 44 | 30.77 | 30.55 | 30.34 | 0 |
| 1/8/2015 | 36 | 28 | 21 | 30 | 14 | 8 | 82 | 52 | 37 | 30.76 | 30.55 | 30.33 | 0 |
| 1/9/2015 | 35 | 34 | 33 | 34 | 31 | 29 | 97 | 86 | 76 | 30.55 | 30.47 | 30.36 | 0.05 |
| ######## | 37 | 36 | 34 | 34 | 29 | 23 | 97 | 80 | 60 | 30.53 | 30.44 | 30.3 | 0.01 |
| ######## | 43 | 38 | 33 | 42 | 38 | 33 | 100 | 98 | 95 | 30.31 | 30.2 | 30.12 | 1.92 |
| ######## | 45 | 43 | 41 | 44 | 41 | 38 | 100 | 93 | 79 | 30.41 | 30.3 | 30.18 | 0 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
