Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Data Analysis — fred_macro.csv

Public visualization

Data Analysis — fred_macro.csv

0 stars9🌍 Public
CCurran Kelleher
Last edited Oct 20, 2026
Created on Oct 15, 2026

Created from react-d3-starter template

FRED Macro Dataset — fred_macro.csv

A monthly macroeconomic time-series dataset sourced from Federal Reserve Economic Data (FRED), covering January 2000 through (containment permitting) 2026. It pairs a market indicator (S&P 500) with several core U.S. monetary and labor statistics, making it suitable for studying the interaction between monetary policy, inflation, and the labor market.

Dataset Overview

  • Filename: fred_macro.csv
  • Rows: 313
  • Columns: 8
  • Time coverage: 2000-01-01 to 2026-01-01 (monthly cadence)
  • Subject matter: U.S. macroeconomic indicators — interest rates, inflation, unemployment, output, and equity markets.

Each row is one monthly observation. Because the columns come from FRED series with different native release frequencies (e.g. GDP is quarterly, rates are daily-or-monthly rolled up), several columns have substantial missingness where no monthly value was published.

Column Descriptions

For each column: what it appears to represent, its Tamara Munzner data type, and notes on missing/unusual values. Interpretations are tentative — the column names are strong hints, not verified definitions.

Column Description (tentative) Munzner type Notes
date Calendar month of the observation (first of month). Temporal 313 unique values, no missing. Min 2000, max 2026.
sp500 S&P 500 equity index level at that month. Quantitative 198 missing (the sparsest column). Values range ~2098.86–6849.09. Likely only populated for recent months.
fed_funds_rate Effective/effective-target federal funds rate (%). Quantitative No missing. Range 0.04–6.86; note the long ~0% era (2009–2015, 2020–2022).
cpi Consumer Price Index (index level, not % change). Quantitative 1 missing. Range 169.3–326.588. Monotonically rising index — treat as level, not inflation rate.
unemployment_rate U.S. civilian unemployment rate (%). Quantitative 1 missing. Range 3.4–14.8 (14.8 ≈ COVID-2020 shock).
real_gdp Real GDP (likely billions of chained 2017 dollars, quarterly). Quantitative 208 missing — GDP is quarterly, so only ~1/3 of months have a value; other months are blank. Rang
treasury_10y 10-year U.S. Treasury constant-maturity yield (%). Quantitative 1 missing. Range 0.55–6.68.
breakeven_inflation 10-year breakeven inflation rate (%), a market-implied inflation expectation. Quantitative 37 missing. Range 0.11–2.88.

Parsing assumptions

  • Dates are ISO YYYY-MM-DD strings and are parsed with d3.timeParse.
  • All numeric columns are strictly numeric; empty cells are read as null and coerced to NaN on parse. No thousands separators or currency symbols appear in the raw values.
  • The CSV header is the first record and is a single clean line here. It is still parsed with d3.csv() (a real CSV parser) so quoted/embedded-newline headers would be handled correctly if present.
  • Columns with high missingness (sp500, real_gdp) are not interpolated; missing points are simply skipped when drawing lines.

Visualization Mappings

Chart type: Dual-axis time-series line chart.

Why this choice: date is the natural temporal axis and most other columns are quantitative measurements sampled over time, so a time-series is the correct idiom. Fed funds rate and unemployment rate are the two columns that are complete (no meaningful gaps) and have the clearest coupled story: the Fed raises rates when unemployment is low, and cuts when it rises. Showing them together on twin y-axes reveals that policy cycle directly.

Encodings:

  • x → date (temporal), linear time scale.
  • y (left) → fed_funds_rate (quantitative, %), blue line.
  • y (right) → unemployment_rate (quantitative, %), orange line.
  • Axis titles are color-matched to their line so the dual encoding is legible.

Interactions:

  • Hover: a vertical crosshair follows the nearest month and a tooltip shows the date plus both series values, letting the reader inspect exact turning points (e.g. the 2001, 2008, and 2020 unemployment spikes).
  • The chart resizes responsively with its container via a ResizeObserver hook.

Deliberately omitted: no summary cards, no raw data table, no preview, and no auxiliary panels — the deliverable is a single focused visualization.

Visualization Ideas

The ideas below are framed for the project brief: a macroeconomic research dashboard for analysts who need to interrogate how U.S. monetary policy, inflation, labor, growth, and markets co-move over the 2000–2026 window. Each idea names the exact columns it uses and how it would be rendered in the existing React + D3 (TimeSeriesChart.jsx, App.jsx, useContainerDimensions.js) architecture. All data is loaded at runtime from /data/fred_macro.csv via d3.csv(); no values are hardcoded.

  1. Policy Cycle Phase Portrait (Fed Funds vs. Unemployment Lissajous)

    • Question: How does the Fed funds / unemployment pair trace out a hysteresis loop across each tightening-cutting cycle?
    • Fields: date, fed_funds_rate, unemployment_rate.
    • Encoding: Scatter-joined line in (unemployment_rate, fed_funds_rate) space, with date encoded as sequential color along the path and recession-era segments (2001, 2008–09, 2020) annotated.
    • Interaction: Hovering a point shows the month + both values; brushing a year range on a side sparkline highlights that loop.
    • Implementation: Add a sibling <CyclePortrait/> that reuses the same parsed array from App.jsx; use d3.scaleSequential(d3.interpolateTurbo) mapped over +d.date.
  2. Recession-Shaded Policy Timeline

    • Question: Which tightening/cutting episodes sit inside recognized contractions?
    • Fields: date, fed_funds_rate, unemployment_rate.
    • Encoding: Existing dual-axis line chart plus shaded vertical bands for 2001, 2007–09, and 2020 computed from date ranges in code.
    • Interaction: Toggle a "shade recessions" checkbox in the legend row.
    • Implementation: In TimeSeriesChart.jsx, render <rect> bands inside the plot group using xScale(new Date('2007-12-01')) etc.; wire a showRecessions prop from App.jsx.
  3. CPI Inflation YoY Derived Series

    • Question: How did year-over-year CPI inflation evolve relative to the Fed funds rate?
    • Fields: date, cpi, fed_funds_rate.
    • Encoding: Dual line — (cpi_t / cpi_{t-12} - 1)*100 on the left axis and fed_funds_rate on the right, with the 2% target as a dashed rule.
    • Interaction: Hover tooltip showing the YoY rate and the Fed rate side-by-side so analysts can read the real-rate gap.
    • Implementation: Precompute a cpi_yoy field in the App.jsx parse step (do not alter the CSV); feed it to a new <InflationChart/>.
  4. Real Fed Funds Rate (Fisher Decomposition)

    • Question: Was policy actually restrictive once expected inflation is subtracted?
    • Fields: date, fed_funds_rate, breakeven_inflation.
    • Encoding: Area chart of fed_funds_rate − breakeven_inflation with the zero line emphasized; positive = restrictive, negative = accommodative.
    • Interaction: Hover crosshair reporting both inputs and the derived real rate.
    • Implementation: Reuse makeLine() pattern; compute the difference after .filter(d => d.breakeven_inflation != null).
  5. Yield Curve Slope vs. Breakeven Scatter

    • Question: When the 10-year yield is high relative to breakeven inflation, do unemployment spikes follow?
    • Fields: date, treasury_10y, breakeven_inflation, unemployment_rate.
    • Encoding: Scatter of (breakeven_inflation, treasury_10y) with point size = unemployment_rate and point color = decade.
    • Interaction: Voronoi hit regions (see the Renju scatter reference) so sparse points are easy to hover; tooltip shows the month.
    • Implementation: Build a <VoronoiScatter/> using d3.Delaunay.from for the nearest-point lookup, mirroring the reference’s hover behavior.
  6. Growth vs. Jobs Scatter (Okun-style)

    • Question: How do changes in real_gdp and unemployment_rate co-move quarter-over-quarter?
    • Fields: date, real_gdp, unemployment_rate.
    • Encoding: Scatter of Δ real_gdp (%, QoQ) against Δ unemployment_rate with a fitted OLS line and year labels on outliers.
    • Interaction: Brush-select points to highlight the matching months on a small timeline below.
    • Implementation: Filter to rows where real_gdp is non-null (quarterly points only) before computing deltas — do not interpolate.
  7. Breakeven Inflation Confidence Band

    • Question: How have market-implied inflation expectations and their volatility changed across regimes?
    • Fields: date, breakeven_inflation.
    • Encoding: 12-month rolling mean of breakeven_inflation as a center line, with a band from rolling min/max or ±1 rolling std as a shaded area.
    • Interaction: Hover reports the raw, mean, and band edges for that month.
    • Implementation: Skip null rows in the rollup; the line's .defined() predicate already handles the gaps.
  8. Small-Multiples of All Six Numeric Series

    • Question: Which indicators lead/lag the others across the full window?
    • Fields: date plus sp500, fed_funds_rate, cpi, unemployment_rate, treasury_10y, breakeven_inflation.
    • Encoding: A 3×2 grid of aligned sparkline panels sharing one scaleTime x-domain; each panel shows one series with its own y-scale.
    • Interaction: A shared vertical crosshair spans every panel and a single tooltip reports all values for that month.
    • Implementation: Factor the chart core out of TimeSeriesChart.jsx into a <SparkPanel/> and orchestrate layout in App.jsx.
  9. Rates-vs-Equities Spread Ribbon (SP500 vs. 10Y)

    • Question: Does the earnings-yield proxy (1/PE-like) move inversely with the 10-year yield during rate shocks?
    • Fields: date, sp500, treasury_10y.
    • Encoding: Two panels stacked: top = sp500 line, bottom = treasury_10y line, with a translucent ribbon connecting the two at each hovered month.
    • Interaction: Hovering the top panel scrubs the bottom panel to the same month.
    • Implementation: Both panels share the same x-scale; use an onMouseMove handler that updates a single hover state in the parent.
  10. Missingness / Coverage Heatmap

    • Question: Where are the gaps — which columns and years are actually populated?
    • Fields: date (years as rows) plus sp500, cpi, unemployment_rate, real_gdp, treasury_10y, breakeven_inflation, fed_funds_rate.
    • Encoding: Month × column grid, each cell colored present/absent; a toggle switches to a "value" mode using a diverging scale.
    • Interaction: Hover a cell to see the exact value or a "no release" tooltip.
    • Implementation: Derive presence with Number.isFinite(parseNum(d[col])) — same parser already in App.jsx.
  11. Regime Banding by Fed Cycle

    • Question: Can we compress 26 years into discrete "policy regimes" the reader can compare?
    • Fields: date, fed_funds_rate.
    • Encoding: A single horizontal timeline bar segmented by the rising vs. falling phases of fed_funds_rate, labeled with regime start/end months.
    • Interaction: Clicking a regime zooms the main line chart to that window (brush-style).
    • Implementation: Detect inflections with a simple local-extrema pass over fed_funds_rate inside a useMemo in App.jsx.
  12. CPI Level vs. Breakeven Diverge Chart

    • Question: When does realized inflation (index change) outrun what the market expected?
    • Fields: date, cpi, breakeven_inflation.
    • Encoding: Two lines normalized to a common starting index so their growth paths can be compared visually; a highlighted gap shade between them at select months.
    • Interaction: Hover shows raw cpi, cumulative growth %, and the current breakeven.
    • Implementation: Reuse the dual-axis shell but swap in an indexed transform d.cpi / firstCpi * 100.
  13. Unemployment vs. Fed Rate Hexbin

    • Question: Over the full window, where in (unemployment, Fed rate) space do months cluster most?
    • Fields: date, unemployment_rate, fed_funds_rate.
    • Encoding: 2-D hexbin of the two variables, with color = number of months in the bin, and top-5 identifiable clusters annotated.
    • Interaction: Hover a bin to see the month range it contains.
    • Implementation: Implement a lightweight hexbin or use d3.bin twice and draw rects; easier to ship than pulling a new lib.
  14. Peak-to-Trough Annotated Callouts

    • Question: What were the largest moves, and when exactly did they occur?
    • Fields: date, unemployment_rate, fed_funds_rate, sp500.
    • Encoding: Existing line chart augmented with leader-line callouts pointing to the 2001, 2008, and 2020 extremes for each series.
    • Interaction: Hovering a callout highlights the corresponding month with a vertical marker.
    • Implementation: Compute extremes with d3.max / d3.min keyed on date, and render <g> label groups with <line> leaders.
  15. Range Brush with Linked Key-Metric Cards

    • Question: If I focus on, say, 2008–2010, what were the headline numbers?
    • Fields: date, fed_funds_rate, unemployment_rate, cpi, treasury_10y.
    • Encoding: Overview line + brush; on selection, four small stat cards update with start/end/delta for each metric.
    • Interaction: Drag to brush, click a card to add its series to the main chart.
    • Implementation: Use a small <StatCard/> component; cards read from a memoized summary of the brushed subset.
  16. Month-of-Year Seasonality Strips (YoY Shocks)

    • Question: Are there recurring seasonal patterns in YoY changes of the labor and price series?
    • Fields: date, cpi, unemployment_rate.
    • Encoding: Strip plots — one row per calendar month — of the YoY change, with jittered points colored by year.
    • Interaction: Hover a point to reveal the full month and value.
    • Implementation: Compute YoY via lag-12 in App.jsx; render with a scalePoint for the month axis.
  17. SP500 vs. Breakeven Inflation Trajectory

    • Question: When equities fall, do inflation expectations fall with them or diverge?
    • Fields: date, sp500, breakeven_inflation.
    • Encoding: Small-multiple scatter of (sp500, breakeven_inflation) colored by year, joined by faint path segments to show trajectory direction over time.
    • Interaction: Hovering a point shows the date; clicking a year isolates that year's path.
    • Implementation: Load sp500 (sparse) and only plot rows where both fields are non-null; no interpolation.
  18. Residual Overlay: Real GDP vs. Trend

    • Question: How far above/below its pre-COVID trend did real GDP sit in each quarter?
    • Fields: date, real_gdp.
    • Encoding: real_gdp points with a fitted exponential trend line and a shaded "output gap" area between observed and trend.
    • Interaction: Hover reports the gap in levels and percent.
    • Implementation: Fit the trend with a simple log-linear regression in a useMemo; only plot months with non-null real_gdp.
  19. Policy Shock Waterfall: Move Size per Month

    • Question: Which individual months saw the largest Fed rate moves over the whole window?
    • Fields: date, fed_funds_rate.
    • Encoding: A signed bar chart (waterfall-style) of Δ fed_funds_rate per month, positive bars above, negative below, with the top-10 moves labeled by month/year.
    • Interaction: Click a bar to jump the main chart's crosshair to that month.
    • Implementation: Compute deltas from the sorted parsed array; use scaleLinear centered on zero for the y-axis.
  20. Synchronized Multi-Line "Cycle Lens" with Linked Voronoi

    • Question: At any given month, how do the six key series compare in z-score terms, so an analyst can see the whole macro state at once?
    • Fields: date plus sp500, fed_funds_rate, cpi, unemployment_rate, treasury_10y, breakeven_inflation.
    • Encoding: A small normalized line chart (each series z-scored across the full window) with a vertical band showing the current month, plus a linked radar or bar chart showing that month's z-values per indicator.
    • Interaction: Voronoi-overlaid hover in the main chart drives the month selection; the side panel updates live (inspired by the radar chart in the Renju reference).
    • Implementation: Build a new <CycleLens/> component; reuse the Voronoi hover pattern from the reference and compute z-scores in a useMemo over the full parsed array.

References

Comments

Sign in to join the discussion.