So, I went through this morning and created GeoRSS output for MetaCarta search results. It seems likely that for the forseeable future, the way to get data in/out of Yahoo! Pipes is to build a URL-input, RSS output format. Since we already do KML, adding RSS took about 20 minutes — just changing some tag names, etc.
After doing that, I started playing with some pipes. After some missteps — dragging modules into the interface seemed to not work in a way that later did, presumably just part of the fun of dealing with these funky interfaces — I got something that I think is pretty cool coming out.
- Take NY Times input. Recent news is relevant and interesting.
- Pass the NY Times input through the content analyzer. This gets a set of relevant keywords.
- For each item, take the keywords and pass them through a subpipe…
- the subpipe goes to the MetaCarta search interface, and does a keyword search, taking the session information and bounding box from the text inputs for the pipe, returning 5 most relevant item.
- Add the 5 results to the item, and then send the output to the end of the pipe.
I’ve published the pipe, and after running it you can get the JSON output. (It seems that the sub-attributes are not available in the RSS output, at least as far as I can tell.)
Next steps:
- Create an OpenLayers interface, and use the current bounding box as the bounding box for the queries.
- Have the interface set the session and token variables: the pipe currently works with the defaults, but only for the next couple hours, since the tokens are time limited. (Currently, the MetaCarta Web Services are wide open, but eventually, they won’t be.)
The Query MC subpipe is probably useful for anyone who wants to do something like this: I’d recommend checking it out if you’re interested. Next step is to add RSS support to the other services, specifically the GeoTagger. I think that this would let me do what I want: take description text from an RSS item, tag it, and set the location attributes of the returned item.
I’m hoping that someone can answer how to use a callback on JSON output of pipes, since that would let me skip the need for a proxy, and make it entirely client side so that other people could run it on their own sites without a proxy.