Created
June 12, 2013 17:32
-
-
Save fgregg/5767405 to your computer and use it in GitHub Desktop.
Getting images out of Chicago 311 API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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