Skip to content

Commit 6a96177

Browse files
spec: add line-timeseries-rolling specification
Created from issue #2786
1 parent 8962ca3 commit 6a96177

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# line-timeseries-rolling: Time Series with Rolling Average Overlay
2+
3+
## Description
4+
5+
A time series plot that displays raw data points alongside a smoothed rolling average (moving average) line. The raw data shows actual observations while the rolling average reveals underlying trends by reducing noise and short-term fluctuations. This dual-layer visualization is essential for trend identification, making patterns visible that might be obscured by day-to-day volatility.
6+
7+
## Applications
8+
9+
- Analyzing stock price movements with a moving average to identify buy/sell signals and trend reversals
10+
- Monitoring website traffic or user engagement metrics with smoothed trends for seasonal pattern detection
11+
- Tracking sensor data (temperature, humidity) with noise reduction to reveal true environmental trends
12+
13+
## Data
14+
15+
- `date` (datetime) - Timestamp values representing points in time
16+
- `value` (numeric) - Raw measurements or observations at each timestamp
17+
- `rolling_avg` (numeric) - Computed rolling average (e.g., 7-day, 30-day window)
18+
- Size: 50-500 points (enough data for meaningful rolling window calculation)
19+
- Example: Daily stock closing prices with 20-day moving average, hourly temperature readings with 24-hour rolling mean
20+
21+
## Notes
22+
23+
- Use a lighter, semi-transparent style for raw data (thin line or markers with alpha)
24+
- Display the rolling average as a prominent, smooth line in a contrasting color
25+
- Include a legend clearly distinguishing "Raw Data" from "Rolling Average (N-day)"
26+
- Consider showing the window size in the legend or title (e.g., "7-Day Rolling Average")
27+
- Grid lines on both axes improve readability of underlying values
28+
- The rolling average line will be shorter than raw data due to window requirements
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Specification-level metadata for line-timeseries-rolling
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: line-timeseries-rolling
5+
title: Time Series with Rolling Average Overlay
6+
7+
# Specification tracking
8+
created: 2025-12-30T17:31:12Z
9+
updated: null
10+
issue: 2786
11+
suggested: MarkusNeusinger
12+
13+
# Classification tags (applies to all library implementations)
14+
# See docs/concepts/tagging-system.md for detailed guidelines
15+
tags:
16+
plot_type:
17+
- line
18+
- timeseries
19+
data_type:
20+
- timeseries
21+
- numeric
22+
- continuous
23+
domain:
24+
- general
25+
- finance
26+
- statistics
27+
features:
28+
- smoothing
29+
- rolling-average
30+
- trend-analysis
31+
- overlay

0 commit comments

Comments
 (0)