Monthly Archives: October 2014

IDV in Python: Retrieve Data From Dynamic mpld3 plot in python

Mpld3 questions show up on Stack Overflow from time to time, too, and they can get really informative answers if they pull in the javascript experts. This one got a comprehensive answer that was perhaps too expert, and so this follow up was an opportunity to show off my interactive plot call-out plugin yet again.

Comments Off on IDV in Python: Retrieve Data From Dynamic mpld3 plot in python

Filed under software engineering

MCMC in Python: observed data for a sum of random variables in PyMC

I like answering PyMC questions on Stack Overflow, but sometimes I give an answer and end up the one with the question. Like what would you model as the sum of a Poisson and a Negative Binomial?

Comments Off on MCMC in Python: observed data for a sum of random variables in PyMC

Filed under statistics

SciPy2014 Plotting Contest

I helped judge a plotting contest for the Scientific Python conference last summer. Who won? I don’t know, and a short web searching binge didn’t find out. A lovely plot took 3rd place, and every entry is here (with sourcecode). Good stuff for seeing how different groups do different tricks, and for checking what still doesn’t work in mpld3.

Comments Off on SciPy2014 Plotting Contest

Filed under dataviz

Styling Excel with Pandas

I had a bunch of stylish tables to make once long ago, and I thought, “why don’t I do that automatically?” It would take longer the first time, but it would be faster in future iterations. Unfortunately, there never were any future iterations, but fortunately, it was more fun to research automatic generation of stylish tables than do what I needed to get done.

The seeds I planted have started to sprout a little bit, though, and the latest pandas now supports openpyxl2 which supports a lot of style. So here is a start on the stylish table writing feature.

Comments Off on Styling Excel with Pandas

Filed under software engineering

IHME Seminar: Environmental Indicators

On Oct 15, we had a seminar from Yale Professor Angel Hsu on her work developing indicators for country performance on environmental sustainability. I found it surprisingly positive, for example this score card for the United States that says almost everything is getting better or at least staying the same:


This seems to conflict with the EPA report that came out recently and reminded me to write this.


Comments Off on IHME Seminar: Environmental Indicators

Filed under global health

Talks in Python: Interactive Instruction with RISE

I had a chance to give a lecture on using Python/Pandas in scientific research this week, and it was __________ (fill this in after it happens…). Since I was talking about Python, I decided to make my talk in Python, too. I did this for a few classes in Winter and Summer quarters of 2013, but the technology has come a long way since then. For this time around, I used RISE aka the live_reveal extension, and I found it very promising, although _very_ “bleeding edge” (which is what happens when the cutting edge is too cutting).

To make it really work as a powerpoint killer, I think it needs a little more friendlyness on the slide layout side of things. I don’t need much, but I would like:
* a talk title slide that has title, name, and date;
* a full-screen image slide;
* a way to put slide titles in a consistent place;

Am I totally power-pointed in my desires? I should file some issues on github.

Other wishes, while it’s on my mind: would be helpful to start slideshow from highlighted cell, would be convenient if cell toolbar toggled automatically between slideshow to none when starting and stopping presentation display, make it all easy easy easy to use.

Comments Off on Talks in Python: Interactive Instruction with RISE

Filed under education

IPython Notebook Clipboard Extension

I was so excited when I got the image pasting to work in my IPython Notebook, (although now I can’t find any mention of it on Healthy Algorithms…) but then things changed and I didn’t keep up, and it stopped working for me for a while. But then I _needed_ it, and so I figured out how to make it work again:

* upgrade IPython to the latest development version from github –
* install the chrome_clipboard ipython notebook extension –
* make it work each time, by adding a line to `~/.ipython/profile_[name]/static/custom/custom.js`:

$([]).on('app_initialized.NotebookApp', function(){

So nice to have it back.

Comments Off on IPython Notebook Clipboard Extension

Filed under software engineering

World Bank Estimates the Cost of Contact Tracing in Ebola Response

I want to save a bookmark to this little table in a big report on the economic impacts of Ebola in West Africa: World Bank country offices in Nigeria and Senegal produced estimates of the cost of successfully tracing contacts when responding to imported cases. Expensive, but worth it!

contact tracing costs

Comments Off on World Bank Estimates the Cost of Contact Tracing in Ebola Response

Filed under global health

CVRS in 2010 Report

Perhaps more than I ever wanted to know about the state of the birth and death registration system in South Africa circa 2010:


Comments Off on CVRS in 2010 Report

Filed under global health, Uncategorized

Tools They Use

I’m always on the lookout for new tools that I should be using in my daily work. Here is a short write-up by #hackebola researcher Caitlin Rivers on the subject:

Comments Off on Tools They Use

Filed under global health