Giter Club home page Giter Club logo

ipython-d3networkx's Introduction

ipython-d3networkx

An IPython notebook widget that uses D3.js and NetworkX to make really cool, interactive, force directed graphs.

Installation

In a terminal/commandline inside this directory, run

pip install .

For a development install, run

pip install -e .

Examples

Inside the examples directory you'll find some examples of how to use the widget.

  • demo simple.ipynb Start here for a demonstration of how the API can be used.
  • demo generators.ipynb This example uses built-in NetworkX generators to render some interesting graphs.
  • demo factor.ipynb This is a small example that factors a number between 0-100.
  • demo twitter.ipynb This example renders Twitter retweets in realtime.

ipython-d3networkx's People

Contributors

jdfreder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ipython-d3networkx's Issues

Add setup.py

Hello, thanks for a repo. Actually, I don't find anything for creating interactive network visualization, except yours repo.

Add a setup.py to installing with pip or easy_install

Request: Add ability for pan and zoom to core JS files

Since we are limited by iPython in the overall canvas size, incorporating the D3 Pan and Zoom features would be awesome for making use of the limited space. It would allow us to move things around and get a full feel for how things work.

Great work by the way, being able to go from a python data structure directly to a graph, is awesome.

Too many nodes!

I'm trying to plot a simple graph with a node and a child. Sometimes it renders 3 nodes (2 of them connected). Other times it renders nothing. What am I doing wrong?

eg2 = EventfulGraph()
d32 = ForceDirectedGraph(eg2)

d32.width = 300
d32.height = 300

edges = set()
for name, rid, pid in [('root', 1, None),
                       ('c1', 2, 1)]:
    eg2.add_node(rid, label=name, 
                 fill='red', 
                 stroke="black", color='black',
                 font_size='8px', r=5)
    if pid: 
        edges = edges | {(rid, pid)}
for i1, i2 in edges:
    eg2.add_edge(int(i1), int(i2),
                 distance=50)
display(d32)

nbviewer integration

I don't remember the state of including Javascript rendered components on the nbviewer. Is that possible in general now? Is it possible with D3? We're thinking about converting all networkx examples to notebooks and I'm wondering if they could simply be rendered by nbviewer or if they need to be hosted for the graphics to work. Thanks!

Add labels to factor demo

Great job on the demos!

One improvement I think is doable before Thursday's talk: adding labels to the factorization demo.

I'm not sure what will work best, perhaps a combination of fixed labels for all nodes beyond a certain size, and on-hover ones for the tiny ones? Or offset labels if a digit only has very few prime factors?

Basically, play with ideas to help the audience understand what each node represents, and in this case it really needs to be a way of showing the numerical value.

thanks!

cc @ellisonbg

Rendering a simple graph?

Thanks for this great code! We have been discussing it over at wrobstory/vincent#96

How would one render a simple, static graph? Ideally something like:

    g = networkx.erdos_renyi(100,.1)
    render(g)

Unfortunately, even using the "demo simple" notebook it appears I can't
even do:

    g = networkx.erdos_renyi(100,.1)
    G = EventfulGraph(g)
    d3 = ForceDirectedGraphWidget(G)
    floating_container.children = [d3]
    display(floating_container)

I understand I could do:

    G = EventfulGraph()

and build the network I want from there "manually", but that's painful and sometimes impractical.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.