Providence Open Info

6 views
Skip to first unread message

Allan T.

unread,
May 23, 2009, 1:43:45 PM5/23/09
to Mashable City
Providence is slowly opening up their data, with feeds for public
notices and meetings on ProvidenceRI.com. I also noticed a new site
http://ProvidenceSunshine.com that contains tax adjustments which were
not previously published anywhere. The site has no feed or export
functionality, and no link by Plat/Lot to the property database, so it
makes for interesting mashup material as this could be piped pretty
easily into the tax assessors DB, Providence Plan, and Google Maps.

Peter Landry

unread,
May 27, 2009, 1:09:13 PM5/27/09
to Mashable City
As an excuse to start learning BeautifulSoup, I whipped together some
python to extract that data. Enjoy!

from BeautifulSoup import BeautifulSoup
import urllib2

page = urllib2.urlopen("http://providencesunshine.com/")
soup = BeautifulSoup(page)

# map cell index to a property name
cell_mapping = {0: 'date', 1: 'plat_lot', 2: 'taxpayer', 3: 'amount',
4: 'notes'}

# the data table has no id, so search based on attributes
table = soup.find('table', border='1', width="95%")

if not table:
raise Exception('The HTML structure appears to have changed. I can
\'t figure it out.')
else:
rows = []
# skip the first row with headers
for row in table.findAll('tr')[1:]:
cell_index = 0
this_row = {}
for cell in row.findAll('td'):
this_row[cell_mapping[cell_index]] = cell.find
('font').contents
cell_index += 1
rows.append(this_row)

print rows


On May 23, 1:43 pm, "Allan T." <akt...@gmail.com> wrote:
> Providence is slowly opening up their data, with feeds for public
> notices and meetings on ProvidenceRI.com. I also noticed a new sitehttp://ProvidenceSunshine.comthat contains tax adjustments which were

Allan Tear

unread,
May 31, 2009, 11:14:07 PM5/31/09
to Mashable City
Wow, Peter, cool ! We'll check it out.
> > notices and meetings on ProvidenceRI.com. I also noticed a new sitehttp://ProvidenceSunshine.comthatcontains tax adjustments which were
Reply all
Reply to author
Forward
0 new messages