Time Series Resampler

Readings arrive whenever they happen, while charts and reports want them on an even clock. Put your timestamped data in and get one value per minute, hour or day, with a choice of what to do about the periods where nothing arrived at all.

How to use it

The decision that shapes the output is how the readings inside each period get combined into a single number, since the same data resampled two ways can tell two different stories.

  1. Choose the time column and the value column They are picked for you where the names make it obvious, and you can change either.
  2. Pick a period and how to combine Totals for things you count, averages for things you measure, last value for a running level such as a balance or a meter reading.
  3. Decide what an empty period means For sales, no rows genuinely means zero. For a temperature reading it means the sensor was off, and writing zero would be a lie.
Full instructions
0 turns it off
Minutes, for local time

Your rows

paste a CSV with a header row

On a regular clock

In depth

Grouping irregular timestamps into regular buckets for charts and reports

Sensor readings, server logs, and sales records rarely arrive at neat intervals. You get three entries in one minute and none for the next twenty, which makes any chart or comparison meaningless until the data sits on an even clock. This article explains every control in the Time Series Resampler, works through a practical example, and shows how the wrong settings can quietly produce numbers that look correct but are not.

Screenshot: Putting readings on an even clock
Putting readings on an even clock as it appears when the page opens.

What the tool does and who needs it

The Time Series Resampler takes a CSV with a timestamp column and a value column, groups the rows into regular periods, and combines the values in each period however you ask. The result is a table with one row per period, ready for a chart or a report. Gaps in the data are counted and shown rather than hidden.

Anyone who works with log files, sales exports, sensor data, or analytics dumps will recognise the problem. A daily summary of website visits means nothing if three of the days are missing and the tool quietly skips over them. This resampler makes those gaps visible so your totals and averages stay honest. Everything runs on your own device, and no data leaves your browser.

Choosing the time and value columns

When you paste a CSV, the Time column and Value column dropdowns fill with the column names from the header row. The tool tries to guess which is which based on the names. A column called timestamp, date, or time will be selected automatically for the time, and a column called amount, value, or count will be picked for the value. You can change either dropdown if the guess is wrong.

The time column must contain recognisable dates or timestamps. The tool understands ISO dates with dashes, dates with slashes in either day-first or month-first order, and plain numbers representing Unix timestamps in seconds or milliseconds. If your file uses a format it cannot parse, the status bar will tell you how many rows it had to skip.

Setting the period and the combination method

The Bucket by dropdown sets the size of each period: Minute, 5 minutes, 15 minutes, Hour, Day, Week, Month, Quarter, or Year. Every row whose timestamp falls inside a given period is combined into a single value for that period.

The Combine with dropdown decides how those rows are merged. Total adds them up, which is right for things you count, like sales or page views. Average divides the total by the number of rows, which is right for things you measure, like temperature or response time. Last value keeps only the final reading in the period, which suits a running balance or a meter reading. First value keeps the earliest reading. Smallest and Largest keep the extreme value. How many rows counts the entries without looking at the values at all.

Choosing the wrong combination method is one of the most common mistakes. If a busy hour has four readings and you pick Total instead of Average, that hour looks four times as high as a quiet hour with one reading, even if the actual levels were the same.

What to do with empty periods

The Periods with nothing in them dropdown is where the real decisions happen. Leave blank and count them keeps the period in the table but writes no value. The summary reports how many gaps there were. This is the safe default because it does not assume anything about why the data is missing.

Write zero fills the gap with zero, which is correct when no rows genuinely means nothing happened. If you are counting sales and there were no sales on a Sunday, zero is honest. But if you are measuring temperature and the sensor was turned off on Sunday, writing zero is a lie that drags down every average that touches that day.

Carry the last value forward copies the previous period's value into the gap, which suits things like account balances where the level stays the same until it changes. Leave the period out entirely drops empty periods from the table altogether, which makes the output shorter but hides the fact that the gaps exist.

Rolling averages, time zones and week start

The Rolling average over field smooths the output. Set it to 7 with daily buckets and each row shows the average of itself and the six days before it. The first few rows are left blank because a seven-day average over three days of data would be misleading. Set the field to zero to turn rolling averages off.

The Dates written with slashes are dropdown matters more than it looks. A date written as 03/04 is the third of April in most of the world and the fourth of March in the United States. If the first twelve days of a month look scrambled and the rest look fine, you have this setting the wrong way round. The tool defaults to Day first.

The Shift the clock by field moves every timestamp by a number of minutes before the grouping happens. Timestamps are often stored in UTC, and a day in UTC may not match a day in your local time. A sale at 11 pm in your time zone lands after midnight in UTC and gets counted on the wrong day. Put your UTC offset here and the days line up with the ones your business actually experienced. The Weeks start on dropdown lets you choose Monday or Sunday, which affects how weekly buckets are sliced.

A worked example with daily order totals

Imagine you export a month of orders from a shop. The CSV has columns for order_time and amount. Some days have dozens of orders, a few weekends have none. Paste the CSV, and the tool picks order_time for the time column and amount for the value column. Set Bucket by to Day and Combine with to Total.

The output shows one row per day. Most days have a figure. Two Sundays show blank because no orders came in. The summary at the bottom reports 2 periods with no data. Now set Periods with nothing in them to Write zero. Those two Sundays now show 0, which is correct for a shop that was genuinely open but had no business.

To see the weekly trend underneath the daily noise, set Rolling average over to 7. The first six days go blank, and from the seventh day onward each row shows the average of the last seven days. The result is a smooth line that reveals whether the business is growing or shrinking, without the weekend dips clouding the picture.

Mistakes that quietly produce wrong numbers

The most damaging mistake is ignoring the time zone offset. If your timestamps are in UTC and your business is in UTC plus five and a half, every evening's activity lands on the next day. Daily totals will be wrong by whatever fraction of your traffic happens between your midnight and UTC midnight. The error is consistent enough that nobody notices until a month-end comparison fails to match the accounting system.

Another trap is using Total when Average is the right choice, or vice versa. Think about what a period with ten rows should produce compared to a period with one row. If both periods had the same level of activity, the figures should be the same, and only Average does that. If ten rows means ten times as much happened, Total is correct.

Finally, be careful with Carry the last value forward on data that has large gaps. If the last real reading was a spike and the next five periods are empty, all five will carry that spike, which inflates every downstream average and total.

Getting the result and when to use something else

The Copy button copies the resampled table as CSV. The Download button saves it as a file for use in another tool or a spreadsheet. The output preserves the column headers and adds a period column labelled with the start of each bucket.

If your data is already on a regular clock and you just need summary statistics like the mean and standard deviation, the Statistics Calculator on this site is a better fit. If you need to reshape the table so that periods become columns, the Unpivot and Reshape tool can take the output of this one and pivot it into a wide format. Both run on your own machine with no data leaving the browser.

Help

Putting readings on an even clock

The decision that shapes the output is how the readings inside each period get combined into a single number, since the same data resampled two ways can tell two different stories. Empty periods are kept and counted rather than closed up, so a day when nothing arrived still appears as a day when nothing arrived.

Choose the time column and the value column

They are picked for you where the names make it obvious, and you can change either.

Pick a period and how to combine

Totals for things you count, averages for things you measure, last value for a running level such as a balance or a meter reading.

Decide what an empty period means

For sales, no rows genuinely means zero. For a temperature reading it means the sensor was off, and writing zero would be a lie.

Add a rolling average if the line is noisy

Seven periods over daily data smooths out the weekend and shows the trend underneath.

Which clock is a day measured on?

Timestamps usually arrive in a universal time, and a day in that time is not the day your business had. A sale at nine in the evening in India is recorded at half past three that afternoon in universal time, which is still the same date — but a sale at half past six in the evening in California is recorded after midnight, and lands on tomorrow. Group by day without thinking and your evenings quietly move into the next day, which shifts every daily total and makes Monday look busier than it was. The shift setting moves the whole clock before the grouping happens, so put your own offset from universal time in there and the days line up with the ones your colleagues remember.

Good to know

Average and total answer different questions

Totalling four readings in an hour tells you the volume; averaging them tells you the level. Choosing the wrong one makes a busy hour look four times as high as it is.

Day-first or month-first matters

A date written 03/04 is two different days depending on where the file came from. Set it explicitly, and watch for a file where the first twelve days of a month look wrong and the rest look fine.

Gaps are counted for you

The summary says how many periods had no rows at all. A run of them usually means a collector stopped, not that nothing happened.

Change is only shown where it is real

Period-on-period change against an empty or zero previous period is meaningless, so it is left blank rather than showing an enormous percentage.

Common questions

How do I group timestamped data by hour or day?
Paste the CSV, choose the time and value columns and the period you want. The regular table appears with one row per period.
What time formats are understood?
Dates and times written the standard way with dashes, dates with slashes in either order, and plain numbers counting seconds or thousandths of a second.
Should I fill the gaps with zero?
Only if no rows genuinely means nothing happened. If it means nobody was recording, leaving it blank keeps your averages honest.
What does the rolling average do to the first few rows?
They are left blank until there are enough periods to fill the window, because a seven-day average over three days is not a seven-day average.
Is my data uploaded?
No. It is read and regrouped entirely in your browser.