Category Archives: dataviz

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

Filed under dataviz

IDV in Python: Interactive heatmap with Pandas and mpld3

I’ve been having a good time following the development of the mpld3 package, and I think it has a lot of potential for making interactive data visualization part of my regular workflow instead of that special something extra. A few weeks ago, an mpld3 user showed up with an interesting challenge, and solved their own problem quite well.

I finally got a chance to look at it today, and with a little spit-and-polish this could be something really useful for me.

ihm

Comments Off

Filed under dataviz, software engineering

Stylish tooltips in mpld3

I have added some stylish HTML tooltips to mpld3, make something pretty with them. Demonstration here.

Comments Off

Filed under dataviz, software engineering

Matplotlib and dj3s, together at last

There is an exciting new project in pythonic interactive data visualization that I have my eye on: mpld3. It plays well with matplotlib-based pretty plotting packages, and has the beginnings of a plugin framework for adding custom interactivity.

I used it to mock up a Cartesian fish eye distortion plot, something I’ve wanted for DisMod-MR ever since I learned about it. (Sometimes the interactivity doesn’t work in that notebook, and requires reloading everything… cutting edge software has some rough edges.)

1 Comment

Filed under dataviz, software engineering

Will I attend a MOOC?

The author of one of the best books on data visualization is giving a massively open online course (MOOC) this fall. I’m going to check it out. You may be interested, too.

http://www.thefunctionalart.com/2013/09/the-third-introduction-to-infographics.html

Comments Off

Filed under dataviz, education

GeoJSON for Norway Counties

This may come in handy: http://gangerolf.blogspot.com/2012/09/norway-in-geojson.html

I know I have seen a nice one for USA somewhere as well.

Comments Off

Filed under dataviz

Global Data Viz in translation

IHME has recently worked with the World Bank to release a series of regional reports on relevant findings from the Global Burden of Disease 2010 Study. It is cool to see this work getting disseminated, and now even in non-English editions. This raises questions for data visualization translations, like should 1990 and 2010 be in reversed positions when accompanying right-to-left text?

gh_dv_q

Comments Off

Filed under dataviz