Monthly Archives: December 2014

Interactive Horizontal Bar Charts

Some notes on them here:


Comments Off on Interactive Horizontal Bar Charts

Filed under dataviz, software engineering

The challenges of counting gun deaths

This interesting article crossed my desk recently, A Year of Gun Deaths: What Slate learned from trying, and failing, to record every death by gun in America since Newtown. It is a long piece that touches on many of the things that make population health metrics hard.

It also drew my attention to an IOM report on Priorities for Research to Reduce the Threat of Firearm-Related Violence. Gun deaths are a public health problem.

Comments Off on The challenges of counting gun deaths

Filed under global health

PyMC3 with PyMC2

Did you know I have a fork of PyMC3 that you can run at the same time as PyMC2? I don’t keep it up to date, but people seem to want it every once in a while. Maybe this will help someone find it:

import pymc as pm2
import pymc3 as pm3

Good for head-to-head comparisons…

Comments Off on PyMC3 with PyMC2

Filed under software engineering

Old Maze Making Code

Playing around with that GIS optimization stuff was a chance for me to revisit some maze-making code I wrote a few years ago: I wonder what age kids it will be good for.

Comments Off on Old Maze Making Code

Filed under combinatorial optimization

Combinatorial Optimization for GIS

A real, applied problem in spatial epidemiology crossed my desk last week, and it turns out that it is a super-fun combinatorial optimization challenge, too.

Details here:

I don’t have time to play around with it a lot now, but I did try a little stochastic search, which makes me think that this will not be trivial to solve:


Comments Off on Combinatorial Optimization for GIS

Filed under TCS

Bayesian Correlation in PyMC

Here is a StackOverflow question with a nice figure:


Is there a nice, simple reference for just what exactly these graphical model figures mean? I want more of them.


Filed under statistics

Statistics in Python: Calculating R^2

I wanted to include some old-fashioned statistics in a paper recently, and did some websearching on how to calculate R^2 in Python. It’s all very touchy, it seems. Here’s what I found:

I eventually went with this:

%load_ext rmagic

x = np.array(1/df.J)
y = np.array(df.conc_rand)
%Rpush x y
%R print(summary(lm(y ~ x + 0)))

Comments Off on Statistics in Python: Calculating R^2

Filed under statistics

Introducing Smudge

I had an inspiration to make something a couple weeks ago for #MakeSomethingDay (the productive alternative to #BuyNothingDay). It is a finger-painting app that neighborhood kids have been enjoying.

sascha's beautiful picture

1 Comment

Filed under dataviz


I learned about a “big” data source for understanding air travel at the eScience incubator project talks last week, the DB1B database, aka the Airline Origin and Destination Survey. This is a 10% sample of all tickets for flights originating in the US, released quarterly since the 1993: This must be good for something in global health.

Comments Off on DB1B

Filed under general

IHME Seminar: Social Networks for Policy Change by Jessica Shearer

Speaking of cool IHME seminars, last month we heard one on a social network analysis of the health policy actors involved in national-level policy change. So cool:

Comments Off on IHME Seminar: Social Networks for Policy Change by Jessica Shearer

Filed under global health