posts tagged 'python'

just as easy, but with the added advantage of being correct

Cheers, folks. So, just 1.5 months ago I posted my own Python script to load shapefile data. Well, recently — while doing some pretty hardcore shapefile loading + cartogram generation — I realized I had a pretty significant error in my shapefile loading module.

This link (to my corrected shpUtils.py), corrects the mistake. [...]

i got better

I’ve talked about this before: Parts I & II.

The above shows the latest results of my circular cartogram algorithm. It’s just a few steps away from being complete, at which point I’ll post the Python code here. Here’s what I’ve done between the First and Latest attempts.

Better definition of “neighbors”.
I now loop through [...]

dorling.py

update: Here’s the dorling.py code, which is just a port of Danny Dorling’s C to Python. Remember, this only works with a particular topological input format (see county.in). I’ve done some more experiments with the circular cartogram algorithm: here, here, and most recently here.

Dr. Daniel Dorling was recently nice enough to provide me [...]