Time-series data is a sequence of observations ordered by time, in which each value is paired with the timestamp at which it was measured or recorded. Sensor readings every second, daily closing prices, hourly web traffic and monthly unemployment figures are all time series. What sets them apart is that order carries meaning: shuffling the rows destroys the information they hold.
Among data fundamentals, time-series data is a distinct shape of structured data with its own vocabulary, storage engines and statistical methods. Because consecutive values are usually related, analysts treat temporal dependence, trend and seasonality as properties to model, not as noise to ignore.
Anatomy of a time series
Every time series combines a time index, one or more measured values and descriptive context. In monitoring systems the context is often stored as tags or labels, such as the host name or sensor location, so one metric name can describe thousands of separate series.
The table below lists the core elements and what each one controls.
| Element | Meaning | Example |
|---|---|---|
| Timestamp | Moment of measurement, ideally in UTC | 2026-11-16T08:00:00Z |
| Value | Numeric or categorical observation | 21.4 degrees Celsius |
| Sampling interval | Spacing between observations | 1 second, 1 hour, 1 month |
| Tags or dimensions | Context identifying the series | site=plant-2, sensor=t7 |
| Resolution | Precision of the timestamp | Seconds, milliseconds, nanoseconds |
A crucial distinction is between event time and ingestion time. Event time is when something actually happened, while ingestion time is when the system received the record. Network delays and offline devices make the two diverge, so pipelines that aggregate by ingestion time can misplace late-arriving data into the wrong window.
Regular, irregular and other kinds of series
Time series differ mainly in how observations are spaced and what they represent. These differences decide which storage layout and which analytical methods are appropriate.
| Kind | Spacing | Typical source | Analytical note |
|---|---|---|---|
| Regular series | Fixed interval | Polling sensors, metrics scrapers | Suits classical forecasting models |
| Irregular series | Variable interval | Transactions, clicks, alarms | Often resampled or treated as events |
| Univariate series | Any | Single measured quantity | Simplest to model and plot |
| Multivariate series | Any | Several related measurements | Captures interactions between variables |
| Panel data | Any | Many entities over time | Combines cross-section and time |
Irregular streams are frequently converted to regular ones through resampling, which groups observations into fixed buckets using a function such as mean, sum, minimum, maximum or last value. Choosing the wrong function changes meaning: summing a temperature is meaningless, while averaging a request count understates total load.
Statistical properties that shape analysis
Time-series analysis rests on a few structural components that describe how values evolve. Recognizing them is the first step in any forecast or anomaly detection task.
- Trend: a long-term upward or downward movement, such as steady growth in user numbers.
- Seasonality: patterns that repeat at a fixed period, such as daily, weekly or yearly cycles.
- Cyclic behavior: rises and falls without a fixed period, typical of economic indicators.
- Autocorrelation: the degree to which a value resembles earlier values at a given lag.
- Stationarity: constant mean and variance over time, an assumption of many classical models.
Because observations depend on one another, standard random train-test splits are invalid for time-series models. Validation must respect chronology, typically through rolling or expanding windows, otherwise future information leaks into training and accuracy is badly overstated. Methods range from exponential smoothing and ARIMA to gradient-boosted trees with lag features and deep sequence models.
Storing and querying time-series data
Time-series workloads are write-heavy, append-mostly and read in time ranges, a profile that general-purpose transactional databases handle inefficiently at scale. Specialized time-series databases therefore partition data into time chunks, compress neighboring values aggressively and offer built-in functions for downsampling and gap filling.
The following comparison shows how common storage approaches suit different needs.
| Approach | Strength | Weakness | Good fit |
|---|---|---|---|
| Time-series database | High ingest, compression, time functions | Narrower general query support | Metrics, IoT telemetry |
| Relational table with time partitions | Joins with business data, SQL | Needs careful indexing at volume | Moderate volumes, mixed workloads |
| Columnar files in a data lake | Cheap long-term storage, analytics | Not suited to real-time reads | Historical analysis, model training |
| Stream platform | Low-latency processing | Limited retention and querying | Real-time alerting |
Two design decisions dominate cost. Retention and downsampling policies keep raw data for a short period, perhaps 14 to 30 days, and summaries for years. Cardinality, the number of distinct tag combinations, drives index size; attaching a unique identifier such as a request ID as a tag can multiply series counts into the millions and degrade performance.
Pitfalls when working with time series
Most errors with time-series data come from mishandled time itself rather than from the values. The table summarizes recurring problems.
| Problem | Effect | Fix |
|---|---|---|
| Mixed time zones | Shifted or duplicated hours | Store UTC, convert only for display |
| Daylight saving transitions | Missing or repeated local hours | Use timezone-aware timestamps |
| Unsynchronized clocks | Out-of-order events | Synchronize devices with NTP |
| Silent gaps | Misleading averages and charts | Mark gaps explicitly before filling |
| Future leakage in features | Inflated model accuracy | Build features only from past values |
Gap filling deserves special care. Forward filling, interpolation and zero filling each encode a different assumption about what happened while data was missing, and the right choice depends on the physical process. Recording which values were imputed preserves data quality and lineage for later users.
The idea in brief
Time-series data is simply a list of measurements with the time each one was taken. A fitness tracker that logs your heart rate every minute, a thermometer that reports every hour or a shop counting sales each day all produce it.
The key idea is that the order tells a story. Reading the values one after another shows whether something is rising, falling, repeating every weekend or suddenly behaving strangely. That is why people use time series to spot problems early and to predict what is likely to come next.
A practical scenario
A municipal water utility installs pressure and flow sensors at 400 points across its network, each reporting every 15 seconds. That produces roughly 2.3 million readings per day, which the utility stores in a time-series database with raw data kept for 30 days and one-minute averages kept for five years.
Engineers build a model that learns each sensor’s daily and weekly pattern, including morning demand peaks and lower weekend usage. One night, flow in a residential district stays 18 percent above its usual 03:00 level for two hours while pressure drifts downward. The deviation triggers an alert, a crew locates a broken main before it surfaces, and the utility cuts water loss and repair time compared with waiting for customer complaints.