how to export networkx graph to javascript?
-
27-10-2019 - |
문제
I have a networkx graph which contains nodes whose positions in the graph are real world latitude and longitudes which I want to use with google maps.
How do I export this graph using python for e.g. in JSON format?
해결책
There is more than one format. You can see some examples of how to write some of them with NetworkX at http://networkx.readthedocs.io/en/stable/reference/readwrite.json_graph.html
If you need something different, the Python code is pretty simple to modify.
제휴하지 않습니다 StackOverflow