time-series

Analyze temporal trends, seasonality, and anomalies in Montréal open datasets using CKAN SQL.

1|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/alistaircroll/montreal-open-data --skill time-series-alistaircroll
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: time-series
Source: https://github.com/alistaircroll/montreal-open-data/tree/main/skills/analysis/time-series
Command: npx skills add https://github.com/alistaircroll/montreal-open-data --skill time-series-alistaircroll

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Montréal's open datasets use inconsistent date formats, lack native SQL date functions, and have quirks like partial-year data and COVID-era anomalies, making temporal analysis error-prone without guidance. ## Core Features & Use Cases - Date Field Reference: Maps date columns, formats, and granularity for crime, permits, 311, fire, collisions, trees, and budget datasets. - Seven Analysis Patterns: Ready-to-use SQL and Python patterns for monthly trends, year-over-year comparison, day-of-week analysis, seasonal patterns, growth rates, moving averages, and before/after impact studies. - Pitfall Guidance: Documents gotchas such as the 32K row limit, missing date functions in CKAN SQL, timezone handling, and seasonal bias. - Use Case: Compare monthly crime incidents across 2023-2025 by extracting year-month with SUBSTRING, then compute year-over-year growth rates client-side in Python. ## Quick Start Ask the agent to show the monthly trend of 311 requests in Montréal over the past two years and highlight any seasonal patterns.

Frequently Asked Questions about time-series

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze monthly trends in Montréal open data?

Use CKAN SQL with SUBSTRING to extract the year-month from date fields, then GROUP BY and COUNT. For example, SUBSTRING("DATE", 1, 7) on the crime dataset yields monthly incident counts ordered chronologically.

How to extract year or month from dates in CKAN SQL?

CKAN SQL has no YEAR(), MONTH(), or DAYOFWEEK() functions. Use SUBSTRING(field, start, length) to slice date strings, such as SUBSTRING("DATE", 1, 4) for year or SUBSTRING("DATE", 6, 2) for month.

Can I do day-of-week analysis with CKAN SQL?

No, CKAN SQL lacks weekday functions, so day-of-week analysis must be done client-side. Fetch the raw dates, then use Python's datetime.strptime and strftime('%A') to bucket records by weekday.

Why is my year-over-year comparison misleading for Montréal data?

Current-year data is partial, so comparing it against full prior years understates totals. Also, 2020-2021 contains COVID-related anomalies across most datasets, and seasonal bias distorts comparisons unless you match the same months.

What are the limitations of temporal queries on CKAN datasets?

Queries are capped at 32K rows, so multi-year daily data must be aggregated server-side. Date formats vary between datasets (T separators, spaces, date-only), and all timestamps are Eastern Time rather than UTC.