Skip to content

Commit 11ecee6

Browse files
spec: add timeseries-forecast-uncertainty specification (#3191)
## New Specification: `timeseries-forecast-uncertainty` Related to #3188 --- ### specification.md # timeseries-forecast-uncertainty: Time Series Forecast with Uncertainty Band ## Description A time series plot that displays historical observed data followed by a forecast projection with confidence intervals or uncertainty bands. The plot clearly distinguishes between the historical period and the forecast period using a vertical line marker, with shaded bands representing different confidence levels (typically 80% and 95%). This visualization is essential for communicating prediction uncertainty in forecasting applications, helping stakeholders understand both the expected values and the range of possible outcomes. ## Applications - Visualizing sales and demand forecasting with confidence intervals for inventory planning - Displaying stock price or financial indicator predictions with uncertainty ranges for risk assessment - Communicating weather forecast uncertainty with multiple confidence bands - Presenting economic projections with confidence intervals for policy decisions - Illustrating capacity planning forecasts with uncertainty bounds for resource allocation ## Data - `date` (datetime) - Time index covering both historical and forecast periods - `actual` (numeric) - Historical observed values (null/NaN for forecast period) - `forecast` (numeric) - Predicted values (typically starts where actual ends, may overlap slightly) - `lower_80` (numeric) - Lower bound of 80% confidence interval - `upper_80` (numeric) - Upper bound of 80% confidence interval - `lower_95` (numeric) - Lower bound of 95% confidence interval - `upper_95` (numeric) - Upper bound of 95% confidence interval - Size: 50-200 total points (30-150 historical + 10-50 forecast) - Example: Monthly sales data with 3 years history and 6-month forecast from Prophet or ARIMA model ## Notes - Use a solid line for historical data and a distinct style (dashed or different color) for forecast - Mark the forecast start with a vertical line or shaded region - Use nested shaded bands for confidence intervals: darker for 80%, lighter for 95% - Semi-transparent fills (alpha 0.2-0.4) allow bands to overlap without obscuring data - Include a clear legend identifying historical data, forecast, and confidence levels - Consider using a consistent color family (e.g., blue for historical, orange for forecast) --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20788185801)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent cb0375f commit 11ecee6

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# timeseries-forecast-uncertainty: Time Series Forecast with Uncertainty Band
2+
3+
## Description
4+
5+
A time series plot that displays historical observed data followed by a forecast projection with confidence intervals or uncertainty bands. The plot clearly distinguishes between the historical period and the forecast period using a vertical line marker, with shaded bands representing different confidence levels (typically 80% and 95%). This visualization is essential for communicating prediction uncertainty in forecasting applications, helping stakeholders understand both the expected values and the range of possible outcomes.
6+
7+
## Applications
8+
9+
- Visualizing sales and demand forecasting with confidence intervals for inventory planning
10+
- Displaying stock price or financial indicator predictions with uncertainty ranges for risk assessment
11+
- Communicating weather forecast uncertainty with multiple confidence bands
12+
- Presenting economic projections with confidence intervals for policy decisions
13+
- Illustrating capacity planning forecasts with uncertainty bounds for resource allocation
14+
15+
## Data
16+
17+
- `date` (datetime) - Time index covering both historical and forecast periods
18+
- `actual` (numeric) - Historical observed values (null/NaN for forecast period)
19+
- `forecast` (numeric) - Predicted values (typically starts where actual ends, may overlap slightly)
20+
- `lower_80` (numeric) - Lower bound of 80% confidence interval
21+
- `upper_80` (numeric) - Upper bound of 80% confidence interval
22+
- `lower_95` (numeric) - Lower bound of 95% confidence interval
23+
- `upper_95` (numeric) - Upper bound of 95% confidence interval
24+
- Size: 50-200 total points (30-150 historical + 10-50 forecast)
25+
- Example: Monthly sales data with 3 years history and 6-month forecast from Prophet or ARIMA model
26+
27+
## Notes
28+
29+
- Use a solid line for historical data and a distinct style (dashed or different color) for forecast
30+
- Mark the forecast start with a vertical line or shaded region
31+
- Use nested shaded bands for confidence intervals: darker for 80%, lighter for 95%
32+
- Semi-transparent fills (alpha 0.2-0.4) allow bands to overlap without obscuring data
33+
- Include a clear legend identifying historical data, forecast, and confidence levels
34+
- Consider using a consistent color family (e.g., blue for historical, orange for forecast)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Specification-level metadata for timeseries-forecast-uncertainty
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: timeseries-forecast-uncertainty
5+
title: Time Series Forecast with Uncertainty Band
6+
7+
# Specification tracking
8+
created: 2026-01-07T16:20:29Z
9+
updated: null
10+
issue: 3188
11+
suggested: MarkusNeusinger
12+
13+
# Classification tags (applies to all library implementations)
14+
# See docs/reference/tagging-system.md for detailed guidelines
15+
tags:
16+
plot_type:
17+
- line
18+
- area
19+
data_type:
20+
- timeseries
21+
- numeric
22+
- datetime
23+
domain:
24+
- general
25+
- business
26+
- finance
27+
- statistics
28+
features:
29+
- temporal
30+
- forecast
31+
- uncertainty
32+
- confidence-interval
33+
- annotated

0 commit comments

Comments
 (0)