Analytics Tool · Python · Claude API

AI Strategic Briefing
Generator

Autonomous pipeline from raw CSV to polished executive report — statistical analysis, anomaly detection, forecasting, and AI-generated narrative in a single command.

View Sample Report → View on GitHub

Pipeline

01 / INGEST
CSV Loading
Auto-detects schema, types, date columns, missing values
02 / ANALYZE
Statistics
Descriptive stats, IQR/Z-score outlier counts for every column
03 / DETECT
Anomaly Detection
Z-score + CUSUM algorithms flag structural breaks in time-series
04 / FORECAST
Holt-Winters ETS
12-month forward projection with 95% confidence interval
05 / BRIEF
AI Narrative
Claude API synthesizes findings into an executive summary
06 / EXPORT
HTML Report
Self-contained shareable file with embedded Chart.js charts
Sample Report: US Retail Sales Analysis
135-month FRED dataset (Jan 2015 – Mar 2026). Pipeline auto-detected time-series structure, flagged the COVID demand shock, ran Holt-Winters forecast (+3.9% over 12 months), and generated an AI executive summary — no human configuration needed.
Open Report →

Usage

# Install dependencies pip install pandas numpy scipy anthropic statsmodels # Run on any CSV file python briefing.py --input your_data.csv --title "Q2 Analysis" # With AI narrative (requires API key) export ANTHROPIC_API_KEY=your_key_here python briefing.py --input your_data.csv

Output: report_[filename]_[date].html — fully self-contained, no server required.

What it detects

Auto Schema Detection
Identifies date columns, numeric fields, and categorical variables without configuration.
Time-Series Recognition
Detects regularly-spaced temporal data and activates forecasting + anomaly detection pipeline.
Z-Score Anomalies
Flags observations greater than 2.5σ from the series mean. Catches single-point extreme deviations.
CUSUM Regime Shifts
Detects sustained directional changes that accumulate over multiple periods — missed by point-based tests.
Holt-Winters Forecast
Additive trend + seasonality model with horizon-scaled 95% CI. AIC-optimized parameters.
Claude AI Synthesis
Sends statistical context to Claude (Haiku model) to write a 3-paragraph executive brief with specific numbers.

Tech stack

Python 3.9+ pandas numpy scipy.stats statsmodels anthropic SDK Chart.js 4 Holt-Winters ETS CUSUM