Skip to main content

Time Series

Before we jump into querying telemetry, let's quickly recap what time series and aggregations are.

Imagine you want to know how the temperature outside changes throughout the day. Once every hour, you check the thermometer and write down the time along with the current temperature. After a while, you might have something like this:

TimeValue
09:0024°C
10:0026°C
11:0027°C

Temperature data like this is an example of what we call a time series - a sequence of measurements ordered in time. Every row in the table represents one individual measurement taken at a specific time.

Tables are useful when you want to identify individual measurements, but they make it harder to see the big picture. A more common visualization for time series is a graph, which places each measurement along a time axis. Visual representations like graphs make it easier to discover patterns and features in the data that would otherwise be difficult to notice.

Example graph

Aggregations

Depending on what you are measuring, the data can vary greatly. What if you want to compare periods longer than the interval between measurements? If you measure the temperature once every hour, you'll end up with 24 data points per day. To compare the temperature in August over multiple years, you would need to combine the 31 x 24 data points from each month into one.

Combining a collection of measurements is called aggregation. This concept is commonly applied through several methods for aggregating time series data:

  • Average - returns the sum of all values divided by the total number of values.
  • Min and Max - return the smallest and largest values in the collection.
  • Sum - returns the total of all values in the collection.
  • Count - returns the number of values in the collection.

For example, by aggregating data over a month, you can determine that August 2017 was, on average, warmer than the year before. Alternatively, to see which month had the highest temperature, you would compare the maximum temperature for each month.

How you choose to aggregate your time series data is an important decision and depends on the story you want to tell with your data. It's common to use different aggregations to visualize the same time series in multiple ways.


The explanation above is based on the Grafana documentation. Check it out if you'd like to learn more about data visualization and analysis.

All Rights Reserved © 2025 Enapter AG.