<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code: Flickr Developer Blog &#187; machinetags</title>
	<atom:link href="http://code.flickr.com/blog/tag/machinetags/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.flickr.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 19 Nov 2009 15:59:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Machine Tag Hierarchies</title>
		<link>http://code.flickr.com/blog/2008/12/15/machine-tag-hierarchies/</link>
		<comments>http://code.flickr.com/blog/2008/12/15/machine-tag-hierarchies/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 20:27:57 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[machinetags]]></category>
		<category><![CDATA[tagging]]></category>

		<guid isPermaLink="false">http://code.flickr.com/blog/?p=384</guid>
		<description><![CDATA[
something:somethingelse=somethingspecific
With apologies to Jeremy Keith

If you&#8217;re not already familiar with machine tags the easiest way to think of them is being like a plain old tag but with a special syntax that allows users to define additional structured data about that tag. If you&#8217;d like to know more, the best place to start is the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/straup/3084890631/" title="Untitled Compass #1228516024 by straup, on Flickr"><img src="http://farm4.static.flickr.com/3084/3084890631_7805a28af8.jpg" width="500" height="375" alt="Untitled Compass #1228516024" style="border:1px dotted #ccc; padding:5px;margin-top:20px;margin-bottom:20px;" /></a></p>
<h2>something:somethingelse=somethingspecific</h2>
<p style="font-size:small;font-style:italic;">With apologies to <a 	href="http://echoloquation.com/post/6939803/something-somethingelse-somethingspecific">Jeremy Keith</a></p>
<div>
<p>If you&#8217;re not already familiar with machine tags the easiest way to think of them is being like a plain old tag but with a special syntax that allows users to define additional structured data about that tag. If you&#8217;d like to know more, the best place to start is <a href="http://www.flickr.com/groups/api/discuss/72157594497877875">the official announcement we made about machine tags in the Flickr API group</a>.</p>
<p>If you want to know even more, still, take a look at:</p>
<ul style="margin-bottom:20px;margin-left:30px;line-height:20px;">
<li><a href="http://code.flickr.com/blog/2008/07/18/wildcard-machine-tag-urls/">Machine Tag Wildcard URLs</a></li>
<li><a href="http://code.flickr.com/blog/2008/08/28/machine-tags-lastfm-and-rocknroll/">Machine Tags, last.fm and Rock&#8217;n'Roll</a></li>
<li><a href="http://blech.vox.com/library/post/flickr-exif-machine-tags.html">Flickr, EXIF, Machine Tags</a>, by Paul Mison</li>
</ul></div>
<p>Okay! Now that everyone is feeling warm and fuzzy about machine tags: We&#8217;ve added (4) new <a href="http://www.flickr.com/services/api/">API methods</a> for browsing the hierarchies of machine tags added to photos on the site. These are aggregate rollups of all the unique namespaces, predicates, values and pairs for public photos with machine tags.</p>
<p>For example, lots of people have added <a href="http://flickr.com/photos/tags/exif:*="><q>exif:</q> related machine tags</a> to their photos but there hasn&#8217;t been a way to know what kind of EXIF data has been added: <a href="http://www.flickr.com/photos/tags/exif:model=">exif:model</a>? <a href="http://www.flickr.com/photos/tags/exif%3Afocal_length%3D/interesting/">exif:focal_length</a>? <a href="http://www.flickr.com/photos/straup/73884686/">exif:tunablaster</a>? Or what about all the <a href="http://flickr.com/photos/tags/planespotting/clusters/">planespotters</a> who have been diligently adding machine tags to their photos using the <a href="http://www.flickr.com/photos/tags/aero:*=">aero</a> namespace: What are the predicates that they&#8217;re tagging their photos with?</p>
<p>Those are the sorts of things these methods are designed to help you find. Sort of like <a href="http://code.flickr.com/blog/2008/07/18/wildcard-machine-tag-urls/">wildcard URLs</a> but for metadata instead of photos. Uh, sort of.</p>
<p><a href="http://www.flickr.com/photos/straup/2929080779/" title="Untitled Future #1223665161 by straup, on Flickr"><img src="http://farm4.static.flickr.com/3057/2929080779_caa36bffe8.jpg" width="500" height="375" alt="Untitled Future #1223665161" style="border:1px dotted #ccc; padding:5px;margin-top:20px;margin-bottom:20px;" /></a></p>
<p>Anyway, the new methods are:</p>
<h2>flickr.machinetags.getNamespaces</h2>
<p>This returns a list of all the unique namespaces, optionally bracketed by a specific predicate. For example, these are all the namespaces that have an <a href="http://www.flickr.com/photos/tags/*:airport=">airport</a> predicate:</p>
<pre style="margin-top:30px;margin-bottom:30px;">
# ?method=flickr.machinetags.getNamespaces&amp;predicate=airport

&lt;namespaces predicate=&quot;airport&quot; page=&quot;1&quot; total=&quot;2&quot; perpage=&quot;500&quot; pages=&quot;1&quot;&gt;
	&lt;namespace usage=&quot;1931&quot; predicates=&quot;1&quot;&gt;aero&lt;/namespace&gt;
	&lt;namespace usage=&quot;3&quot; predicates=&quot;1&quot;&gt;geo&lt;/namespace&gt;
&lt;/namespaces&gt;
		</pre>
<h2>flickr.machinetags.getPredicates</h2>
<p>		Like the <code>getNamespaces</code> method this returns a list of all the unique predicates, optionally bracketed by a specific namespace. For example, these are all the predicates that use the <a href="http://www.flickr.com/photos/tags/dopplr:*=/interesting">dopplr</a> namespace:</p>
<pre  style="margin-top:30px;margin-bottom:30px;">
# ?method=flickr.machinetags.getPredicates&amp;predicate=dopplr

&lt;predicates namespace=&quot;dopplr&quot; page=&quot;1&quot; total=&quot;4&quot; perpage=&quot;500&quot; pages=&quot;1&quot;&gt;
	&lt;predicate usage=&quot;4392&quot; namespaces=&quot;1&quot;&gt;tagged&lt;/predicate&gt;
	&lt;predicate usage=&quot;1&quot; namespaces=&quot;1&quot;&gt;traveller&lt;/predicate&gt;
	&lt;predicate usage=&quot;7780&quot; namespaces=&quot;1&quot;&gt;trip&lt;/predicate&gt;
	&lt;predicate usage=&quot;4269&quot; namespaces=&quot;1&quot;&gt;woeid&lt;/predicate&gt;
&lt;/predicates&gt;
		</pre>
<h2>flickr.machinetags.getValues</h2>
<p>At this point, the pattern should be pretty straightforward. This method returns all the unique values for a specific namespace/predicate pair. For example, these are some of the values associated with the <a href="">aero:tail</a> machine tag (yes, really, airplane tail models!):</p>
<pre  style="margin-top:15px;margin-bottom:30px;">
# ?method=flickr.machinetags.getValues&amp;namespace=aero&amp;predicate=tail

&lt;values namespace=&quot;aero&quot; predicate=&quot;tail&quot; page=&quot;1&quot; total=&quot;1159&quot;
	perpage=&quot;500&quot; pages=&quot;3&quot;&gt;
	&lt;value usage=&quot;1&quot;&gt;01-0041&lt;/value&gt;
	&lt;value usage=&quot;1&quot;&gt;164993&lt;/value&gt;
	&lt;value usage=&quot;2&quot;&gt;26000&lt;/value&gt;
	&lt;value usage=&quot;1&quot;&gt;4k-az01&lt;/value&gt;
	&lt;value usage=&quot;1&quot;&gt;4l-tgl&lt;/value&gt;
	&lt;value usage=&quot;1&quot;&gt;4r-ade&lt;/value&gt;
	&lt;!-- and so on... --&gt;
&lt;/values&gt;
		</pre>
<h2>flickr.machinetags.getPairs</h2>
<p>Finally, the getPairs method returns the list of unique namespace/predicate pairs optionally filtered by namespace or predicate.</p>
<p>Rather than including yet-another giant blob of XML, here&#8217;s <a href="http://flickr.com/photos/tags/ubahnmuenchen:station=">a pretty picture of the metro stations in Munich</a> instead:</p>
<p>		<a href="http://www.flickr.com/photos/straup/3103014649/" title="ubahn by straup, on Flickr"><img src="http://farm4.static.flickr.com/3015/3103014649_46e41e6e23.jpg" width="500" height="350" alt="ubahn" style="border:1px dotted #ccc; padding:5px;margin-top:20px;margin-bottom:20px;" /></a></p>
<h2>A few things to note</h2>
<p>Certain namespace/predicate pairs have been special-cased to return a single value. As of this writing they are:</p>
<ul  style="margin-bottom:20px;margin-left:30px;line-height:20px;">
<li>geo:lat (and variations)</li>
<li>geo:lon (and variations)</li>
<li>file:name</li>
<li>file:path</li>
<li><span style="font-style:italic;">anything</span>:md5</li>
</ul>
<p>If people have particular reasons for needing or wanting these we&#8217;re open to the idea but otherwise the cost of storing all the variations and the	dubious uses for returning them in the first place made us decide to exclude them.</p>
<h2>Now what?</h2>
<p><a href="http://www.flickr.com/photos/davemorris/2645255287/" title="Some people take sandcastles pretty seriously... by Daveybot, on Flickr"><img src="http://farm4.static.flickr.com/3113/2645255287_958e773039.jpg" width="500" height="281" alt="Some people take sandcastles pretty seriously..." style="border:1px dotted #ccc; padding:5px;margin-top:30px;" /></a></p>
<p style="font-size:small; font-style:italic;margin-bottom:30px;text-align:right;margin-right:30px;"><a href="http://www.flickr.com/photos/davemorris/">photo by Daveybot</a></p>
<p>Well, that&#8217;s what we&#8217;re hoping you&#8217;ll tell us. Machine tags have been chugging away quietly since we announced them almost two years ago and despite being a bit nerd-tastic and awkward to explain we&#8217;ve been thrilled to see how people have been finding their own use for them.</p>
<ul>
<li>
<p>It turns out we have <a href="http://flickr.com/photos/tags/lastfm:event=">photos for 31, 594 unique Last.FM events</a> all because people added <a href="http://code.flickr.com/blog/2008/08/28/machine-tags-lastfm-and-rocknroll/">lastfm:event</a> machine tags to their photos.</p>
</li>
<li>
<p>Researchers at Lewis &amp; Clark College, in Portland, have been &#8220;developing an educational <a href="http://journal.code4lib.org/articles/74">collection of contemporary ceramics images</a> using the photo sharing site Flickr&#8221; and machine tags.</p>
</li>
<li>
<p>Shortly after the launch of Google&#8217;s <a href="http://www.paulhagon.com/playground/flickr/streetview/">Street View</a> feature Mikel Maron &#8220;took GeoRSS feeds from Upcoming, grabbed lat/long and associated that with a panoid via the RESTful &#8216;api&#8217; and pulled down the images &#8230; and then <a href="http://brainoff.com/weblog/2007/06/03/1253">uploaded the panos to flickr with machine tags</a>&#8220;.</p>
</li>
<li>
<p>The <a href="http://www.utata.org/about.php">Utata Collective</a> uses a combination of groups on Flickr and <a href="http://www.utata.org/quickhelp/flickrtagformats.php">machine tags</a> to collect photos for their projects.</p>
</li>
</ul>
<p>And the list goes on.</p>
<p>The trick with machine tags has always been to make them both invisible (or at least barely visible) to those people who don&#8217;t care about them but also as easy as tags to pick up and use for those people who do or who wonder whether they might be the tool they were looking for. One thing we didn&#8217;t do very well, though, until the release of the machine tag hierarchy APIs was give people a way to <em>learn</em> about machine tags. The only way to find out which machine tags people were using was to hop-scotch your way around people&#8217;s photostreams or to be part of a larger community having a discussion about which tags to use. Oops.</p>
<p>Which is why it was extra-fantastic when a few short days after we <a href="http://tech.groups.yahoo.com/group/yws-flickr/message/4545">announced</a> the machine tag hierarchy methods on the API list, <a href="http://code.flickr.com/blog/2008/11/06/5-questions-for-paul-mison/">the ever prolific and awesome Paul Mison</a> wrote back and <a href="http://tech.groups.yahoo.com/group/yws-flickr/message/4547">said</a>:</p>
<blockquote style="font-family:sans-serif; color:darkslategrey;margin-top:30px;margin-bottom:30px;border-top:1px dotted #ccc;border-bottom:1px dotted #ccc;padding-top:20px;">
<p>The obvious thing to build on top of these &#8230; is	some sort of graphical machine tag browser, a bit like the Mac OS X /	iPod column view browser. So I did.</p>
<p>		<a href="http://husk.org/code/machine-tag-browser.html"><img src="http://farm4.static.flickr.com/3227/3103058127_aa7efc2671.jpg" width="500" height="385" alt="" style="border:1px dotted #ccc; padding:5px" /></a></p>
<p><a href="http://husk.org/code/machine-tag-browser.html">http://husk.org/code/machine-tag-browser.html</a></p>
<p>This is entirely self-contained in one file (except for loading jQuery from Google and (cough) the pulser from Flickr). It uses JavaScript to get a full list of namespaces, giving you the option to drill down into predicates and the values available for that namespace/predicate	pair.</p>
</blockquote>
<p>We&#8217;re hoping that this provides a little more raw material to play with and maybe find some magic and that you&#8217;ll tell us what comes next.</p>
<p>Yay!</p>
<h2>Oh yeah, the actual API methods</h2>
<ul  style="margin-top:20px;margin-bottom:20px;margin-left:30px;line-height:20px;">
<li><a href="http://www.flickr.com/services/api/flickr.machinetags.getNamespaces.html">flickr.machinetags.getNamespaces</a></li>
<li><a href="http://www.flickr.com/services/api/flickr.machinetags.getPredicates.html">flickr.machinetags.getPredicates</a></li>
<li><a href="http://www.flickr.com/services/api/flickr.machinetags.getValues.html">flickr.machinetags.getValues</a></li>
<li><a href="http://www.flickr.com/services/api/flickr.machinetags.getPairs.html">flickr.machinetags.getPairs</a></li>
</ul>
<p>Enjoy!</p>
<p style="font-size:small;font-style:italic;">In the coming weeks we&#8217;ll also try to gather most of the blog posts and other writings about machine tags and put them with the rest of the <a href="http://www.flickr.com/services/api">API documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.flickr.com/blog/2008/12/15/machine-tag-hierarchies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
