Initial commit: database schema, data source docs, chapter variable references

This commit is contained in:
dadams
2026-03-08 20:25:58 -07:00
commit 38cf181f40
7 changed files with 955 additions and 0 deletions

162
docs/chapter5-variables.md Normal file
View File

@@ -0,0 +1,162 @@
# Chapter 5 Variable Reference
## The Costs of Transition: Financial and Climate Liabilities of Orphaned Wells
---
## Research Questions
1. What are the estimated plugging and remediation costs, and how do they vary by state?
2. How large is the unfunded liability gap, and which states carry the greatest exposure?
3. How does IIJA/BIL funding compare to estimated need?
4. How do financial liabilities translate into political debates over who bears transition costs?
5. How does financial exposure connect to climate and equity concerns?
---
## Core Financial Variables
### Per-Well Cost Estimates
All cost estimates are in nominal USD. The Raimi et al. (2021) figures are the primary reference for this project.
| Estimate | Per Well (Low) | Per Well (Mid) | Per Well (High) | Source |
|---|---|---|---|---|
| EPA OLEM (2018) | $5,000 | $25,000 | $85,000 | Older; widely considered low |
| **Raimi et al. (2021)** | **$9,000** | **$76,000** | **$280,000** | **Primary reference** |
| Carbon Tracker (2020) | $20,000 | $82,000 | $300,000 | Investor/financial risk focus |
| IOGCC (2023) | $5,000 | $33,000 | $150,000 | State-reported; inconsistent method |
| PA DEP (2022) | $10,000 | $68,000 | $220,000 | Actual contract data; PA-specific |
Full citations in `docs/data-sources.md` and `plugging_cost_references` table.
### State Liability Variables
| Variable | DB Location | Description |
|---|---|---|
| `well_count_dow` | `state_liability` | USGS DOW well count per state |
| `est_liability_low_usd` | `state_liability` (generated) | `well_count × $9,000` |
| `est_liability_mid_usd` | `state_liability` (generated) | `well_count × $76,000` |
| `est_liability_high_usd` | `state_liability` (generated) | `well_count × $280,000` |
| `iija_phase1_formula_usd` | `state_liability` | Phase 1 formula grant allocation |
| `iija_phase2_perf_usd` | `state_liability` | Phase 2 performance grant (populate as awarded) |
| Unfunded mid | Calculated in view | `est_liability_mid_usd - iija_phase1_formula_usd` |
| `iija_covers_pct_mid` | `v_ch5_liability_summary` | IIJA Phase 1 as % of mid-range liability |
### National Totals (from `v_ch5_national_totals`)
| Metric | Value |
|---|---|
| Total documented wells | 117,672 |
| National liability (low) | ~$1.06 billion |
| National liability (mid) | ~$8.94 billion |
| National liability (high) | ~$32.95 billion |
| IIJA Phase 1 total | ~$310 million |
| IIJA Phase 1 coverage of mid estimate | **~3.47%** |
| Unfunded gap (mid) | ~$8.63 billion |
---
## Key Queries
### Full state liability table
```sql
SELECT * FROM v_ch5_liability_summary;
```
### National totals
```sql
SELECT * FROM v_ch5_national_totals;
```
### States where IIJA Phase 1 covers more than 5% of mid-range liability
```sql
SELECT state, state_name, well_count_dow,
iija_covers_pct_mid, unfunded_mid
FROM v_ch5_liability_summary
WHERE iija_covers_pct_mid > 5
ORDER BY iija_covers_pct_mid DESC;
```
### Liability per well (for cross-state comparison)
```sql
SELECT state, state_name, well_count_dow,
est_liability_mid_usd / well_count_dow AS mid_per_well_usd,
iija_phase1_formula_usd / well_count_dow AS iija_per_well_usd
FROM state_liability
ORDER BY well_count_dow DESC;
```
### Cost estimate sensitivity analysis
```sql
SELECT r.source_name, r.source_year,
r.cost_mid_usd AS per_well_mid,
117672 * r.cost_mid_usd AS national_mid_estimate
FROM plugging_cost_references r
ORDER BY r.cost_mid_usd;
```
### Combine governance framework with liability
```sql
SELECT sg.framework_type,
count(DISTINCT sg.state) AS states,
sum(sg.well_count_dow) AS total_wells,
sum(sl.est_liability_mid_usd) AS total_mid_liability,
sum(sl.iija_phase1_formula_usd) AS total_iija,
round(
sum(sl.iija_phase1_formula_usd)::numeric /
sum(sl.est_liability_mid_usd) * 100, 2
) AS iija_coverage_pct
FROM v_state_governance sg
JOIN state_liability sl ON sg.state = sl.state
WHERE sg.framework_type != 'Unclassified'
GROUP BY sg.framework_type
ORDER BY total_wells DESC;
```
---
## Analytical Strategy (Chapter 5)
### Section 1: The Scale of the Problem
- Table: state-level liability (low/mid/high) — `v_ch5_liability_summary`
- National headline: $8.94B mid-range vs. $310M funded = 3.47% coverage
- Sensitivity analysis: show how the number changes across the 5 cost references
- Note: DOW dataset is documented wells only. Undocumented wells could multiply national liability 310×
### Section 2: The IIJA and Its Limits
- Bar chart: IIJA Phase 1 allocation vs. estimated liability by state
- Key argument: even the largest recipients (OH, PA, OK, KY, WV, TX at $25M each) cover only 1.65.6% of their mid-range liability
- Discuss Phase 2 performance grants as the main mechanism — but competitive, not guaranteed
- Note the perverse incentive: states must document and begin plugging to qualify for Phase 2
### Section 3: Stranded Asset Framing
- Connect to `plugging_cost_references` — use Carbon Tracker framing for investor risk angle
- Argument: inadequate bonding requirements made this liability invisible until it became public
- `state_liability.bonding_required` and `bonding_adequacy` fields (to be populated from literature)
### Section 4: Who Bears the Cost?
- Cross-tab: `framework_type` (from Chapter 4) × funding coverage percentage
- Do engineering-frame states receive proportionally more or less IIJA funding?
- EJ angle: are high-density tracts in low-income communities concentrated in states with largest unfunded gaps?
### Section 5: Climate Liability
- Methane emissions from unplugged wells — reference EPA Greenhouse Gas Inventory
- Each orphaned well emits estimated 0.110 tonnes CO₂e/year (wide variance by well type and age)
- Can connect `well_type_normalized` to EPA emission factor ranges
- Spatial overlap: high-density tracts × Census tract air quality data (EJScreen API if available)
---
## Data Limitations for Chapter 5
1. **Liability estimates are for documented wells only.** The USGS DOW dataset is the most comprehensive national compilation but excludes millions of undocumented pre-regulatory wells (estimated 2M+ nationally per API). National liability could be 1020× higher.
2. **Raimi et al. cost estimates are national averages.** Per-well costs vary enormously: shallow, simple onshore wells may cost $5,000$15,000; deep, complex, or offshore wells can exceed $500,000. State-level averages mask this heterogeneity.
3. **IIJA Phase 1 allocations are approximate.** Exact per-state grant amounts should be verified against official OSMRE grant award letters before publication. The Phase 2 allocation process is ongoing; check OSMRE for updates.
4. **No bonding data yet.** The `state_liability.bonding_required` and `bonding_adequacy` fields are not yet populated. These are essential for the stranded asset argument and should be populated from IOGCC bonding reports or state regulatory research.
5. **Inflation not applied.** Raimi et al. (2021) costs are in approximately 2020 dollars. Post-2021 inflation (particularly construction and materials costs) has likely increased per-well costs substantially. Consider applying BLS PPI for construction to update estimates.
6. **Phase 2 grants not yet final.** As of March 2026, Phase 2 performance grant awards are ongoing. Query OSMRE for current state of awards before the manuscript goes to press.