Navigation

Recent site activity

  • Home
    attachment from Kevin Dwyer
    edited by Kevin Dwyer
    attachment removed by Kevin Dwyer
  • View All

Home

Here you can find any of the US Mayors' "Main Street Stimulus" data that I've played with, and any code to generate it.  The code is a little rough, as I wrote it hastily in a couple of hours, mainly as an exercise to get familiar with lxml.  First impression: you really have to work hard to avoid encoding errors.  HTML sucks and it's mostly because the people who write it suck, and you'd expect that an HTML parser would deal with the suckiness.

If you want to recreate what I've done, run getmayorsdata.py and redirect the output to a file called "dicts."  Then run makemayorsdb.py and you'll have a normalized sqlite database of all of the mayoral projects.

If you've got sqlite installed, go ahead and load up the mayors-money database and query away!

I updated the mayors-money database and uploaded mayors-money-2.  It's a sqlite3 database and contains all of the latest entries from the January 17 update.

See:
Main Street Stimulus

Tech Liberation's Take

Č
ċ
ď
getmayorsdata.py
(2k)
Kevin Dwyer,
Feb 3, 2009, 5:51 AM
ċ
ď
makemayorsdb.py
(2k)
Kevin Dwyer,
Feb 3, 2009, 5:51 AM
ċ
ď
mayors-money
(2232k)
Kevin Dwyer,
Dec 13, 2008, 4:26 PM
ċ
ď
mayors-money-2
(2122k)
Kevin Dwyer,
Jan 23, 2009, 8:18 PM
Ĉ
ď
Kevin Dwyer,
Feb 4, 2009, 10:30 AM
Comments