CRED is Canadian Research Economic Data: one search box across Statistics Canada and the Bank of Canada, interactive charts with Canadian recession shading, and a public read API. The v1 registry carries 104 verified series across 8 categories, from the BoC policy rate to CPI to provincial unemployment rates, and every observation shown anywhere in the app comes from Statistics Canada's Web Data Service or the Bank of Canada's Valet API. Nothing in CRED is fabricated or backfilled from a third party.
Series pages carry FRED-style Notes with a suggested citation, Release Tables linking to the source table, and Related Data and Content (chart-thumbnail suggestions, other formats like SA/NSA, categories, releases, tags). The Share Graph menu produces a custom graph link (/graph?g=..., a standalone chromeless chart page), a website embed snippet, or a server-rendered PNG image link (/api/graph-image). Series in a geographic family (provincial unemployment, provincial CPI) get a View Map toggle: a Canada choropleth with zoom, fullscreen, and a value legend.
All screenshots below show live data via StatCan/BoC, rendered by the app on 2026-10-09.
Home page: centered hero with search, trending terms, and the At a Glance panel of six flagship series fetched live via StatCan/BoC.
Home page at 390px: the centered hero and flagship panel stack into a single column.
Series page for GDP_REAL (Real Gross Domestic Product): quarterly observations from 1961 through Q2 2026, C.D. Howe recession shading, the FRED-style Notes block with suggested citation, Release Tables, and the Related Data and Content discovery sections (data suggestions, categories, releases, tags).
Category browser: 8 categories with live series counts from the registry.
CRED keeps no warehouse copy of upstream data. The design has three parts:
- The registry (
src/lib/registry.ts): 104 series mappings, each one binding a CRED series ID to the exact upstream location of its data (a StatCan table plus vector IDs, or a BoC Valet group plus series key), plus the release (survey/program) it belongs to and the source and release pages. The registry is the only thing CRED owns about the data. - A live proxy with a 24h cache (
src/lib/data.ts): pages and the/api/observationsendpoint call the upstream endpoints directly at request time and cache each series in memory for 24 hours (stale-while-revalidate). StatCan and BoC stay the system of record; CRED never serves a stale copy it owns. When StatCan's WDS returns non-success blocks for every vector (e.g. HTTP 409 while a table refreshes), the fetch throws instead of returning an empty chart, so the page can say so honestly. - Vintage snapshots (
src/lib/vintages.ts): StatCan overwrites past revisions in place, so revision history only exists from the day CRED starts collecting it. A daily cron snapshots each featured series into an append-only archive (Vercel Blob whenBLOB_READ_WRITE_TOKENis set,./data/vintages/in local dev). The archive starts empty on launch day.
There is no database in v1, by design.
| Source | What it supplies | Endpoint | Licence |
|---|---|---|---|
| Statistics Canada Web Data Service | LFS, CPI, GDP, trade, retail, housing, provincial labour (the majority of v1 series) | https://www150.statcan.gc.ca/t1/wds/rest |
Statistics Canada Open Licence: reuse allowed with attribution |
| Bank of Canada Valet API | Policy rate, bond yields, T-bills, FX, monetary aggregates | https://www.bankofcanada.ca/valet/observations/{key}/json |
Free reuse with attribution per BoC terms |
| C.D. Howe Institute Business Cycle Council | Canadian recession peak/trough dates used for chart shading | Published council chronology | Cited with attribution |
No observation in CRED was ever sourced from FRED: FRED's terms forbid building a competing product on its data. The data here is Canadian, from Canadian sources.
A read API over Canadian economic data. No key required for reads. Responses are JSON. Observations come from the same 24h-cached live fetch as the charts, so each series is pulled from its source at most once per day. The full interactive reference is at /api-docs in the app.
# Search the registry by ID, title, or description (omit q to list all 104 series)
curl "https://cred.nshipyard.com/api/series?q=cpi"
# Full metadata for one series, including its StatCan table or Valet mapping
curl "https://cred.nshipyard.com/api/series/UNRATE_CA"
# Observations, ascending by date. from and to are optional ISO dates
curl "https://cred.nshipyard.com/api/observations?series=UNRATE_CA&from=2020-01-01&to=2020-04-01"
# The 8 top-level categories with live series counts from the registry
curl "https://cred.nshipyard.com/api/categories"
# Daily snapshot dates for a series from the vintage archive
curl "https://cred.nshipyard.com/api/vintages?series=UNRATE_CA"
# Daily vintage snapshot for every featured series (authorized only)
curl -H "Authorization: Bearer $CRON_SECRET" "https://cred.nshipyard.com/api/cron/snapshot"CRED exposes a live MCP server at /mcp (streamable HTTP, JSON-RPC 2.0), backed by the same registry and observation proxy as the REST API. Three tools: search_series, get_observations, list_categories. The /api-docs#mcp section has one-click copy configs for Claude Desktop, Muse, and generic clients.
# List the tools
curl -X POST "https://cred.nshipyard.com/mcp" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# Call a tool
curl -X POST "https://cred.nshipyard.com/mcp" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_observations","arguments":{"series":"CPI_ALLITEMS_SA","from":"2020-01-01"}}}'Every series mapping in src/lib/registry.ts was verified live on 2026-10-09 against Statistics Canada WDS or Bank of Canada Valet. When the WDS data endpoints returned HTTP 409 (table locked) for the Labour Force Survey table 14-10-0287-01 during the nightly refresh window, the LFS vectors were cross-checked against Statistics Canada's official full-table CSV for the 2026-09-04 release instead. Each registry entry carries a lastVerified date, plus the release (survey/program) and the source and release pages it was verified against.
The governing rule: an unverified mapping is dropped, not shipped. If a series cannot be confirmed against its upstream endpoint, it does not enter the registry.
npm install
npm run dev # development server
npm run build # production build (must pass before any deploy)
npm run start # serve the production buildThe app fetches live data on first load. No API key is needed for StatCan WDS or the BoC Valet API.
| Variable | Required | Purpose |
|---|---|---|
CRON_SECRET |
For the cron route | Random string; /api/cron/snapshot accepts Authorization: Bearer $CRON_SECRET (or the x-vercel-cron header Vercel's own scheduler sends). Returns 401 without it. |
BLOB_READ_WRITE_TOKEN |
Optional | Connect a Vercel Blob store and the cron writes vintage snapshots to vintages/<SERIES>/<yyyy-mm-dd>.ndjson in Blob. Without it, snapshots go to ./data/vintages/, which is gitignored and local-dev only. |
vercel.json declares the cron: 0 12 * * * daily at /api/cron/snapshot. Set CRON_SECRET in the Vercel dashboard under Environment Variables before the first scheduled run.
- Accounts and saved graphs: let users save chart configurations and share them.
- EN/FR: a French interface for a Canadian public dataset is not optional, it is just scheduled after the data layer is solid.
Data: Statistics Canada Web Data Service (Statistics Canada Open Licence) and the Bank of Canada Valet API. Recession dates: C.D. Howe Institute Business Cycle Council. An Open Nshipyard project, not affiliated with the Government of Canada.
Richardson Dackam