webber-energy-group / HOwDI

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

update map output based on technologies chosen #5

Closed joshdr83 closed 2 years ago

joshdr83 commented 2 years ago

I think it might be good to update the map output to make it easier to see what technologies have been chosen.

  1. Can we make the lines between the nodes a different color based on if they are a) a pipeline, b) liquid truck, or c) compressed gas truck?
  2. Can we somehow change the shape of the nodes to show if they are a) a consumer of H2, b) a producer of H2, c) both?
  3. Can we change the color of the node to show if they are using a) electrolysis, b) SMR, c) SMR w/ CCS, d) not a producer?
  4. Add a legend for 1-3.

Thoughts?

joshdr83 commented 2 years ago

@bradenpecora can you update the get_relevent_data method in the create_graph.py to also include the production attribute? I need that in the clean_data dict so that I can plot the production type. Thanks.

bradenpecora commented 2 years ago

@joshdr83 Latest commit now has geoDataFrame column 'production' for each node that contains a tuple listing the production types.

bradenpecora commented 2 years ago

At the moment, I believe production 'islands' (that have production capacity but won't distribute) won't get plotted. It's an easy yet tedious fix that requires a few conditionals.

bradenpecora commented 2 years ago

I also didn't implement a distinction between SMR with or without CCS. Should be easy enough to implement once CCS is working well with the model.

joshdr83 commented 2 years ago

@bradenpecora -- I think something is still up with the production data as even if it is not an island its not showing up? It looks like Austin and El Paso have production facilities, are not islands, but still not showing up?

image image image
bradenpecora commented 2 years ago

I pulled your branch and it seems like everything is working as intended on my end? image image

The data are in the outputs JSON, which the create_plot.py effectively uses. Definitely no chance of a problem before that. Thus, I'm led to believe the issue is with Python (maybe version? I'm on 3.8)? The relevant code is below and I can't imagine what could cause an issue:

def get_relevant_prod_data(nodal_data):
      if nodal_data['production'] != {}:
          return tuple(nodal_data['production'].keys())
      else:
          return None
  prod_data = {node: get_relevant_prod_data(nodal_data) for node, nodal_data in data.items()}