open-city / councilmatic

DEPRECATED, replaced by https://github.com/datamade/chi-councilmatic
16 stars 9 forks source link

Legislation not being geocoded properly #4

Closed derekeder closed 11 years ago

derekeder commented 11 years ago

All pieces of legislation seem to have the same geo-point.

fgregg commented 11 years ago

often incorrect geocoding, only use results we are confident about

derekeder commented 11 years ago

resolved by checking the 'formatted_address' from Google geocode result and throwing out anything that doesn't contain ADDRESS_SUFFIX. In our case, thats ', Chicago, IL'

if gc and gc['status'] == 'OK' and settings.LEGISLATION['ADDRESS_SUFFIX'] in gc['results'][0]['formatted_address']:
  # return result
else:
  # return nothing