Visualizing Medicaid and Medicare Spending

Recently I learned about a cool data set that was released, containing a bunch of different aggregated statistics about the medicaid and medicare programs in the US. The data contains not only information about spending, but disease prevalence as well. This dataset is available for anyone to download here.

There are a ton of variables, with data for 5 different years for all 50 states and DC. I felt like an interactive visualization could be helpful for allowing people to explore this important data. I put something together using d3 to create a map based visualization, with angular to make it interactive. Because all the data is of a reasonable size (about 10MB when serialized), I was able to make this a fully static page. I also added the ability to bookmark analyses via query params, which allowed me to link a few interesting trends I noticed at the bottom of the page.

Here’s what the finished result looks like:

Hosted as a static site on S3 here:

One trip up is that is seems to fail on iOS safari, probably because the json blob with the data is of an unreasonable size. Would be cool to go back and figure out some way around that. I envision I could split the json up into smaller files and have them fetched more dynamically, kind of like a poor-man’s read only DB.