Skip to main content
Public

Share visualization

Loading preview…

Data Analysis

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportHTML, source ZIP

Viewing a saved revision (read-only)

KmOd_MYrg3fMdhFjMVZ4j

Data Analysis

0 stars1Public
ZZach M
Last edited Nov 12, 2026
Created on Nov 12, 2026

Created from react-d3-starter template

EIA 6-Hour Electricity Generation, January 2026

An interactive visualization of hourly-interval (6-hour block) electricity generation by fuel type across 13 US regions for January 2026, built with React + D3.

Dataset

data/eia_generation_6hour.csv

  • Rows: 48,754 (header is the first CSV record and is parsed with a real CSV parser; cells may contain quoted content).
  • Size: ~4.0 MB
  • Subject: Reported net electricity generation (MWh) by US balancing region and fuel type, aggregated into 6-hour intervals during January
    1. Each row is one (region, fuel, interval) cell.
  • Grain: one row per region_code × fuel_code × period_start_local.

Columns

Column Type (Munzner) Meaning Notes
period_start_local Temporal (local wall-clock timestamp, 6h resolution) Start of the 6-hour reporting interval in the region's local time Values 2026-01-01T00:00 .. 2026-01-31T18:00 (cardinality 8 measured; actual distinct values span the month). Parsed as a string and sliced to YYYY-MM-DDTHH for display; grouped by day.
interval_hours Ordinal (constant 6) Nominal length of the interval in hours Constant, no variation.
month Ordinal (constant 2026-01) Reporting month Constant.
region_code Nominal (geographic identifier) Short code for the balancing region (e.g. CAL). 13 distinct codes.
region Nominal (geographic identifier) Human-readable region name (e.g. California). 13 distinct names; 1:1 with region_code (verified).
reference_timezone Nominal IANA timezone name used as the region's local reference (e.g. America/Los_Angeles). 4 distinct values.
fuel_code Nominal Short fuel code (e.g. NG, SUN). 16 distinct codes.
fuel Nominal Human-readable fuel name (e.g. Natural Gas). 16 distinct names; 1:1 with fuel_code (verified).
generation_mwh Quantitative (interval energy, Megawatt-hours) Net generation for the interval. Range ≈ −18,780 .. 296,468. Negative values are meaningful (pumped storage pumping, behind-the-meter solar, etc.) and are retained as such.
reported_hours Quantitative/Ordinal (1 or 6) Hours actually reported in the interval. Almost always 6.
expected_hours Ordinal (constant 6) Expected hours in the interval. Constant.

Missing values

None reported across any column at profile time.

Parsing assumptions

  • Header is read via d3's CSV parser (the first CSV record; safe for quoted embedded newlines).
  • generation_mwh is coerced with +, and NaN is filtered out defensively.
  • period_start_local is kept as a string, and the day key is produced by slicing the first 10 characters (YYYY-MM-DD). No timezone conversion is performed; "date" here means the local wall-clock date in each region's own reference timezone.

Caveats

  • Generation is reconciled by region and fuel. region/region_code and fuel/fuel_code are 1:1 pairs in this dataset, so either can be used as a grouping key; both are documented.
  • reference_timezone differs across regions, so aggregating period_start_local across regions interprets the timestamps as wall-clock labels, not as a shared instant.
  • Negative generation_mwh values must not be treated as missing; they represent real net metering/pump losses.

Relationships

Only one dataset is provided, so no cross-dataset joins are performed. Within the single dataset, the verified semantic joins are:

  • region_code ↔ region (1:1 identity pair).
  • fuel_code ↔ fuel (1:1 identity pair).

Both were validated by inspecting distinct value counts (13 ↔ 13, 16 ↔ 16) and checking that each code maps to a single name.

Visualization Mappings

Heatmap grid (SVG rect cells).

  • X encoding: period_start_local day (YYYY-MM-DD), sorted temporally. Temporal axis (position → time).
  • Y encoding: fuel (nominal), sorted by total generation_mwh descending so the highest-volume fuels sit at the top.
  • Cell value: sum of generation_mwh for the (fuel, day) group.
  • Color encoding: diverging color scale centered on 0 (RdBu); negative values shading blue, positive red. The scale domain is set from the symmetric max absolute value across all cells so both directions are readable. Cell tooltip shows the exact fuel, date, and summed MWh.
  • Interactions:
    • Hover a cell to highlight it (stroke) and show an HTML tooltip positioned at the cursor with the fuel, date, and total MWh.
    • Click a legend entry for a fuel to toggle its row on/off (focus filter) so crowded categories can be isolated.
  • Responsive: the SVG width/height is driven by a ResizeObserver on the container, so the heatmap reflows on resize.
  • Accessibility: each cell is a focusable element and carries an aria-label with fuel, date, and value; the visible title attribute duplicates that for non-hover users. A legend with color swatches is rendered beneath the chart with plain text labels.

Rationale

A heatmap with time on x and a nominal fuel category on y is the simplest faithful encoding of a (category × time) → total quantity table. It lets a reader scan for daily patterns in each fuel (solar diurnality, gas ramping, coal baseload, negative values for pumped/battery charging) without requiring a multi-series line chart that would be unreadable for 16 categories. A diverging scale is required because the quantity can be negative, and the centered zero point makes the sign visually salient.

Files

  • index.html — page shell and import map.
  • index.jsx — mounts <App />.
  • App.jsx — loads data/eia_generation_6hour.csv at runtime, groups rows into (fuel × day) cells, and renders the heatmap.
  • viz.js — D3 render entry point for the heatmap.
  • useContainerDimensions.js — ResizeObserver-based container size.
  • styles.css — page styles.
  • data/eia_generation_6hour.csv — source data (read-only).