Using Location Data: 2 Minute Yahoo Pipes Video Demo

Yahoo Pipes can make it easier to work with location data (latitude / longitude) across multiple RSS feeds, even when the original feeds have different ways of specifying the location data. In this demo, I’ll show you how to use the Location Extracter module to normalize the data and then filter on lat / long data to get results only within a certain area.

More Details

  • The Demo Pipe. A copy of the Using Location Data: 2 Minute Yahoo Pipes Demo pipe click “View Source” to see the modules.
  • Fetch Feed. In this example, we will use a feed from Shizzow containing information about places and a feed from the USGS with earthquake data. Both store their lat / long data in different ways within the RSS Feed.
  • Location extractor. This module is atypical, since it takes no parameters and has no user configurable elements. It simply looks for lat / long data and saves what it finds as y:location.lat and y:location.lon.
  • Sort. Sort by date (descending) to make sure that the output from your various source feeds appears in sorted order.
  • Filter. We then filter the source feeds to include only the entries located in the western part of the United States (25 < latitude < 50 and -130 < longitude < -115).
  • Pipe Output. The final module in every Yahoo Pipe.

I’ve created many Yahoo Pipes, and most of them have been published on my Yahoo Pipes and RSS Hacks page where you can also learn more about my Yahoo Pipes Training courses.

Related Fast Wonder Blog posts

Blogging Elsewhere

Here is this week’s summary of links to my posts appearing on other blogs:

GigaOM’s WebWorkerDaily

Ignite Portland

Shizzow

If you want a feed of all of my blog posts across multiple sites, you can also subscribe to my über feed.

YQL (Yahoo Query Language): 2 Minute Yahoo Pipes Video Demo

After learning that Yahoo Pipes introduced a new module called YQL (Yahoo Query Language) last week, I knew that I had to find a way to work it into one of my 2 minute videos. YQL uses an SQL-like syntax for more powerful and flexible inputs into Yahoo Pipes; however, working it into a 2 minute demo was quite challenging, since queries can be complicated. I cheated a little by glossing over the query language and focusing on how to use YQL effectively within Pipes. Honestly, I’m never going to teach someone to use an SQL syntax without extensive training, so this 2 minute demo is really geared toward people with database experience or programming backgrounds. I also did a more complicated version of this pipe with a more extensive explanation that you might be interested in reading to get more details about using YQL within Pipes.

More Details

  • The Demo Pipe. A copy of the YQL: 2 Minute Yahoo Pipes Demo pipe click “View Source” to see the modules.
  • YQL. The query:
    select * from flickr.photos.info(20) where photo_id in (select id from flickr.photos.search(20) where tags = “igniteportland”).
    Selects 20 photos from Flickr with the tag “igniteportland”. flickr.photos.search is used to find the images, but it doesn’t provide much information about the images, so I ran it through flickr.photos.info to pull in more data. If you omit the (20), YQL returns 10 results by default, and you can set this number to something appropriate for your needs.
  • Rename. Maps item.urls.url.content into the more standard item.link, which is recognized by RSS readers and the Yahoo Pipes output for clickable links back to the original content.
  • Pipe Output. The final module in every Yahoo Pipe.

I’ve created many Yahoo Pipes, and most of them have been published on my Yahoo Pipes and RSS Hacks page where you can also learn more about my Yahoo Pipes Training courses.

Related Fast Wonder Blog posts

Recent Links

I’m still figuring out how to deal with the Magnolia aftermath, but there were a few interesting things from this week that I wanted to share …

Small Businesses’ Online Plans – eMarketer

Tags: research, statistics, social media, blogging, report

Creating Your Organization’s Social Media Strategy Map

Tags: beth kanter, community, social media, strategy

American Workforce Shifts to More Part-time Jobs

Tags: freelance, gig economy, web worker, gigonomics

Highlights in Online Communities and Social Media – Online Community Report

Tags: forumone, online community, social, media, research, report, roi

Find Flickr Comments by Tag Using YQL in Yahoo Pipes

This week, Yahoo Pipes introduced a new module called YQL (Yahoo Query Language) allowing more powerful and flexible inputs into Yahoo Pipes using a SQL-like syntax.

The Flickr Comments by Tag pipe uses the new YQL module to look for any photos matching a certain tag that also have comments. In this pipe, I’m using the YQL module to pull some data out of Flickr that was not previously available in Flickr rss feeds or using the Flickr module in Yahoo Pipes. However, the data is available in the API and can be easily accessed via Yahoo Pipes using the new YQL module. I’ve also made the pipe configurable by prompting for user input, which allows other people to easily use the pipe whether or not they understand YQL.

Usage:

  1. Go to the Flickr Comments by Tag pipe.
  2. Enter a tag and click “run pipe”
  3. Grab the RSS feed output

The Technical Details on Using YQL in Yahoo Pipes

Caveat. The use of this module is better suited for developers, instead of casual users of Yahoo Pipes. If you’ve never done any command line database manipulation or programming, I suspect that there will be a steep learning curve associated with using the YQL module.

YQL Query. The query I’m using is a variation of the one below, but with the query built using the String Builder module, which includes a user input as part of the string. If you aren’t familiar with user inputs in Yahoo Pipes, you might want to watch the User Input: 2 Minute Yahoo Pipes Video Demo.

select * from flickr.photos.info(200) where photo_id in (select id from flickr.photos.search(200) where tags = “userinput”)

Basically, this query says that it is finding all photos where the tag matches the userinput string. By default, YQL returns only 10 items from a table, which is not sufficient for most uses within Yahoo Pipes, so I added a parameter to get 200 items. You need to change this parameter for each table you are using in the query. I also noticed that I was experiencing intermittent issues with pipe when I used a value over 200, so you will need to be careful when setting this parameter.

Filter. After the YQL module, I ran the output through a standard Filter module permitting only the items that matched: item.comments > 0.

Loop (feed modification). For those of you familiar with my Yahoo Pipes style, you know that I frequently use the loop module to modify the title of each item in the feed to include more information. In this case, I wanted to know the number of comments at a glance without having to click each item to get the numbers. This step is optional.

Rename. For some reason, the URL coming out of the flickr data is not automatically stored in item.link. The Yahoo Pipes output and RSS readers expect a feed to have the source url of the image stored in item.link, so you will need to manually rename item.urls.url.content to link using the Rename module. Without this step, you cannot click on any of the images to see the text of the comments.

Flickr Comments by Tag Using YQL in Yahoo Pipes

You’ll probably want to look at the source of the Flickr Comments by Tag pipe for more details.

The full YQL documentation is available on the Yahoo Developer Network. There also include several data sets available by default in YQL including Flickr, Upcoming, MyBlogLog, Yahoo Social, weather, geo / location, and more along with other standard data formats (JSON, RSS, XML, etc.)

Related Fast Wonder Blog posts

Online Community Manager: Yes, It's Really A Job (Slideshare)

Earlier this week, I did a blog post with this name on WebWorkerDaily talking about community management as a profession in preparation for my presentation at Oregon State University this afternoon.

The presentation covers several topics related to community management careers:

  • Defining Community
  • Community Manager Jobs (examples, job description and skills required, salaries)
  • Guiding Principles and Best Practices

Several people have asked for the slides, so here are the ones I’m bringing with me to the presentation. As always, I may take it in a different direction depending on the questions from the attendees, but at least this gives me something to deviate from.

Filter By Date: A 2 Minute Yahoo Pipes Demo

This 2 minute Yahoo Pipes demos shows how to filter by date using the filter module combined with the date builder module to find all of the posts in the past 2 days from our feeds. If you haven’t already watched the 2 Minute Yahoo Pipes Introductory Demo, I strongly suggest that you watch it. This demo builds on the basic structure developed in the introductory demo with the same feeds from ReadWriteWeb and GigaOM that we used in the original demo.

More Details

  • The Demo Pipe. A copy of the Filter By Date Pipe click “View Source” to see the modules.
  • Fetch Feed. Fetches the elements from 2 feeds: ReadWriteWeb and GigaOM.
  • Date Builder Module. Defines the date parameters for filters. In this case, I’ve filtered on ‘2 days ago’
  • Filter Module. Filter by blocking any item where date (item.y:published.utime) is greater than 2 days ago.
  • Sort Module. Sort by date in descending order to make sure things are sorted in a logical manner.
  • Pipe Output. The final module in every Yahoo Pipe.

I’ve created many Yahoo Pipes, and most of them have been published on my Yahoo Pipes and RSS Hacks page where you can also learn more about my Yahoo Pipes Training courses.

Related Fast Wonder Blog posts

Open source, Linux kernel research, online communities and other stuff I'm interested in posting.