From the course: Advanced SQL for Data Science: Time Series

Characteristics of time series data - SQL Tutorial

From the course: Advanced SQL for Data Science: Time Series

Start my 1-month free trial

Characteristics of time series data

- [Instructor] Let's begin by looking at the structure of time series data. Time series data is a sequence of data points. Now each of those data points includes a time stamp. Time stamps usually include a date and then a time, sometimes down into milliseconds. In the time series data that we're going to work with, our data will be generated at regular intervals and each of the data data points will have one or more measurements. Now when we talk about intervals what we're really talking about is the frequency. How often is the data points sent to us and that can vary by application so for example if you're measuring CPU utilization you might be measuring that in terms of seconds, even mircoseconds. But if you're measuring something like births and deaths in the human population probably annually would be enough. Many different types of time series data use different intervals or different frequencies. Now the other thing we want to look at is the unit of measure. Now in time series data we have measurements usually their just numbers but what do those numbers represent? That's the kind of thing you need to know when you're working with time series data because a unit of measure is typically not included with the data. Since it's always the same it would be redundant to carry the unit of measure along with the data points. So some common units of measure are percentages for example if you're looking at CPUT utilization or free memory available. You might look at percentage. If you're looking at the number of units produced or customers served the our unit of measure is count. Sometimes if you're dealing with financial data like company profit then you'll be in some kind of monetary unit like dollars or euros. Again the unit of measure will vary by application. We also want to look at different metric types or different types of measurements. A common one is a counter, counters monotonically increase so for example it might be the number of cars that pass through a toll booth. That number keeps going up, it will never go back. Another common metric type is called a gauge and a gauge is a numerical measure that can go up or down. So for example the temperature of a room is a gauge. Summary vales calculate values over some period of time or some time window. And these could be counts or they could be rates. Less often but sometimes we'll see histograms. And histograms are counts of items over buckets. Now in this course we're going to work with time series in relational databases so we'll be querying it with sequel or SQL. We'll briefly discuss some data modeling choices and mostly we'll focus on time series analysis.

Contents