webber-energy-group / HOwDI

https://howdi.readthedocs.io/en/develop/
GNU General Public License v3.0
0 stars 0 forks source link

distribution data missing values in create_plot.py #3

Closed joshdr83 closed 2 years ago

joshdr83 commented 2 years ago

It looks like, in the example given, that cities like Austin and Waco don't get points in the "distribution" geodataframe because of the line:

clean_data = {node: get_relevant_data(nodal_data) for node, nodal_data in data.items() if nodal_data['distribution']['outgoing'] != {}}

Which means they don't get plotted in the graph? Does that look right?

bradenpecora commented 2 years ago

Yes, that is correct since Austin and Waco don't have any 'outgoing' distribution data. I chose to plot only outgoing distribution without giving it much thought. Maybe incoming distribution is a better starting point for the plot?

I think, as a whole, the plotting needs a lot more developing. I think it would be cool/useful to distinguish nodes by producer/consumer and of what type (SMR, electrolyzer), and to distinguish distribution by direction (maybe add arrows to the arcs) and by type (truck, pipeline).

I also was pretty uncertain on how to store the distribution data. Maybe distribution should be stored in a file separate from the nodal data? Things are somewhat awkward presently since most, but not all, connections are duplicated in incoming and outgoing (the counterexamples being Austin and Waco in this case).

joshdr83 commented 2 years ago

Maybe we should just extract those locations that have a hydrogen demand? Would that work? #LookMomI'mAProCoderNow

bradenpecora commented 2 years ago

Fixed and pushed to main! That push may cause some "fun" on your next merge! #ThankfullyThereAren'tHashtagsOnGitHub

clean_data = {node: get_relevant_data(nodal_data) for node, nodal_data in data.items() if nodal_data['distribution'] != {"local": {},"outgoing": {},"incoming": {} }}

image