{"id":51510897,"url":"https://github.com/fbclh/macro-signal","last_synced_at":"2026-07-08T06:01:23.124Z","repository":{"id":369977741,"uuid":"1290489457","full_name":"fbclh/macro-signal","owner":"fbclh","description":null,"archived":false,"fork":false,"pushed_at":"2026-07-07T19:02:10.000Z","size":205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"feat","last_synced_at":"2026-07-07T19:08:12.394Z","etag":null,"topics":["dashboard","data-analytics","data-visualization","macroeconomics","nextjs","recharts","shadcn-ui","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fbclh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-06T01:52:51.000Z","updated_at":"2026-07-07T19:02:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fbclh/macro-signal","commit_stats":null,"previous_names":["fbclh/macro-signal"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fbclh/macro-signal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbclh%2Fmacro-signal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbclh%2Fmacro-signal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbclh%2Fmacro-signal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbclh%2Fmacro-signal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fbclh","download_url":"https://codeload.github.com/fbclh/macro-signal/tar.gz/refs/heads/feat","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbclh%2Fmacro-signal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35253863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","data-analytics","data-visualization","macroeconomics","nextjs","recharts","shadcn-ui","tailwindcss","typescript"],"created_at":"2026-07-08T06:01:22.218Z","updated_at":"2026-07-08T06:01:23.118Z","avatar_url":"https://github.com/fbclh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Macro Signal\n\nA G7 macroeconomic analytics — snapshot cards, a 25-year two-country comparison chart with rule-based insights, and a multi-country scanner table. The data layer mirrors the TE snapshot/historical shapes behind `lib/te.ts`, with live series fetched from open providers through a per-indicator adapter (see *Architecture*).\n\n![Macro Signal screenshot](./docs/screenshot.png)\n\n## Live demo\n\n**[View live demo →](https://macro-signal.vercel.app)**\n\n## Features\n\n- **Main indicators** — snapshot cards with latest value, previous reading, delta, and sparkline per indicator (country selector). Deltas and sparklines are colored by economic meaning, not raw direction — rising unemployment shows red, rising GDP green — while indicators without a fixed valence (policy rates, bond yields, external balances) stay neutral.\n- **Comparison** — overlay any two G7 economies on one indicator (~25 years), with a generated one-line insight (consecutive-trend and crossover detection, pure logic — no AI calls)\n- **G7 at a glance** — 7 countries × 8 indicators across two scanner tables; row click highlights a country in the glance view\n- Dark/light theme, responsive, zero client-side API keys\n\n**G7 economies:** United States, Canada, Japan, Germany, France, United Kingdom, Italy.\n\n## Architecture \u0026 data sources\n\nTrading Economics confirmed by email (July 2026) that guest keys and free developer accounts have been discontinued. The frozen 8-indicator catalog in `lib/catalog.ts` is the single source of truth for cards and both G7 tables. `lib/te.ts` routes each indicator by `source` to:\n\n- `lib/wb.ts` — World Bank open API\n- `lib/imf.ts` — IMF DataMapper API\n- `lib/fred.ts` — FRED (policy rates + 10Y yields)\n\nHistorical data is also exposed at `GET /api/series?symbols=usa.fp.cpi.totl.zg,...`.\n\n| Indicator | Source | Series |\n|---|---|---|\n| GDP Growth | World Bank | `NY.GDP.MKTP.KD.ZG` |\n| Inflation (CPI) | World Bank | `FP.CPI.TOTL.ZG` |\n| Unemployment | World Bank | `SL.UEM.TOTL.ZS` |\n| Interest Rate | FRED | per-country (see ¹) |\n| Balance of Trade | World Bank | `NE.RSB.GNFS.ZS` |\n| Current Account | World Bank | `BN.CAB.XOKA.GD.ZS` |\n| Government Debt | IMF DataMapper | `GGXWDG_NGDP` |\n| 10Y Bond Yield | FRED | `IRLTLT01{CC}M156N` |\n\n¹ **Interest rate series (verified Jul 2026):** CAN `IRSTCI01CAM156N` (BoC call-money; `IRSTCB01CAM156N` discontinued); JPN `IRSTCI01JPM156N` (BoJ overnight call; `IRSTCB01JPM156N` discontinued); USA `DFEDTARU` (`IRSTCB01USM156N` missing); GBR `IUDSOIA` / SONIA (`IRSTCB01GBM156N` missing); DEU/FRA/ITA `ECBDFR` (euro area ECB deposit facility rate). Methodology note shown under the fiscal G7 table.\n\nIndicators were selected for **complete live coverage across all G7 economies** (56/56 cells). Series with partial coverage (real interest rate, credit rating, central-government debt) were excluded.\n\n```bash\nUSE_MOCK=false FRED_API_KEY=your_key npm run verify-catalog\n```\n\nAll fetches are server-side with hourly revalidation; keys never reach the client. With `USE_MOCK=true`, the app serves bundled fixtures only. In live mode, missing `FRED_API_KEY` falls back to fixtures for FRED indicators (console warning); WB and IMF errors surface as empty cells or API errors.\n\n### Data freshness\n\nSources publish at different frequencies: World Bank series are annual (latest actual year, currently 2024); IMF WEO is annual with actuals/estimates through 2025 — projection years are deliberately excluded; FRED rate/yield series are monthly (latest available observation). Each card and cell shows the true as-of date of its underlying data point rather than a normalized date.\n\n## Tech stack\n\nNext.js · TypeScript · Recharts · shadcn/ui · Tailwind CSS\n\n## Getting started\n\n```bash\nnpm install\ncp .env.example .env.local   # defaults to USE_MOCK=true for offline dev\nnpm run dev\n```\n\n| Variable | Required | Purpose |\n|---|---|---|\n| `FRED_API_KEY` | for live rate/yield data | Interest rate + 10Y bond yield ([free key](https://fred.stlouisfed.org/docs/api/api_key.html)) |\n| `USE_MOCK` | optional (`true` in `.env.example`) | Fully offline fixtures via `lib/mock/fixtures.json` |\n\n## Scripts\n\n```bash\nnpm run dev              # local development\nnpm run build            # production build\nnpm run lint             # ESLint\nnpm run verify-catalog   # live 7×8 coverage matrix (needs FRED_API_KEY)\nnpm run generate-mock    # regenerate offline fixtures\n```\n\n## Author\n\n[Fabio Coelho](https://www.fbclh.io/) · [GitHub](https://github.com/fbclh) · [LinkedIn](https://www.linkedin.com/in/fbclh/)\n\n## Attribution\n\nData provided by the [World Bank](https://data.worldbank.org/), [IMF DataMapper](https://www.imf.org/external/datamapper/), and [FRED](https://fred.stlouisfed.org/) (Federal Reserve Bank of St. Louis).\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbclh%2Fmacro-signal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffbclh%2Fmacro-signal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbclh%2Fmacro-signal/lists"}