flowchart LR
subgraph "Data Ingestion"
A["1-ferry.R<br/><i>Import</i>"]
end
subgraph "Transformation"
B["2-ellis.R<br/><i>Clean & Shape</i>"]
end
subgraph "Advisory"
C["eda-2.qmd<br/><i>Diagnostics</i>"]
end
subgraph "Modeling"
D["3-mint-IS.R<br/><i>Prepare</i>"]
E["4-train-IS.R<br/><i>Estimate</i>"]
F["5-forecast-IS.R<br/><i>Predict</i>"]
end
subgraph "Delivery"
G["report-1.qmd<br/><i>Report</i>"]
end
A --> B --> C
B --> D --> E --> F --> G
C -.->|informs| D
style A fill:#4a90d9,color:#fff
style B fill:#4a90d9,color:#fff
style C fill:#f5a623,color:#fff
style D fill:#7b68ee,color:#fff
style E fill:#7b68ee,color:#fff
style F fill:#7b68ee,color:#fff
style G fill:#50c878,color:#fff
Project README
Alberta Income Support: Caseload Forecast
End-to-end forecasting pipeline — from open data to 24-month projections.
This repository implements a complete monthly caseload forecasting system for Alberta’s Income Support program. It ingests publicly available Government of Alberta data (April 2005 – September 2025, ~50,000 rows), transforms it through a six-stage reproducible pipeline, and produces a static HTML report with 24-month ARIMA forecasts and prediction intervals. The entire pipeline runs on-premises with a single command and is designed as the cloud-agnostic core for subsequent migration to Azure ML and Snowflake.
At a Glance
| Parameter | Value |
|---|---|
| Data Source | Alberta Open Data – Income Support Caseload |
| Temporal Coverage | April 2005 – September 2025 (246 months) |
| Focal Date | 2025-09-01 (last month with observed data) |
| Forecast Horizon | 24 months (October 2025 – September 2027) |
| Primary Model | ARIMA(3,1,1)(1,0,0)[12] with log transform |
| Baseline Model | Seasonal Naïve (Tier 1) |
| Output | Static HTML report with forecasts + 95% prediction intervals |
Pipeline Architecture
The system follows a Ferry → Ellis → Mint → Train → Forecast → Report pattern, adapted from RAnalysisSkeleton. Each stage is a self-contained R script orchestrated by flow.R.
Pipeline Stages
| # | Stage | Script | Role | Key Output |
|---|---|---|---|---|
| 1 | Ferry | 1-ferry.R |
Import raw data from 4 equivalent sources (URL, CSV, SQLite, SQL Server) | Staging SQLite database |
| 2 | Ellis | 2-ellis.R |
Transform raw data into 11 analysis-ready tables (wide + long) | Parquet files + SQLite + CACHE-manifest |
| — | EDA | eda-2.qmd |
Advisory — trend, seasonality, stationarity diagnostics | Quarto HTML report (not in pipeline flow) |
| 3 | Mint | 3-mint-IS.R |
Train/test split, log transform, regressor matrices | forge/ Parquet slices + forge_manifest.yml |
| 4 | Train | 4-train-IS.R |
Fit Tier 1 (Seasonal Naïve) and Tier 2 (ARIMA) models | Model .rds objects + model_registry.csv |
| 5 | Forecast | 5-forecast-IS.R |
Generate 24-month projections + backtest diagnostics | Forecast CSVs + forecast_manifest.yml |
| 6 | Report | report-1.qmd |
Assemble final HTML deliverable | report-1.html |
Lineage: A forge_hash in forge_manifest.yml links every model and forecast back to the exact data slice that produced it. Changing the focal_date in config.yml invalidates all Mint/Train/Forecast artifacts downstream.
Dual format: Ellis outputs both Apache Parquet (primary — fast, columnar, cloud-ready) and SQLite (secondary — SQL exploration, portability).
See the Pipeline Guide for full technical documentation.
Reports & Exploratory Analysis
Forecast Report
The final deliverable: 24-month forward projections for Alberta Income Support caseload (October 2025 – September 2027).
Includes executive summary, hero forecast chart, model comparison (Seasonal Naïve vs ARIMA), backtest validation against a held-out 24-month window, policy implications, and full data provenance.


Exploratory Data Analysis (EDA)
The EDA report runs outside the pipeline as an advisory step. It diagnoses the time series properties that inform modeling decisions in Mint and Train.
Coverage: 20-year trends · client type composition · 7 historical periods (2008 crisis, oil collapse, COVID-19, recovery) · year-over-year seasonality · growth rates · stationarity tests (ADF, KPSS) · ACF/PACF for ARIMA order selection · STL decomposition · log transform assessment.



Data
Source: Alberta Open Data — monthly aggregates of Income Support caseload, intakes, and exits by geography and demographics.
Ellis transforms the raw data into 11 analysis-ready tables:
| Dimension | Wide | Long | Coverage |
|---|---|---|---|
| Total Caseload | 246 rows | — | Apr 2005 – Sep 2025 |
| Client Type | 162 | 648 | Apr 2012 – Sep 2025 |
| Family Composition | 162 | 648 | Apr 2012 – Sep 2025 |
| Regions | 90 | 720 | Apr 2018 – Sep 2025 |
| Age Groups | 66 | 990 | Apr 2020 – Sep 2025 |
| Gender | 66 | 198 | Apr 2020 – Sep 2025 |
Dimensional availability expanded over five historical phases as the Government of Alberta added breakdowns to the published dataset.
See the CACHE Manifest for table schemas and row counts.
Cloud Migration Roadmap
This repository is the cloud-agnostic on-premises core. It establishes a fully functional forecasting pipeline that can be extended to cloud ML platforms through provider-specific forks.
Phase 1 — On-Premises (Current)
All six pipeline stages execute end-to-end on a local workstation. Outputs are static HTML reports suitable for manual distribution or SharePoint hosting.
Phase 2 — Cloud ML Platforms (Planned)
| Capability | Azure ML (primary) | Snowflake ML (secondary) |
|---|---|---|
| Compute | Azure ML Compute Instances | Snowflake Warehouses |
| Pipeline Orchestration | Azure ML Pipelines | Snowflake Tasks |
| Model Registry | Azure ML Model Registry + MLflow | Snowflake Model Registry |
| Experiment Tracking | MLflow | Snowflake ML |
| Report Delivery | Cloud-hosted app with Entra ID auth | Streamlit in Snowflake |
| Scheduling | Azure ML scheduled runs | Snowflake Tasks (cron) |
Design-for-Portability Decisions
- Apache Parquet artifacts — columnar, cross-platform, cloud-native
- Modular pipeline stages — each script is a self-contained step
- Config-driven paths — all parameters in
config.yml, no hardcoded values - Forge manifest — versioned data contract linking Mint → Train → Forecast
- Deterministic seeds — reproducible results across environments
AI Support
This project includes a persona-based AI support system with 9 specialized roles: Developer, Project Manager, Research Scientist, Prompt Engineer, Data Engineer, Grapher, Reporter, DevOps Engineer, and Frontend Architect. Context is managed dynamically via VS Code tasks.