# Coal and gas traded places in U.S. electricity generation

Prepared for Meplar from the September 2026 EIA publication, retrieved October 14, 2026.

## Files

- coal_vs_natural_gas_us_1990_2025.png: 1800 × 1800 chart, zero-based linear y-axis, all 36 annual observations, no smoothing.
- coal_gas_annual_1990_2025.csv: 36 rows with coal, natural gas, and total utility-scale generation, plus derived shares.
- all_sources_annual_1990_2025.csv: 468 rows, comprising 13 EIA series for each year. Includes a total series, which must not be added to the component series.
- source/mer_T07_02A_2026-10-14.csv: original unmodified EIA CSV snapshot.
- reproduce.py: standalone reproducible cleaning and rendering code.
- validation.json: calculated headline checks, date, and source SHA-256.

## Main results

In 1990 coal generated 1,594.011479 TWh and natural gas generated 372.765154 TWh: coal/gas = 4.2761815634, displayed as 4.3 to 1.
In 2025 natural gas generated 1,807.338288 TWh and coal generated 737.150711 TWh: gas/coal = 2.4517893845, displayed as 2.5 to 1.
2016 is the first year in this series window in which annual gas generation exceeded annual coal generation. EIA also independently identifies 2016 as the historical first annual crossover.

## Provenance

Source: U.S. Energy Information Administration, Monthly Energy Review, September 2026, Table 7.2a, Electricity Net Generation: Total (All Sectors).
Publication released September 29, 2026. Retrieved October 14, 2026.

- Publication: https://www.eia.gov/totalenergy/data/monthly/index.php
- CSV: https://www.eia.gov/totalenergy/data/browser/csv.php?tbl=T07.02A
- Interactive table: https://www.eia.gov/totalenergy/data/browser/?tbl=T07.02A
- Table with coverage footnotes: https://www.eia.gov/totalenergy/data/monthly/pdf/sec7_5.pdf
- Section methodology: https://www.eia.gov/totalenergy/data/monthly/pdf/sec7_n.pdf
- Independent annual-crossover check: https://www.eia.gov/TodayinEnergy/detail.php?id=31672
- Reuse policy: https://www.eia.gov/about/copyrights_reuse.php

Raw CSV SHA-256: da4cda2003baf701ace21354b70b0741236315238eb15481935c5a3746397189

## Cleaning and calculations

Select annual rows where YYYYMM ends in 13. Keep 1990–2025 inclusive. For the chart select CLETPUS (coal), NGETPUS (natural gas), and ELETPUS (total). Convert million kilowatthours to terawatt-hours by dividing by 1,000. Shares are source net generation divided by ELETPUS times 100. Store six decimal places; chart endpoints are rounded to whole TWh. Do not sum annual and monthly observations.

The chart covers absolute output, not capacity, consumption, or emissions. A TWh equals one billion kWh. All individual years are plotted at equal spacing, with straight line segments between annual observations.

## Scope and limitations

- Coverage is the 50 states and Washington, DC, all sectors, utility-scale facilities with combined generation nameplate capacity of at least 1 MW. It excludes small-scale facilities, including rooftop solar. The share denominator therefore also excludes small-scale solar.
- Net generation subtracts the electricity consumed at generating facilities from gross generation. It is not electricity delivered to end users.
- EIA expanded most series from electric utilities alone to include independent power producers, commercial plants, and industrial plants in 1989. Starting at 1990 avoids joining across that coverage break and provides a round-year starting point.
- The current table contains some 2026 monthly observations. They are deliberately excluded because 2026 is incomplete.
- EIA can revise historical observations. This package fixes one publication vintage rather than silently updating the chart.
- Natural gas includes a small amount of supplemental gaseous fuels. Coal includes the coal fuels specified in EIA's table notes.
- In the all-sources file, pumped storage may be negative because it reports generation minus energy used for pumping. ELETPUS includes additional sources not individually displayed in Table 7.2a. Listed components therefore need not sum exactly to ELETPUS. Historical category definitions also differ; consult table footnotes before unrelated analysis.
- The chart compares two fuels and makes no claim that one alone caused the other's change. It is not a complete chart of the electricity mix and does not measure lifecycle emissions.

## Reuse

EIA states that its U.S. government publications are public domain and that its data, files, and databases may be used and distributed, with source and publication-date acknowledgement. This package uses government data, not third-party licensed illustrations or the EIA logo. No new restrictive license is imposed on the underlying data. The public-domain designation applies to the underlying government data. No separate public license for the original chart presentation or code is asserted.

## Reproduce

Use Python 3.10+ with Pillow and DejaVu Sans regular and bold fonts. Run:

python reproduce.py

The script reads the bundled raw snapshot and writes to reproduced/. An optional first argument sets an output directory. On systems where the fonts are elsewhere, set DEJAVU_FONT_PREFIX to the path without .ttf or -Bold.ttf, for example /Library/Fonts/DejaVuSans. The code refuses an unexpected raw-source hash rather than quietly producing a chart with stale date or headline labels.


## Field reference and publisher verification
- year: calendar year of an annual source observation, excluding monthly rows.
- coal_twh / natural_gas_twh / total_utility_scale_twh: net generation in TWh.
- coal_share_pct / natural_gas_share_pct: the source divided by the utility-scale
  total, times 100, rounded to six decimals.
- eia_series_id / source_description / net_generation_twh: original series code
  and description with annual net generation converted to TWh. The total series
  overlaps components; do not sum every row. Negative pumped-storage values remain.
All 468 annual source values and all 36 chart rows match the bundled raw snapshot.
The 2016 crossover and both endpoint ratios reconcile. No interpolation, source
error corrections, duplicate removal or imputation were added. CSV and approved
chart bytes are unchanged. RELEASE-MANIFEST.json records actual package members.

Dataset page: https://meplar.com/datasets/us-coal-and-gas-electricity/
