Skip to content

Instantly share code, notes, and snippets.

YKCzoli /
Created January 25, 2016 22:50 — forked from celoyd/
#!/usr/bin/env python
# red.tif nir.tif output-ndvi.tif
# Calculate NDVI (see Wikipedia). Assumes atmospheric correction.
# (Although I use it without all the time for quick experiments.)
import numpy as np
from sys import argv
from osgeo import gdal, gdalconst
YKCzoli /
Last active August 29, 2015 14:07 — forked from dmccarey/

Giving context to open spending data

Historic satellite imagery and flood response

Yesterday the government of Mexico launched to open up government data across all ministries. We [built a mapping tool](blog post) for ministries to quickly build rich maps from data on the site. The tool also makes it to combine government data with other open datasets. This provides context and meaning to complex government data.

The first dataset that we mapped was all 2013 funds for disaster response and reconstruction. The map plots thousands of reconstruction projects across 45 natural disasters, including Hurricane Manual and Ingrid which affected two-thirds of Mexico, killing 192 people and causing $75 billion pesos in damage.

This is an incredibily rich and complex dataset. But this data alone is not particularly helpful. We need to better understand the context to understand why government invested funds the w