Skip to content

Instantly share code, notes, and snippets.

@fgregg
Created June 12, 2013 17:32
Show Gist options
  • Save fgregg/5767405 to your computer and use it in GitHub Desktop.
Save fgregg/5767405 to your computer and use it in GitHub Desktop.
Getting images out of Chicago 311 API
import three
chi = three.city('chicago')
yesterday_graffiti = chi.requests(service_code='4fd3b167e750846744000005',
extensions='true',
page_size=500,
start='10-25-2012')
print len(yesterday_graffiti)
yesterday_images = [req for req in yesterday_graffiti if 'media_url' in req]
print yesterday_images
print len(yesterday_images)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment