gridemissions icon indicating copy to clipboard operation
gridemissions copied to clipboard

Refactor `viz.d3map.create_graph`

Open jdechalendar opened this issue 1 year ago • 0 comments

Refactor viz.d3map.create_graph to the following signature. This would make it easier to re-use this function for more general purposes.

def create_graph2(
    size: ge.GraphData, color: ge.GraphData, field_size: str, field_color: str
) -> dict:
    """
    Parameters
    ----------
    size: ge.GraphData
    color: ge.GraphData
    field_size: str
    field_color: str
    Notes
    -----
    For links: we only consider the oriented connection with a positive flow and use
    the color of the source node for the link
    Dev
    ---
    create_graph2(co2, co2i, "D", "D") should produce the same result as what we had with create_graph
    """
    return {}

jdechalendar avatar Nov 14 '23 20:11 jdechalendar