TypeScript SDKs for official statistics
Provider-level clients for statistical APIs that need to be cited, reproduced, and refused when the response cannot be proven.
Installation
npm install @varve/statcan-wds @varve/statcan-rdaas @varve/ons-api @varve/eurostat-api @varve/bis-stats-api @varve/worldbank-api @varve/cmhc-api @varve/boc-valet @varve/fred-api zodNote: zod is a required peer dependency for runtime validation.
Available Packages
Statistics Canada
Time series vectors, table metadata, and release monitoring. Full coverage of all 16 WDS endpoints with automated 409/500 retry handling.
Statistics Canada
Industry and occupation classifications, hierarchical code trees, plain-English index search, and version concordances.
Canada Mortgage and Housing Corporation
Housing market CSV exports, bundled portal table metadata, filter validation, and normalized observation rows.
Bank of Canada
Financial time series, exchange rates, series and group discovery, recent observations, and graph-ready metadata.
UK Office for National Statistics
Economic and demographic timeseries by CDID, dataset topic navigation, observation querying, and filtered CSV/XLS data extracts.
Eurostat
JSON-stat data, SDMX metadata and CSV access, dataset catalogues, and graph-ready dimension/member metadata.
Bank for International Settlements
SDMX data queries, availability constraints, dataflows, codelists, and structure metadata for BIS statistics.
World Bank
Countries, indicators, sources, topics, observations, pagination helpers, and indicator graph metadata.
Federal Reserve Bank of St. Louis
Economic series, observations, categories, releases, tags, GeoFRED regional data, and graph-ready metadata.
Design Principles
Runtime Validation
All external API responses are parsed through Zod schemas. Upstream shape changes throw structured errors before your application treats the response as trusted data.
Isomorphic Implementation
Clients rely exclusively on the standard Fetch API without Node.js-specific dependencies. Supported across Node.js 18+, modern browsers, and edge runtimes (e.g., Cloudflare Workers).
Network Resilience
Built-in retry mechanisms with exponential backoff. Automatically handles transient 409/429/500 HTTP statuses, transparently respecting Retry-After headers.
Auditable Coverage
Provider-specific quirks, official references, and live integration status are documented so wrapper behavior can be inspected as APIs change.