Skip to content

Commit

Permalink
Merge pull request #374 from singularity-energy/greg/manual_tables
Browse files Browse the repository at this point in the history
Update Energy Source Codes and Utility Name Map
  • Loading branch information
grgmiller authored Jul 3, 2024
2 parents 214247d + 0d235bd commit 3c292af
Show file tree
Hide file tree
Showing 4 changed files with 1,104 additions and 19 deletions.
52 changes: 46 additions & 6 deletions notebooks/manual_data/manually_update_OTH_fuel_code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@
"metadata": {},
"outputs": [],
"source": [
"year = 2022\n",
"\n",
"# load the fuel content data\n",
"fuel_heat_content = load_data.load_pudl_table(\n",
" \"denorm_generation_fuel_combined_eia923\",\n",
" year,\n",
" \"out_eia923__generation_fuel_combined\",\n",
" year=2014,\n",
" end_year=2022,\n",
" columns=[\n",
" \"plant_id_eia\",\n",
" \"report_date\",\n",
Expand All @@ -45,6 +44,8 @@
")\n",
"fuel_heat_content = fuel_heat_content.replace([np.inf, -np.inf], np.nan)\n",
"fuel_heat_content = fuel_heat_content.dropna()\n",
"fuel_heat_content = fuel_heat_content[fuel_heat_content[\"fuel_consumed_mmbtu\"] != 0]\n",
"fuel_heat_content = fuel_heat_content[fuel_heat_content[\"fuel_mmbtu_per_unit\"] != 0]\n",
"fuel_heat_content"
]
},
Expand All @@ -65,7 +66,7 @@
" .mean()\n",
" .reset_index()\n",
")\n",
"plants_with_oth = plants_with_oth[plants_with_oth[\"fuel_consumed_mmbtu\"] != 0]\n",
"\n",
"plants_with_oth"
]
},
Expand Down Expand Up @@ -99,11 +100,50 @@
" fuel_heat_content.sort_values(by=\"fuel_mmbtu_per_unit\"),\n",
" x=\"energy_source_code\",\n",
" y=\"fuel_mmbtu_per_unit\",\n",
" title=f\"Range of heat contents for each fuel reported in {year}\",\n",
" title=f\"Range of heat contents for each fuel\",\n",
" width=1000,\n",
" height=600,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"plant_data = fuel_heat_content[\n",
" (fuel_heat_content[\"plant_id_eia\"] == 10426)\n",
" & (fuel_heat_content[\"energy_source_code\"] == \"OTH\")\n",
"]\n",
"plant_data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"px.box(\n",
" plant_data,\n",
" x=\"energy_source_code\",\n",
" y=\"fuel_mmbtu_per_unit\",\n",
" title=f\"Range of heat contents for each fuel\",\n",
" width=1000,\n",
" height=600,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# 1745 = OBS\n",
"# 10208 = DFO"
]
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 3c292af

Please sign in to comment.