IDV in Python: adding text callouts to a scatter plot interactively with mpld3

I’ve been pretty interested in the potential of interactive data visualization recently, especially ever since I saw the reaction that the Global Burden of Disease 2010 visualization tool, GBD Compare, received last year. And one promising technology for making this stuff routine is mpld3, a mashup of the Python plotting library matplotlib and the javascript visualization kernel d3. Have I mentioned this before?

The thing about interactive data visualization is that its not always clear what is useful because it excites my reptile brain, and what is useful for more logical reasons. But I was asking a colleague to add some callouts to a (non-interactive) figure recently when I realized that this is a chance for interactivity to be _obviously_ useful. These finishing touches on a graphic often take me tons of time, and using a command-line plotting program just can’t be the right way to do it. How about an mpld3 plugin that lets me add text callouts interactively? And when I’m done, it can “save” the callouts, by creating the necessary Python script to generate them again? Here it is, in a notebook.

Comments Off on IDV in Python: adding text callouts to a scatter plot interactively with mpld3

Filed under dataviz

Comments are closed.