Python – D3.js integration

Python provides a pretty coomon framework for biological data analysis. And D3.js is one of the most coomon plateforms for the visualisation of large massifs of data. So I have been looking for a way to make them work together. This post gives a pretty decent introduction to the d3.js visualisation for people totally unfamiliar with javascript. It also suggests a possible interfacting of d3.js with pyhton via a javascript pseudo-library for that is to be wrtitten to the root folder containing the html page in JSON format.

An alternative approach is to is to send the JSON directly to a webpage javascript via the python build-in server, but this requires a little bit more work. In any case I will be looking more in depth at it shortly

Update1: I tried to follow the path suggested in the link, it didn’t quite work for me

Update2: And as usual, the problem was not with the tutorial but with chair-keyboard interface on the users side: I put d3.min.js library in a folder my server had no permission to go, so it didn’t  get loaded and the script didn’t get executed. Using instead the following snippet to import the d3.min.js library works perfectly fine:

<script src="" charset="utf-8"></script>r

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.