Last active
November 22, 2020 19:13
-
-
Save joseberlines/ee3d00d9143ea62aab69d502ae4704a7 to your computer and use it in GitHub Desktop.
adding names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
railnet= '''{ | |
"nodes": [ | |
{"data": { "id": "BER", "label":"HBf BER"}}, | |
{"data": { "id": "MUN", "label":"HBf MUN"}}, | |
{"data": { "id": "FRA", "label":"HBf FRA"}}, | |
{"data": { "id": "HAM", "label":"HBf HAM"}} | |
], | |
"edges": [ | |
{"data": { "source": "BER", "target": "MUN" }}, | |
{"data": { "source": "MUN", "target": "FRA" }}, | |
{"data": { "source": "FRA", "target": "BER" }}, | |
{"data": { "source": "BER", "target": "HAM" }} | |
] | |
}''' | |
railnetJSON = json.loads(railnet) | |
ipycytoscape_obj4 = ipycytoscape.CytoscapeWidget() | |
ipycytoscape_obj4.graph.add_graph_from_json(railnetJSON, directed=False) | |
ipycytoscape_obj4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment