calcfidata
v0.1.0
Published
Node/JS/TS client for CalcFi Open Data — 34 free CC-BY financial and macroeconomic time series mirrored verbatim from primary sources (FRED, BLS, Freddie Mac, US Treasury, BEA, World Bank, Federal Reserve, FDIC, EIA). Companion to calcfi.app.
Maintainers
Keywords
Readme
calcfidata
Node / JS / TS client for CalcFi Open Data — 34 free CC-BY financial and macroeconomic time series mirrored verbatim from primary sources (FRED, BLS, Freddie Mac, US Treasury, BEA, World Bank, Federal Reserve, FDIC, EIA).
Zero dependencies. ES modules + CommonJS dual entry. Built-in TypeScript types. Uses native fetch (Node 18+).
Install
npm install calcfidataQuick start (ESM / TypeScript)
import { load, listSeries, multi, metadata } from 'calcfidata';
// 30-year fixed mortgage rate (Freddie Mac PMMS)
const obs = await load('30-year-fixed');
console.log(obs.slice(-5));
// [{ date: 2026-05-15, value: 6.95, unit: 'percent' }, ...]
// 34-series catalog
const catalog = await listSeries();
console.log(catalog.length); // 34
// CPI vs PCE inflation on a common monthly grid
const inflation = await multi(['cpi', 'pce'], 'inner');
for (const [date, row] of inflation) {
console.log(date, row.cpi, row.pce);
}
// Per-series Frictionless metadata (primary URL, license, schema)
const meta = await metadata('cpi');
console.log(meta.sources[0].title); // "BLS via FRED (CPIAUCSL)"
console.log(meta.sources[0].path); // canonical primary-source URLCommonJS
const { load, listSeries } = require('calcfidata');
load('30-year-fixed').then(obs => console.log(obs.slice(-5)));Series catalog (34 series across 11 categories)
| Category | Series | |---|---| | Mortgage rates | 30-year fixed, 15-year fixed (Freddie Mac PMMS) | | Treasury yields | 2-year, 10-year constant maturity (US Treasury) | | Policy + reference rates | Federal Funds Rate, Prime Rate, credit card APR (Federal Reserve) | | Inflation | CPI-U (BLS), PCE (BEA), world inflation (World Bank) | | Employment | unemployment rate, labor-force participation, hourly earnings (BLS) | | Energy | WTI, Brent crude, US regular gasoline (EIA) | | Foreign exchange | USD/EUR, USD/GBP, USD/JPY (Federal Reserve H.10) | | Commodities | copper, corn (World Bank) | | Macro | US + Eurozone GDP per capita, world unemployment (World Bank) | | Consumer credit | credit card APR, personal loan, auto loan (Federal Reserve G.19) | | Crypto (snapshot) | Bitcoin, Ethereum, Solana (CoinGecko) | | Deposit rates (snapshot) | savings, money-market, CDs (FDIC) |
API
| Function | Returns | Purpose |
|---|---|---|
| load(slug) | Promise<Observation[]> | Single time series |
| listSeries() | Promise<SeriesInfo[]> | All 34 series catalog |
| metadata(slug) | Promise<FrictionlessMetadata> | Frictionless datapackage.json |
| multi(slugs, alignOn) | Promise<Map<string, Record<string, number>>> | Multiple series joined on date |
| parseCsv(csvText) | Observation[] | Stand-alone CSV parser |
Full TS types in types/index.d.ts.
Companion clients + access surfaces
- Python:
pip install calcfidata(PyPI · Anaconda · conda-forge PR) - R:
install.packages("calcfidata")(CRAN review) - Go:
go get gitlab.com/jere.salmisto/calcfi-open-data/go - Julia:
Pkg.add("CalcFiData")(Julia General registry pending) - dbt package: hub.getdbt.com/jeresalmisto/calcfi_open_data (pending merge)
- Live SQL (Datasette): https://calcfi-open-data.vercel.app/
- BigQuery Public Datasets: Analytics Hub listing
- data.world: https://data.world/jerehere/calcfi-open-data
- DoltHub (git-for-data): https://www.dolthub.com/repositories/jerehere/calcfi-open-data
- MotherDuck (cloud DuckDB):
ATTACH 'md:_share/calcfi_open_data_share/92e4b6ab-46e0-42f4-8ebb-9e7ab22eae00' - Hugging Face Datasets: https://huggingface.co/datasets/iizy/calcfi-open-data
- Documentation: https://calcfidata.readthedocs.io/
- Permanent DOIs: Figshare · Zenodo · OSF · Kaggle · Mendeley Data
License
- Package code: MIT
- Underlying data: CC BY 4.0 — attribution requested to CalcFi (https://calcfi.app) and the named primary source per series
Author
Jere Salmisto — Independent researcher, founder of calcfi.app. ORCID: 0009-0000-0916-8684.
Citation
@dataset{salmisto_2026_calcfi_open_data,
author = {Salmisto, Jere},
title = {CalcFi Open Data: 34 Free CC-BY Financial and Macro Time Series Mirrored from Primary Sources},
year = 2026,
publisher = {Figshare},
doi = {10.6084/m9.figshare.32332290}
}