How to visualize a graph using d3.js in iPython notebook?

ericmjl

I have a graph that I would like to visualize using d3.js. Specifically, I have an adjacency matrix that looks as follows (selection of data, not the full set):

Node 1    Node 2    Weight
A         B         1.0
A         C         1.0
A         D         1.5
B         D         1.0
...

I would like to be able to use a Force-Directed Graph to display my network, specifically.

I know how to create a NetworkX graph, but I would like to be able to try this in d3.js, as I want to be able to add mouseover displays of node properties later on, which I think is possible using d3 but not possible using matplotlib.

I have tried using d3py, but I can't even get the basic example to work, and I read that the NetworkX example is broken and the repo hasn't been updated for a while. Does anybody else know if there's something else I could try, or if someone could point me in a first step direction?

Aric

There is a NetworkX example here that uses d3.js force layout :http://networkx.github.io/documentation/latest/examples/javascript/force.html

It just writes a JSON format graph object from networkx that d3.js can load in a web browser to get an interactive drawing. That code is a little fancier since it will also do the web browser part for you.

All of the code (including the d3 parts) you need to run it are in the repository https://github.com/networkx/networkx/tree/master/examples/javascript

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to display a graph in ipython notebook

From Dev

iPython/Jupyter Notebook: How to Embed Interactive Graph Using Desmos API?

From Dev

How to visualize mysql data in d3js using django?

From Dev

How to use tool tip in Line bar graph using D3 js

From Dev

How to use tool tip in Line bar graph using D3 js

From Dev

How to visualize an event timeline in D3?

From Dev

How to create a d3 force layout graph using React

From Dev

How to develop with ipython notebook

From Dev

How to autosave ipython notebook

From Dev

How to cache in IPython Notebook?

From Dev

How to include iPython notebook

From Dev

How to modify reveal.js slide settings in a ipython/jupyter notebook

From Dev

How can I reference libraries for ApacheSpark using IPython Notebook only?

From Dev

How to solve import error for pandas using iPython Notebook on Windows?

From Dev

How to keep the current figure when using ipython notebook with %matplotlib inline?

From Dev

How can I reference libraries for ApacheSpark using IPython Notebook only?

From Dev

Using IPython console along side IPython notebook

From Dev

Can not create a "notebook" using ipython Notebook

From Dev

Using pip to install iPython Notebook

From Dev

How to visualize multiple graphs with different input files in D3?

From Dev

How to write text in ipython notebook?

From Java

How to write LaTeX in IPython Notebook?

From Dev

How to Render Dygraph in iPython Notebook?

From Dev

How to embed data in an IPython Notebook?

From Dev

How to load a CSV into IPython notebook

From Dev

How to change font in ipython notebook

From Dev

How to load an existing ipython notebook?

From Dev

How to start IPython notebook remotely?

From Dev

How to reload image in ipython notebook?

Related Related

  1. 1

    How to display a graph in ipython notebook

  2. 2

    iPython/Jupyter Notebook: How to Embed Interactive Graph Using Desmos API?

  3. 3

    How to visualize mysql data in d3js using django?

  4. 4

    How to use tool tip in Line bar graph using D3 js

  5. 5

    How to use tool tip in Line bar graph using D3 js

  6. 6

    How to visualize an event timeline in D3?

  7. 7

    How to create a d3 force layout graph using React

  8. 8

    How to develop with ipython notebook

  9. 9

    How to autosave ipython notebook

  10. 10

    How to cache in IPython Notebook?

  11. 11

    How to include iPython notebook

  12. 12

    How to modify reveal.js slide settings in a ipython/jupyter notebook

  13. 13

    How can I reference libraries for ApacheSpark using IPython Notebook only?

  14. 14

    How to solve import error for pandas using iPython Notebook on Windows?

  15. 15

    How to keep the current figure when using ipython notebook with %matplotlib inline?

  16. 16

    How can I reference libraries for ApacheSpark using IPython Notebook only?

  17. 17

    Using IPython console along side IPython notebook

  18. 18

    Can not create a "notebook" using ipython Notebook

  19. 19

    Using pip to install iPython Notebook

  20. 20

    How to visualize multiple graphs with different input files in D3?

  21. 21

    How to write text in ipython notebook?

  22. 22

    How to write LaTeX in IPython Notebook?

  23. 23

    How to Render Dygraph in iPython Notebook?

  24. 24

    How to embed data in an IPython Notebook?

  25. 25

    How to load a CSV into IPython notebook

  26. 26

    How to change font in ipython notebook

  27. 27

    How to load an existing ipython notebook?

  28. 28

    How to start IPython notebook remotely?

  29. 29

    How to reload image in ipython notebook?

HotTag

Archive