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

Recent Links on Ma.gnolia

A few interesting things this week …

Three PR Emailers That Didn’t Seem Very Human

Tags: , , ,

Body of Work: Community and Social Network Research

Tags: , , , , , , ,

A Collection of Social Network Stats for 2009

Tags: , , , , , ,

WebVisions 2009 gets BoingBoinged! Oh wait, that’s “Boing Boing Ed.” Mark Frauenfelder » Silicon Florist

Tags: , , ,

Strategic heading by G. Oliver Young

Tags: , , , , ,

50 Ways for Writers to Find Article Ideas – FreelanceSwitch – The Freelance Blog

Tags: , , ,

Jan. 28th in Corvallis: Community Management & Yahoo Pipes

I wanted to let people know that I will be in Corvallis, Oregon on Wednesday to present at 2 different events. I might also try to arrive earlier in the day, so let me know if you want to meet with me while I am in town.

Online Community Manager: Yes, It’s Really A Job
Wednesday January 28, 2009 from 4:00pm – 5:00pm
Kerney 112, Oregon State University, Corvallis, Oregon
More details on Upcoming

Online community managers are being hired in more and more companies and organizations. In this presentation, I will talk about how communities are managed and why companies need community management. I’ll also provide some specific job requirements and skills that community managers need in order to be successful.

Corvallis Beer and Blog with Yahoo Pipes

Wednesday January 28, 2009 from 5:00pm – 7:30pm
Cloud 9 Restaurant and Bar
126 Sw First Street, Corvallis, Oregon
More Details on Upcoming

I will be there to talk about Yahoo Pipes and other things related to online communities and social media. Mainly, it is an excuse to hang out at another successful Beer and Blog!

A big thank you to Lance Albertson and Tim Budd for coordinating all of this!

Communication Issues and Corporate Blogs

A couple of weeks ago, I blogged about Why Your Company Should Have a Blog. In the comments of that post, we had an interesting discussion about some of the communication issues that can result when you have employees blogging. I decided to elaborate a bit and turn it into a full post about how to minimize communication issues on corporate blogs.

Jason Mauer, Developer Evangelist at Microsoft, made this point in the comments:

One issue Microsoft has run into: as blogs turn into more of an official voice with announcements coming through blogs instead of customary PR channels (press releases, etc), people can’t tell the difference between when someone is talking as an official mouthpiece of the company, or when they’re just stating their own opinion. One recent example is the release of an open source CMS app called Oxite. The team that built it had good intentions, but when they released it the community interpreted it as some sort of best practices guidance from MS about how to do a MVC-style web app on .NET, which it definitely is not (at least at this point). (Quoted from Fast Wonder Blog Comments)

Managing communications can be easier when you have a single company blog with fewer authors. It can get very tricky when managing corporate communications for a company the size of Microsoft or Intel with many blogs and many people communicating with the outside world.

Many companies use their blogs as a way to make announcements and other official communications for the outside world. For your readers, it can be difficult to know whether a blog post is an official announcement or something less formal. In companies, like Microsoft, with bloggers spanning across many blogs, it can help to educate people to clearly state whether something is opinion or official statement. When I worked at Intel, my intel.com blog and this blog had disclaimers at the top of the sidebar making it clear that the posts were my opinions and not official statements. It can also help to educate bloggers about including clarification within the text of certain types of posts. For example, a short paragraph about why the team released the open source CMS app along with a note about how it wasn’t the best example of how to do a MVC-style web app on .NET might have diffused your issue. We get so wrapped up in our work that we don’t always take the time to think about how what we do will be perceived by people outside of the company, but it can help to give bloggers a little training with things to think about. Lightweight social media guidelines might also help in some situations.

I suspect that this is mainly an issue for larger companies or ones that tightly control communications. I’ve worked at several smaller companies where this issue never really came up at all. In other words, don’t sweat the communications issues unless you really think that it might be an issue at your company.

Summary: A few tips for managing communications

  • Include disclaimers in the sidebars for blogs that contain opinions and not official statements.
  • Clarify whether a blog post is an announcement or something less official if readers might be confused.
  • Train bloggers to think about how their posts might be perceived by those outside the company.
  • Put a very lightweight set of social media guidelines in place.
I’d love to hear more examples of communication issues that you have encountered or steps that have worked for you to avoid misunderstandings in blogs.

Pipes within Pipes: A 2 Minute Yahoo Pipes Video Demo

We’ve talked about many different uses for Yahoo Pipes in previous 2 minute Yahoo Pipes demos, but you can also use most existing Yahoo Pipes within other pipes. In this demo, we’ll use a couple of pipes I’ve previously created as the input into a new Yahoo Pipe, and we’ll introduce the union operator as a way to pull several inputs together.

More Details

  • The Demo Pipe. A copy of the Pipes within Pipes demo pipe click “View Source” to see the modules.
  • Union Module. Pull several inputs together into a single output.
  • Unique Module. Use this to prevent duplicate results when multiple search queries might return the same results by filtering on item.link.
  • 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

Blogging Elsewhere

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

GigaOM’s WebWorkerDaily

Shizzow

Portland Data Plumbing User Group (pdpug)

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

Recent Links on Ma.gnolia

A few interesting things this week …

How to: Build a Social Media Cheat Sheet for Any Topic – ReadWriteWeb

Tags: , , , , ,

49 Amazing Social Media, Web 2.0 And Internet Stats

Tags: , , ,

AboutUs completes Series A Funding; our plans for the future

Tags: , , , , ,

Shizzow for Android – Matthew Gifford

Tags: , ,

The Winnie the Pooh Guide to Blogging — Copyblogger

Tags: , , ,