This little program automates the export of CSV data from the Allegheny County Dog License Database from Western Pennsylvania Regional Data Center.
This data is made available in CSV format, but the export is only per year. This script gets all of the years and combines them in an sqlite3 database.
Feel free to help me make this work.
Public domain/CC0.
This was done as a part of National Day of Civic Hacking 2015 in Pittsburgh with OpenPGH.
I'm not planning to provide much of an interface on top of this data, so I'm collecting some queries I've found interesting here:
SELECT breed, count(*) AS tally, 100*1.0*count(*)/(SELECT count(*) FROM dogs) AS pct FROM dogs GROUP BY breed ORDER BY tally DESC
SELECT breed, ownerZip, count(*) AS tally FROM dogs GROUP BY breed, ownerZip ORDER BY ownerZip, tally DESC
SELECT ownerZip, count(*) AS tally FROM dogs GROUP BY ownerzip ORDER BY tally DESC
SELECT name, count(*) AS tally FROM dogs GROUP BY name ORDER BY tally DESC