ricnogfer/pypsatopo

Display only one link (for repeated-by-node links)

Closed this issue · 3 comments

When displaying pypsa-eur networks, many equivalent links (one per node) make the network difficult to read, could we add an option to represent only one of those repeated-by-node links?
See example:
test2

Thanks for the suggestion, @martavp.

I believe if you run something like python pypsatopo.py my_network.nc --focus "EU oil" --neighbourhood 1 --link-filter AT it will generate what you are looking/asking for. In this example, only links containing AT in their names will be displayed and visited to explore other buses (and given the way a PyPSA-Eur network is modelled/names its components, only the buses containing AT in their names will be visited/displayed).

If this solution works as expected, maybe we can close the issue.

thanks, I tried and it works nicely (there is a small typo, it should be --link_filter)

Good to know that it works well!

Depending on the interface, the link filter is specified through parameter link_filter when using PyPSATopo API or --link-filter when using PyPSATopo through a command-line interface. The reason why - (instead of _ like seen in the API) is because a parameter composed by two or more words is (traditionally) separated with this character in a command-line interface.