08 Feb 2010 12:24 pm

For day 6, we focused on two items:

I want everyone to keep reading Chapter 6.

Four exercises (due Wednesday, Feb 10 at 5pm)

  1. Do a Flickr flickr.photos.search query for any term that you like (let me know what it is).  Copy and paste the first photo element response and calculate the URL for the context page and the medium size photo.  Post your answer as a response to this post.
  2. Use the Sunlight Labs API to get the names of all of the members of Congress for any zip code outside of the Bay Area.  List the members (first name, last name, and bioguide id) of Congress for that zip.  Post this answer as a response to this post.
  3. If you don’t have a Unix account on the I School machines, go to the following url to sign up for one: http://www.ischool.berkeley.edu/arf/ You’ll be able to choose a username and password. You should list me (Raymond Yee) as the sponsor.
  4. Send me an email with URLs pointing to 1 and 2 and send me your userid for the I School account.

9 Responses to “s10-Day 06 Introduction to the Flickr API”

  1. on 09 Feb 2010 at 3:00 pm ddt

    1. Search term was “Specialized Shiv”

    First term in the XML response was:

    The URL for the context page is: http://www.flickr.com/photos/25843176@N02 /4059336620/

    The medium sized photo is: http://farm3.static.flickr.com/2743/4059336620_bd545ed4d3.jpg

    2. For the ZIP code 02139:
    http://services.sunlightlabs.com/api/legislators.allForZip.xml?apikey=e7be07492e7a47eab8e0987201cbdb61&zip=02139

    yielded:
    Michael E. Capuano: C001037
    Paul G. Kirk: K000374
    John Forbes Kerry: K000148

  2. on 09 Feb 2010 at 3:16 pm emily

    Shoot, I think I posted my answers in the wrong place. Let me try again…

    My Flickr photo search was for “kittens,” using the search request below:
    http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key={mysecretAPIkey!don’tlook!}&tags=kittens

    The first photo element that I got back from the Flickr Explorer was:

    The URL for the context page is:
    http://www.flickr.com/photos/22412994@N08/4342013580/

    The medium size photo page URL is:
    http://farm3.static.flickr.com/2742/4342013580_2b73f0382e.jpg

  3. on 09 Feb 2010 at 3:16 pm emily

    For the Sunlight Labs exercise, I searched for the legislators in my hometown:

    http://services.sunlightlabs.com/api/legislators.allForZip.xml?apikey={mysecretAPIkey!don’tlook!}&zip=46012

    They are:
    Richard Lugar, bioguide_id=L000504
    Mike Pence, bioguide_id=P000587
    Evan Bayh, bioguide_id=B001233

  4. on 09 Feb 2010 at 6:55 pm kimra

    For Flickr, I searched for “costarica.” My API call first pulled a photo that Flickr told me had recently been deleted when I tried to do the direct URL (http://www.flickr.com/photos/35269053@N00/4345240206). So, I ended up doing this one:

    http://www.flickr.com/photos/41432163@N00/4344499411
    http://farm5.static.flickr.com/4063/4344499411_d6566db0d5.jpg

    For Sunlight Labs, I pulled the representatives from my hometown (as of earlier this week . . .)

    Bill Shuster, bioguide_id= S001154
    Robert Casey, bioguide_id= C001070
    Arlen Specter, bioguide_id= S000709
    John Murtha, bioguide_id= M001120

  5. on 09 Feb 2010 at 10:15 pm amazingamazing

    1) created a search for “party”

    The context page is

    http://www.flickr.com/photos/74163325@N00/4341159999/

    The medium size photo is

    http://farm3.static.flickr.com/2772/4341159999_67219b2bb2.jpg

    2) zip code 95814 (i used to live here)
    Doris Matsui – M001163
    Barbara Boxer – B000711
    Diane Feinstein – F000062

  6. on 10 Feb 2010 at 12:16 pm Julian

    1. Query = “Gundam”

    The context page is,
    http://www.flickr.com/photos/39270009@N02/4345706239/

    The medium size photo is
    http://farm5.static.flickr.com/4009/4345706239_d6c0713a8c.jpg

    2. Zip = “91745″

    Gary G. Miller: M001139
    Diane Feinstein: F000062
    Barbara Boxer: B000711
    Grace Flores Napolitano: N000179

  7. on 10 Feb 2010 at 1:33 pm tanushree

    1. Tag searched for: “laughter”

    XML returned for the first image:

    Context page for the image:
    http://www.flickr.com/photos/43305795@N04/4346146457

    Medium sized image:
    http://farm3.static.flickr.com/2710/4346146457_8805e4e501_m.jpg

    2.
    API Call: http://services.sunlightlabs.com/api/legislators.allForZip.xml?apikey=949a33bafda7440495a74f7d5c22fe2f&zip=92101

    For the zip code 92101

    Susan A Davis Bioguide ID: D000598
    Barbara Boxer Bioguide ID: B000711
    Dianne Feinstein Bioguide ID: F000062

  8. on 10 Feb 2010 at 4:31 pm ra

    1)
    first photo element response:

    context:
    http://www.flickr.com/photos/86568343@N00/4347445916/

    medium image:
    http://farm3.static.flickr.com/2795/4347445916_766a5a06c3.jpg

    2)
    Christopher Lee, L000568
    Charles Schumer, S000148
    Kirsten Gillibrand, G000555
    Eric Massa, M001173

  9. on 23 Feb 2010 at 5:39 pm ayushk

    1. My search term was: “Cheese Board”

    The URL is: http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=49558a325ba45b1be2b906471622caa6&tags=Cheese+Board

    The URL for the context page is: http://www.flickr.com/photos/11954314@N04/4380341000

    The URL for the medium-sized photo is: http://farm5.static.flickr.com/4071/4380341000_f8c0c54cf0.jpg

    2. I wanted to see who represents Alpine, NJ – the richest neighborhood in the US. (07620)

    http://services.sunlightlabs.com/api/legislators.allForZip.xml?apikey=2a05bacddb4a456da41e00607b194865&zip=07620

    Results:

    Robert Menendez – M000639
    E. Scott Garett – G000548
    Frank R. Launtenberg – L000123

Trackback this Post | Feed on comments to this Post

Leave a Reply

You must be logged in to post a comment.