From the course: Code Clinic: C++

Intro: Weather statistics - C++ Tutorial

From the course: Code Clinic: C++

Start my 1-month free trial

Intro: Weather statistics

(machines powering up) - [Instructor] Hello and welcome to the first problem in the Code Clinic series. This problem is about calculating statistics from a data set. It's easy stuff, but presents a good example of how different languages accomplish common tasks. Our authors will start with weather data captured from Lake Ponderay in northern Idaho. We have almost 20 megabytes of data from the years 2012 through 2015. That data is available in the folder with other Exercise Files. Each observation in the data includes several variables, date, time, air temperature, barometric pressure, dew point, and others. And the data is straightforward. Likewise, the problem is simple. Write a function that accepts a beginning date and time and an ending date and time. Inclusive of those dates and times, return the coefficient of the slope of the barometric pressure. A rising slope indicates an increasing barometric pressure, which typically means fair and sunny weather ahead. A falling slope indicates a decreasing barometric pressure, which typically means stormy weather. We're only asking our authors for the coefficient, but some may choose to generate a graph of the results as well. So, that's our first challenge. Pull statistics from a data set. Perhaps you want to pause this video and create a solution of your own. How would you solve the problem? In the next videos, we'll see one approach to solving this.

Contents