posts tagged 'python'

political cartography: voting with our pocketbooks

These election maps are kinda late. Here I’m interested in comparing how we, as a country, voted with our ballots versus how we voted with our dollars. Obama received about 70% of the money donated to the major candidates in 2008, but only 53% of the votes, so I expected a bluer map. [...]

def CreateRubberSheetCartogram

Big ups to Eric Wolf, who recently released his Python script to generate continuous, “rubber sheet” cartograms. In this case, rather than the ever-so-popular Gastner-Newman diffusion-based method (2004), Wolf uses the Dougenik, Chrisman, and Niemeyer (1985) algorithm. Of the method, the authors initially wrote,

Cartograms are controversial in part because they are difficult to [...]

easy shapefile loading in python

My recent work on creating a more flexible circular cartogram algorithm meant that I needed (well, wanted) to load shapefiles into a Python application. After many searches and scouring of message boards, I settled on the OGR/GDAL libraries. And 3 hours later I had it installed on my MacBook…

I’m sure that OGR (vector) [...]