Closed rouille closed 1 month ago
Screen shot with new implementation
The calculation of the nameplate capacity was bugged and is fixed in the katest commit
Looks good, thanks. One small request would be to change the order of the columns so that we are grouping data together and make it easier to read. My suggestion for column order would be:
"plant_id_eia", #identification columns "plant_name_eia", "capacity_mw", # what type of plant is this "plant_primary_fuel", "fuel_category", "fuel_category_eia930", "state", # where is it located "county", "city", "ba_code", "ba_code_physical", "latitude", "longitude", "plant_operating_date", #operational status columns "plant_retirement_date", "distribution_flag", #other random metadata "timezone", "data_availability", "shaped_plant_id",
Done
Purpose
Add operating and retirement dates to plant static attributes.
A bug is fixed when calculating the nameplate capacity at the plant level
This PR also fixes an issue for years < 2013 where missing BA codes were being assigned, resulting in inaccurate BA-level results.
What the code is doing
Create a new function that adds the operating and retirement dates of a plant to the plant static attributes data frame. The operating date of a plant is taken as the earliest date among all generators' operating date over all report dates. Likewise, the retirement date of a plant is taken as the latest date among all generators' retirement date over all report dates.
Testing
Successfully ran the 2013 pipeline.
Where to look
add_plant_operating_and_retirement_dates
in theoge.helpers
module.oge.column_checks
module where the new fields were added. Note that I added some missing datetime to the list of columns defined in theapply_dtypes
function. These columns won't be converted.Usage Example/Visuals
Review estimate
10min
Future work
N/A
Checklist
black