The GenX connector carries two independent classifiers over the same GenX resource names, and they disagree.
They differ on real inputs, not just spelling:
| Resource name contains |
classify_resource |
classify |
petroleum / oil |
natural_gas |
Other |
distributed_generation |
ignore (dropped) |
Solar |
combined_cycle / combustion_turbine |
unclassified |
Natural Gas |
_dr (demand response) |
unclassified |
DR |
Two consequences:
- The same case plotted by
plot_capacity and by plot_diurnal_generation attributes MW to different technologies.
- Because the key spaces differ,
plot_capacity.py:26 has to re-key the shared palette through a resource_labels translation table just to reach RESOURCE_COLORS. Any future resource-naming fix has to land in two places.
Deliberately left alone when #51 was integrated in #59: unifying them changes plot output, and which classification is the intended one is a domain call rather than a mechanical one. Worth a single classify() in palette.py (or a new resources.py) returning one key space, with both plotters consuming it.
cc @lauraahwa — you'd know which mapping is the intended one, particularly for petroleum and distributed generation.
The GenX connector carries two independent classifiers over the same GenX resource names, and they disagree.
GenX/tool_logic/plot_capacity.py—classify_resourcereturns snake_case keys (natural_gas,hydro,unclassified).GenX/tool_logic/diurnal_generation.py—classifyreturns title-case ones (Natural Gas,Hydro,Other).They differ on real inputs, not just spelling:
classify_resourceclassifypetroleum/oilnatural_gasOtherdistributed_generationignore(dropped)Solarcombined_cycle/combustion_turbineunclassifiedNatural Gas_dr(demand response)unclassifiedDRTwo consequences:
plot_capacityand byplot_diurnal_generationattributes MW to different technologies.plot_capacity.py:26has to re-key the shared palette through aresource_labelstranslation table just to reachRESOURCE_COLORS. Any future resource-naming fix has to land in two places.Deliberately left alone when #51 was integrated in #59: unifying them changes plot output, and which classification is the intended one is a domain call rather than a mechanical one. Worth a single
classify()inpalette.py(or a newresources.py) returning one key space, with both plotters consuming it.cc @lauraahwa — you'd know which mapping is the intended one, particularly for petroleum and distributed generation.