From the course: Python Data Analysis
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Smoothing and plotting time series - Python Tutorial
From the course: Python Data Analysis
Smoothing and plotting time series
- [Instructor] So now, we know how to load temperature data from any station, how to compute basic summaries such as mean, min, and max, and how to integrate missing data points using interpolation. Here's the code we need. In the last video, we looked at data for Pasadena. Let's move to even sunnier skies now by looking at weather in the town of Hilo in big island, Hawaii. We'll use a custom loader, and we fill the missing data for both T-min and T-max. Once more, tupple unpacking is very useful. To summarize the data, we obtain the yearly average, which gives us a sense of a typical value for T-min and the min and max which span the range of variation of these measurements. We can plot these values on top of the time series. The matplotlib function, XH line for axis, horizontal line, plots a horizontal lines that spans the entire graph, just what we need. Another common way to measure range of variation of a time series is to compute the standard deviation defined as the square root…