Downsampling time series data means replacing many raw readings with one summary per time bucket, such as one figure per minute, hour or day. It makes long charts fast and storage small, but the summary you keep decides what survives. An hourly average keeps the trend and erases short spikes; min, max and count per bucket keep them.
A pressure transmitter read every 10 seconds sends 360 readings an hour and about 3.15 million a year, while a chart is a few thousand pixels wide at most. Something has to reduce those readings before they are drawn.
Average vs min max when downsampling: which should you keep?
Keep both. The average tells you where the process sat during the bucket; the min and max tell you how far it strayed.
Take a pump discharge line that normally runs at 4.0 bar, read every 10 seconds. Say a valve closes too fast and the pressure jumps to 9.0 bar for one minute, six readings out of the hour’s 360. The hourly average comes out at 4.08 bar, a line that barely moves. The hourly max is 9.0 bar, and that is the number the maintenance planner needs. A short pump stop works the same way in reverse, and only the min shows it.
Count is the figure that is easiest to leave out. An hour with 120 readings instead of 360 means the device went quiet, or slowed its reporting, for part of it, and an average built from what did arrive looks normal. Store the count and a data gap stays visible after downsampling.
Hermetry connects field devices to live dashboards, rules and alerts: IoT telemetry and SCADA in one platform. For every numeric key of every device it keeps five figures per bucket (sum, count, min, max and last) at one-minute, one-hour and one-day resolution. A chart card’s Aggregate setting draws the same key as avg, min, max or count. Hermetry’s avg is sum divided by count, a plain average rather than a time-weighted one, as the page on aggregates and rollups explains.
What is a rollup in time series data?
A rollup is a coarser summary built from finer summaries instead of from raw readings: hours from minutes, days from hours. Sum, count, min and max roll up exactly, since the max of a day is the largest of its hourly maxes. An average does not, and averaging averages is an easy mistake to make in a report query.
Suppose one hour holds 360 readings averaging 4.0 bar and the next holds only 36 readings averaging 6.0 bar, because the device slowed its reporting. The average of the two averages is 5.00 bar; the true average of all 396 readings is 4.18 bar. Keep sum and count per bucket and you can rebuild the correct average at any level.
With irregular reporting, check whether a report uses a plain average or a time-weighted one, which weighs each value by how long it held, before you compare numbers from two systems.
Why does my chart look different when I zoom out?
A chart that covers weeks or months has to draw coarser buckets or a thinned set of points, so the readings you saw when zoomed in are no longer on screen. A spike that filled the view over one hour becomes a small bump in an hourly average and vanishes into a daily one.
For pressures and temperatures I add the max as a second series, or a min and max pair, so a short excursion still shows at a one-year zoom. The alarm side of short spikes is in keeping one bad reading out of your alarms, and where the readings come from is in PLC data logging without touching the PLC program. Pump stations, where trouble is short and charts cover months, are covered in remote monitoring of pumping stations and the water industry page.
Frequently asked questions
How often should a sensor be sampled before downsampling?
Often enough to put several readings inside the shortest event you need to see. If a one-minute event matters, a reading every five minutes can miss it, and no summary can recover a value that was never recorded. Sample for the event, then downsample for storage and charts.
Is downsampling the same as compression?
No. Lossless compression stores the same readings in less space and gives every one back. Downsampling discards the raw readings and keeps only the figures per bucket, so detail the bucket did not record, such as the exact time of a spike inside an hour, is gone.
Should raw data be deleted after downsampling?
Keep raw readings for as long as you might need to investigate an event in detail, then keep the bucket figures with min, max and count. An older spike then survives only as the max of its bucket, which still shows that it happened and roughly when.

