Live data from Hacker News

NetworkX – Network Analysis in Python

networkx.org

31–40 of 65 posts

Re: NetworkX – Network Analysis in Python

#31
post #5

The "N" in HN stands for "news". Is there anything new about networkx to talk about?

yeah I will admit I was conflicted in posting this, but I see a few instances of posts like this, and it was very useful for a recent project. I was really fishing for alternatives though :)

Re: NetworkX – Network Analysis in Python

#32
I found the documentation for networkx much better than the one from igraph[1] (at least the Python version). However, for community detection algorithms graph-tool[2] is better (it also uses a different class of models than the standard in literature)

[1] https://igraph.org [2] https://graph-tool.skewed.de

Re: NetworkX – Network Analysis in Python

#33

Been a few years since I put NetworkX through its paces, but the several times I have tried it, found remarkably weak support for graph layout and display. NetworkX analytic routines may be strong, but attractively displaying graph-structured problems remarkably more interactive and attractive via d3.js, GraphViz, etc. At least for my problems, communicating graph structures, and having nodes and edges that represent…

> Been a few years since I put NetworkX through its paces, but the several times I have tried it, found remarkably weak support for graph layout and display. Well, yeah, it is pretty open that it is the wrong tool for that job. Here's what the NetworkX documentation [0] says about its visualization support: NetworkX provides basic functionality for visualizing graphs, but its main goal is to enable graph analysis rat…

Thanks for posting. I like using networkx for various tasks, and have been meaning to start exploring other visualization libraries.

Re: NetworkX – Network Analysis in Python

#34
post #27
post #4

Love it. Using it for load balancing of substation transformers. The grid is a graph.

I have tried to talk to engineers about contingency analyses for what would happen if a unit went down, and they tend to have very wishy washy answers. Or giant tediously compiled reports that can model exactly one change. Any idea why that is?

Not in the field, but don't forget the grid is dynamic and has feedback loops, control algorithms and humans in the loop.

It's closer to an unstable chaotic system which needs constant balancing and tweaking.

Re: NetworkX – Network Analysis in Python

#35

Been a few years since I put NetworkX through its paces, but the several times I have tried it, found remarkably weak support for graph layout and display. NetworkX analytic routines may be strong, but attractively displaying graph-structured problems remarkably more interactive and attractive via d3.js, GraphViz, etc. At least for my problems, communicating graph structures, and having nodes and edges that represent…

I recently found Cosmograph and have been using it for a project, it’s quite good for the specific things it does.

https://cosmograph.app/

Re: NetworkX – Network Analysis in Python

#36
post #27

Earlier quoted context omitted.

I have tried to talk to engineers about contingency analyses for what would happen if a unit went down, and they tend to have very wishy washy answers. Or giant tediously compiled reports that can model exactly one change. Any idea why that is?

Not in the field, but don't forget the grid is dynamic and has feedback loops, control algorithms and humans in the loop. It's closer to an unstable chaotic system which needs constant balancing and tweaking.

Is that true? Surely things regress to a stable mean most of the time of a few archetypes, no?

Re: NetworkX – Network Analysis in Python

#38
post #21
post #4

Love it. Using it for load balancing of substation transformers. The grid is a graph.

Interesting you should say that, as I am trying to start a project where I need to make an electric grid graph, but I am not sure where to find the node/edge data for substations and transmission lines that include their specs and capacities. Is that stuff open source somewhere, like with the ISOs, or do you need to build it from scratch?

That data is privately held by utilities, and the high voltage transmission infrastructure is highly confidential (CEII/NERC CIP). If you just need sample data, I'd recommend checking out the test data provided with power flow simulators like OpenDSS for distribution systems [1] or MATPOWER for generation + transmission [2]. The IEEE test systems are what are used in research, they have the component specs you're looking for, and are provided with those tools.

[1] https://sourceforge.net/projects/electricdss/ [2] https://matpower.org

Re: NetworkX – Network Analysis in Python

#39
post #27
post #4

Love it. Using it for load balancing of substation transformers. The grid is a graph.

I have tried to talk to engineers about contingency analyses for what would happen if a unit went down, and they tend to have very wishy washy answers. Or giant tediously compiled reports that can model exactly one change. Any idea why that is?

Good question. Are you talking about generation, transmission or distribution?

From my experience as an electrical engineer working for a distribution network:

* The traditional approach to network planning: take your edge cases (e.g. winter peak demand), and apply your engineering knowledge and intuition to manually study the most onerous outage conditions.

* This will vary on where you are in the world, but networks tend to have a good amount of slack built in.

* As networks become more complex, and the cost of computing has fallen, it's more feasible to automate contingency analysis (think about the number of different outage combinations for an N-2 scenario).

FWIW, the internal tools that I work on makes use of networkx to determine contingency cases.

Re: NetworkX – Network Analysis in Python

#40
I've used recently the networkx algorithm to find Hamiltonian cycles in a graph, in order to generate a Secret Santa with constraints (couples don't send gifts to each other, and people don't give to the same person as last year), it works great even though the problem is NP-complete, since my number of participants is very low.

I've tried the same in Rust with petgraph which resembles networkx, but it doesn't have the algorithm for Hamiltonian built in and I couldn't wrap my head around the DFS/BFS visitor pattern, but I'll continue this some day.

Post reply on HN