Searching astro:name with YQL, originally uploaded by Eat your greens!.
The YQL team announced personal URLs for queries this week. I’ve used the new feature to set up a shortcut for looking up photos of astronomical objects by name. The URL is:
http://queries.yahooapis.com/v1/public/yql/eatyourgreens/astrolookup?name=M+42
You can set the name
parameter in the URL to change the name of the object you are looking for. I’ve also set up a demo page to render results from this query. The URL is:
http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=Horsehead+nebula
Again, change the name
parameter in the URL to lookup different objects. Note that it looks for an exact match with the astro:name
machine tag, so looking up stars is cumbersome:
http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=the+star+deneb+(αcyg)
Update: it seems Flickr’s machine tag search can match just the first part of a tag, so you can search for stars by supplying the first part of the tag’s value.
http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=the+star+deneb
I’ve also made some changes to flickr.photos.astro
in order to enable faster searching by name. Use astro_name
in a query to find objects by matching on astro:name
:
select * from flickr.photos.astro where astro_name = 'M 31'
or use text
to run a Flickr text search across photo descriptions and titles:
select * from flickr.photos.astro where text = 'orion'
If you want to see what values have been used for astro:name
on Flickr, I recommend Paul Mison’s excellent machine tag browser.
awesome…