d3.js

Passing data from Django to D3

Passing data from Django to D3 Question: I’m trying to write a very basic bar graph using Django and D3.js. I have an object called play with a datetime field called date. What I want to do is show number of plays over time grouped by month. Basically I have two questions: How do I …

Total answers: 2

Print networkx DiGraph to Nested JSON format

Print networkx DiGraph to Nested JSON format Question: I have a networkx DiGraph. >> G = nx.DiGraph() >> G.add_edges_from(product([0],[1,2])) # product is itertools.product >> G.add_edges_from(product([1],[3,4])) The graph looks like this inside: >> G.adj {0: {1: {}, 2: {}}, 1: {3: {}, 4: {}}, 2: {}, 3: {}, 4: {}} I would like this to be …

Total answers: 2

How do I shut down a python simpleHTTPserver?

How do I shut down a python simpleHTTPserver? Question: So I’m trying to learn d3, and the wiki suggested that To view the examples locally, you must have a local web server. Any web server will work; for example you can run Python’s built-in server: python -m SimpleHTTPServer 8888 & Great… only now I have …

Total answers: 9

how to generate a graph/diagram like Google Analytics's Visitor Flow?

how to generate a graph/diagram like Google Analytics's Visitor Flow? Question: I am trying to generate a diagram similar to that presented by the recent Google Analytics “Visitor Flow”. These are also known as Alluvial diagrams. I can use a web or non-web based solution, as long as I can run it myself. The data …

Total answers: 2