Analyzing Time Series
by https-deeplearning-ai
Comprehensive diagnostic analysis of time series data. Use when users provide CSV time series data and want to understand its characteristics before forecasting - stationarity, seasonality, trend, forecastability, and transform recommendations.
Skill Details
Repository Files
5 files in this skill directory
name: analyzing-time-series description: Comprehensive diagnostic analysis of time series data. Use when users provide CSV time series data and want to understand its characteristics before forecasting - stationarity, seasonality, trend, forecastability, and transform recommendations.
Time Series Diagnostics
Comprehensive diagnostic toolkit to analyze time series data characteristics before forecasting.
Input Format
The input CSV file should have two columns:
- Date column - Timestamps or dates (e.g.,
date,timestamp,time) - Value column - Numeric values to analyze (e.g.,
value,sales,temperature)
Workflow
Step 1: Run diagnostics
python scripts/diagnose.py data.csv --output-dir results/
This runs all statistical tests and analyses. Outputs diagnostics.json with all metrics and summary.txt with human-readable findings. Column names are auto-detected, or can be specified with --date-col and --value-col options.
Step 2: Generate plots (optional)
python scripts/visualize.py data.csv --output-dir results/
Creates diagnostic plots in results/plots/ for visual inspection. Run after diagnose.py to ensure ACF/PACF plots are synchronized with stationarity results. Column names are auto-detected, or can be specified with --date-col and --value-col options.
Step 3: Report to user
Summarize findings from summary.txt and present relevant plots. See references/interpretation.md for guidance on:
- Is the data forecastable?
- Is it stationary? How much differencing is needed?
- Is there seasonality? What period?
- Is there a trend? What direction?
- Is a transform needed?
Script Options
Both scripts accept:
--date-col NAME- Date column (auto-detected if omitted)--value-col NAME- Value column (auto-detected if omitted)--output-dir PATH- Output directory (default:diagnostics/)--seasonal-period N- Seasonal period (auto-detected if omitted)
Output Files
results/
├── diagnostics.json # All test results and statistics
├── summary.txt # Human-readable findings
├── diagnostics_state.json # Internal state for plot synchronization
└── plots/
├── timeseries.png
├── histogram.png
├── rolling_stats.png
├── box_by_dayofweek.png # By day of week (if applicable)
├── box_by_month.png # By month (if applicable)
├── box_by_quarter.png # By quarter (if applicable)
├── acf_pacf.png
├── decomposition.png
└── lag_scatter.png
References
See references/interpretation.md for:
- Statistical test thresholds and interpretation
- Seasonal period guidelines by data frequency
- Transform recommendations
Dependencies
pandas, numpy, matplotlib, statsmodels, scipy
Related Skills
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Analyzing Financial Statements
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
Data Storytelling
Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.
Kpi Dashboard Design
Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Sql Optimization Patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
Anndata
This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.
Xlsx
Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.
