<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Paul Hagon</title>
	
	<link>http://www.paulhagon.com</link>
	<description>Linking my thinking with computer technology</description>
	<lastBuildDate>Fri, 14 May 2010 04:30:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/paulhagon" /><feedburner:info uri="paulhagon" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Colours of a tag</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/XUtSd4rapUs/</link>
		<comments>http://www.paulhagon.com/blog/2010/05/14/colours-of-a-tag/#comments</comments>
		<pubDate>Fri, 14 May 2010 03:23:03 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Museums]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[flickr]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=363</guid>
		<description><![CDATA[I&#8217;ve been expanding upon the experiments I presented at VALA earlier this year where I built a search by colour application for the National Library of Australia. Out of curiosity I built the same search by colour application using approximately 35,000 images from Flickr Commons. Since building these applications I&#8217;ve been wondering, do certain topics [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been expanding upon the experiments I presented at VALA earlier this year where I built a search by colour application for the National Library of Australia. Out of curiosity I built the same <a href="http://www.paulhagon.com/commonscolour/">search by colour</a> application using approximately 35,000 images from Flickr Commons.</p>
<p>Since building these applications I&#8217;ve been wondering, do certain topics (or tags) also relate to a colour? Does a search for Paris return the colourful images your imagination expects? Are images tagged with red really red?</p>
<p>With a bit of help from the Flickr API, I&#8217;ve <a href="http://www.paulhagon.com/commonscolour/tags/">built an application</a> that queries the 50 most interesting Flickr Commons images for a particular tag, and displays the colours of these images. It also attempts to create a definitive colour for the tag by averaging the colours out.</p>
<p>As you explore the tags more &amp; more you tend to find that most tags return an average muddy brown colour. I suspect this is partly to do with many of the images being black &amp; white &amp; skewing the process.</p>
<p>It&#8217;s really interesting to explore a few different subjects and seeing what results appear.</p>
<h2>Formats</h2>
<p>Can we find an colour gamut for a format?</p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/cyanotype/"><img class="size-medium wp-image-367 alignnone" title="Cyanotype" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-cyanotype-20100514-441x499.png" alt="" width="441" height="499" /></a></p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/photochrom/"><img class="size-medium wp-image-370 alignnone" title="Photochrom" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-photochrom-20100514-433x500.png" alt="" width="433" height="500" /></a></p>
<h2>Cities and countries</h2>
<p>Do different cities or countries have different colours associated with them?</p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/paris/"><img class="size-medium wp-image-374 alignnone" title="Paris" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-paris-20100514-441x499.png" alt="" width="441" height="499" /></a></p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/newyork/"><img class="size-medium wp-image-373 alignnone" title="New York" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-newyork-20100514-433x500.png" alt="" width="433" height="500" /></a></p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/egypt/"><img class="size-medium wp-image-372  alignnone" title="Egypt" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-egypt-20100514-433x500.png" alt="" width="433" height="500" /></a></p>
<h2>Objects</h2>
<p>Do objects have particular colours associated with them? Take a bridge. Why do bridges exist? They exist to allow us to go over a river or a valley. With that logic we should expect photos tagged with bridge to have a reasonably large amount of green or blue in the image.</p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/bridge/"><img class="size-medium wp-image-376 alignnone" title="Bridge" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-bridge-20100514-412x499.png" alt="" width="412" height="499" /></a></p>
<p>Sure enough, we get quite a few images with green and blue in them.</p>
<h2>Colours</h2>
<p>Of course colours are a natural subject to test.</p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/blue/"><img class="alignnone size-medium wp-image-377" title="Blue" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-blue-20100514-433x500.png" alt="Blue" width="433" height="500" /></a></p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/green/"><img class="alignnone size-medium wp-image-378" title="Green" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-green-20100514-441x499.png" alt="Green" width="441" height="499" /></a></p>
<p><a href="http://www.paulhagon.com/commonscolour/red/"><img class="alignnone size-medium wp-image-379" title="Red" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-red-20100514-433x500.png" alt="Red" width="433" height="500" /></a></p>
<p><a href="http://www.paulhagon.com/commonscolour/tags/yellow/"><img class="alignnone size-medium wp-image-380" title="Yellow" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2010/05/Search-by-colour-yellow-20100514-433x500.png" alt="Yellow" width="433" height="500" /></a></p>
<h2>Have a go</h2>
<p>Feel free to explore the <a href="http://www.paulhagon.com/commonscolour/tags/">application</a> and find some interesting results. The URL is totally hackable if the tag you want to test isn&#8217;t part of the initial tag cloud.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/XUtSd4rapUs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2010/05/14/colours-of-a-tag/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2010/05/14/colours-of-a-tag/</feedburner:origLink></item>
		<item>
		<title>Gallipoli Twitter</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/plRjipKPu_Y/</link>
		<comments>http://www.paulhagon.com/blog/2010/04/23/gallipoli-twitter/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 02:56:08 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Museums]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=358</guid>
		<description><![CDATA[For the past few months I&#8217;ve been following a blog set up by the Australian War Memorial where they are recreating the diary of Herbert Vincent Reynolds by posting the entires from his diary on the days they were written. Herbert Vincent Reynolds enlisted in the First World War with the 4th Field Ambulance and [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few months I&#8217;ve been following a blog set up by the <a href="http://www.awm.gov.au/">Australian War Memorial</a> where they are recreating the <a href="http://www.awm.gov.au/blog/category/diary-of-an-anzac/">diary of Herbert Vincent Reynolds</a> by posting the entires from his diary on the days they were written. Herbert Vincent Reynolds enlisted in the First World War with the 4th Field Ambulance and went on to serve at Gallipoli.</p>
<p>One thing I&#8217;ve noticed about reading the blog posts is <a href="http://www.awm.gov.au/blog/2010/02/11/thursday-11th-february-1915-diary-of-hv-reynolds/">how</a> <a href="http://www.awm.gov.au/blog/2010/02/15/monday-15th-february-1915-diary-of-hv-reynolds/">similar</a> <a href="http://www.awm.gov.au/blog/2010/02/17/wednesday-17th-february-1915-diary-of-hv-reynolds/">they</a> <a href="http://www.awm.gov.au/blog/2010/02/22/monday-22nd-february-1915-diary-of-hv-reynolds/">are</a> <a href="http://www.awm.gov.au/blog/2010/03/12/friday-12th-march-1915-diary-of-hv-reynolds/">to</a> <a href="http://www.awm.gov.au/blog/2010/03/26/friday-26th-march-1915-dairy-of-hv-reynolds/">Twitter</a> <a href="http://www.awm.gov.au/blog/2010/04/20/tuesday-20th-april-1915-diary-of-hv-reynolds/">posts</a>. Many of the entries are very short and the manner in which they are written is typical of what you would find in a tweet. I went back through the diary entries to analyse their content and measure the number of characters in each entry. The average number of characters per diary entry between 2nd Feb 1915 and 21st April 1915 was 342 characters. The longest diary entry so far has been 4066 characters long, but many of the entries are less than 250 characters, and really are just short snippets of information about the events of the day. They aren&#8217;t beautifully written entries.</p>
<p>Reading through the diary I&#8217;m convinced that if Herbert Vincent Reynolds had access to Twitter back in 1915, he would have used it to post his diary entries. The similarities in the writing styles and structure in the methods of communication nearly a hundred years apart is uncanny. It&#8217;s also interesting to note that the Australian War Memorial is using their Twitter feed to promote the diaries.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/plRjipKPu_Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2010/04/23/gallipoli-twitter/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2010/04/23/gallipoli-twitter/</feedburner:origLink></item>
		<item>
		<title>Everything I know about cataloguing I learned from watching James Bond</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/low_vAeFNjA/</link>
		<comments>http://www.paulhagon.com/blog/2010/03/11/everything-i-know-about-cataloguing-i-learned-from-watching-james-bond/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 02:45:33 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Museums]]></category>
		<category><![CDATA[Presentation]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=351</guid>
		<description><![CDATA[At VALA2010 I did a presentation titled &#8216;Everything I know about cataloguing I learned from watching James Bond&#8217;. What I was trying to explore was the notion of how searching for objects is changing. We are now so used to full text search for books, journals and newspapers that the traditional forms of metadata, such at [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.vala.org.au/conf2010.htm">VALA2010</a> I did a presentation titled &#8216;Everything I know about cataloguing I learned from watching James Bond&#8217;. What I was trying to explore was the notion of how searching for objects is changing. We are now so used to full text search for books, journals and newspapers that the traditional forms of metadata, such at title, author and date have become secondary research items.</p>
<p>For other collection formats like images or audio recordings, this traditional metadata is still the main method of discovering items. What I wanted to look at was the concept of a full text search for images. To do this I carried out some experiments in facial recognition and colour analysis over the photographic collection of the National Library of Australia.</p>
<p>Here are the slides of my presentation and a link to the <a href="http://ll04.nla.gov.au">search by colour</a> application I developed as part of my research.</p>
<div id="__ss_3192287" style="width: 425px;"><strong><a title="Everything I know about cataloguing I learned from watching James Bond" href="http://www.slideshare.net/paulhagon/everything-i-know-about-cataloguing-i-learned-from-watching-james-bond">Everything I know about cataloguing I learned from watching James Bond</a></strong><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=vala-jamesbondstatic-100216021851-phpapp01&amp;rel=0&amp;stripped_title=everything-i-know-about-cataloguing-i-learned-from-watching-james-bond" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=vala-jamesbondstatic-100216021851-phpapp01&amp;rel=0&amp;stripped_title=everything-i-know-about-cataloguing-i-learned-from-watching-james-bond" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/paulhagon">Paul Hagon</a>.</div>
</div>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/low_vAeFNjA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2010/03/11/everything-i-know-about-cataloguing-i-learned-from-watching-james-bond/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2010/03/11/everything-i-know-about-cataloguing-i-learned-from-watching-james-bond/</feedburner:origLink></item>
		<item>
		<title>YQL mashups for libraries</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/p_WV_DeiixU/</link>
		<comments>http://www.paulhagon.com/blog/2009/12/09/yql-mashups-for-libraries/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 02:29:00 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Mashup]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=321</guid>
		<description><![CDATA[In October GovHack was held in Canberra. I went along as a participant, but also to advise any teams on the use of the National Library of Australia&#8217;s API&#8217;s. One of the things I spent my time doing there was to make some YQL Open Data Tables for some of the Library&#8217;s services. Why is this [...]]]></description>
			<content:encoded><![CDATA[<p>In October <a href="http://govhack.org/">GovHack</a> was held in Canberra. I went along as a participant, but also to advise any teams on the use of the National Library of Australia&#8217;s API&#8217;s. One of the things I spent my time doing there was to make some YQL Open Data Tables for some of the Library&#8217;s services. Why is this interesting? Let&#8217;s go back a few steps.</p>
<p><a href="http://developer.yahoo.com/yql/">YQL</a> is a service from Yahoo that provides a SQL like environment for querying, filtering and joining web services. So instead of having to write a complex URL to access data from a website, we can use YQL to write a statement that is similar to an SQL query that we might use to obtain data from a MySQL database, except, instead of querying a database, we are querying a web service. As an example, you can enter the following into the <a href="http://developer.yahoo.com/yql/console/">YQL console</a> to extract photos of the Sydney Harbour Bridge from Flickr:</p>
<pre><code>SELECT * FROM flickr.photos.search WHERE text="sydney harbour bridge";</code></pre>
<p>When YQL was launched it initially had options to query only Yahoo&#8217;s services. If you wanted to query a web service that was outside of Yahoo&#8217;s services you were out of luck. Since then Yahoo has allowed developers to build YQL Open Data Tables. An Open Data Table is an XML file that acts as a bridge between your API the YQL language and you describe how your API is structured in terms that YQL can understand.</p>
<p>If we wish to use an API to return data from one of the Library&#8217;s services, say Picture Australia, we can query it using the following URL:</p>
<pre><code>http://librariesaustralia.nla.gov.au/apps/kss?action=OpenSearch&amp;targetid=pictaust&amp;searchTerms=Sydney+Harbour+Bridge&amp;startPage=1
</code></pre>
<p>As you can see, it starts to become a fairly complex URL with a lot of querystring values to point towards where we need to extract the data from.</p>
<p>Now let&#8217;s create that same query using YQL. Firstly I created an <a href="http://www.paulhagon.com/yql/pictureaustralia.xml">Open Data Table for Picture Australia</a>. This is the key component that ties Picture Australia and YQL together. If you now enter the following into the <a href="http://developer.yahoo.com/yql/console/">YQL console</a> &amp; you&#8217;ll get back an XML feed from Picture Australia for the pictures of the Sydney Harbour Bridge.</p>
<pre><code>USE "http://www.paulhagon.com/yql/pictureaustralia.xml" AS pictureaustralia;
SELECT * FROM pictureaustralia WHERE searchTerms="sydney harbour bridge" AND startPage="1";
</code></pre>
<p>Alternatively you can query The National Library of Australia&#8217;s catalogue for pictures of the Sydney Harbour Bridge by using <a href="http://www.paulhagon.com/yql/nla.xml">this Open Data Table</a> and entering the following term into the YQL console:</p>
<pre><code>USE "http://www.paulhagon.com/yql/nla.xml" AS nla;
SELECT * FROM nla WHERE lookfor="sydney harbour bridge {format:Online AND format:Picture}";</code></pre>
<p>So how is this interesting? Can&#8217;t all of this information already be gathered from our standard API&#8217;s? There are a couple of advantages to using YQL. One advantage is being able to extract just portions of the data. Say you want to extract just the title, description and persistant URL of the records and you only want to return the first 3 items, you can just enter:</p>
<pre><code>USE "http://www.paulhagon.com/yql/pictureaustralia.xml" AS pictureaustralia;
SELECT title,description,link FROM pictureaustralia WHERE searchTerms="sydney harbour bridge" AND startPage="1" LIMIT 3;
</code></pre>
<p>or you could just extract a link to where the most relevant original item is stored.</p>
<pre><code>USE "http://www.paulhagon.com/yql/pictureaustralia.xml" AS pictureaustralia;
SELECT enclosure.url FROM pictureaustralia WHERE searchTerms="sydney harbour bridge" AND startPage="1" LIMIT 1;
</code></pre>
<p>This starts to give you a bit of flexibility in the fields and amount of data that is returned and limit the amount of parsing that you have to do. All the hard work is being done by the servers at Yahoo.</p>
<p>But the really fun stuff starts when you try to create a little mashup by combining data from different services. Let&#8217;s use YQL to find the current number 1 artist at Yahoo&#8217;s music service:</p>
<pre><code>SELECT name FROM music.artist.popular LIMIT 1;</code></pre>
<p>We can now easily combine this search with a search for the top 5 items from or about that artist in the National Library&#8217;s catalogue:</p>
<pre><code>USE "http://www.paulhagon.com/yql/nla.xml" AS nla;
SELECT * FROM nla WHERE lookfor IN (SELECT name FROM music.artist.popular LIMIT 1) LIMIT 5;</code></pre>
<p>Once we have constructed this query, we can access that using a JSON-P call and use a little bit of JavaScript to display the results within a web page (see <a href="http://www.paulhagon.com/example/yql/artist-books.php">example 1</a>).</p>
<pre><code>&lt;div id="nla"&gt;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
function nlabooks(o){
  var f = document.getElementById('nla');
  var out = '&lt;ul&gt;';
  var books = o.query.results.item;
  for(var i=0,j=books.length;i&lt;j;i++){
    var cur = books[i];
    out += '&lt;li&gt;&lt;a href="' + cur.link + '"&gt;'+ cur.title +'&lt;/a&gt;&lt;/li&gt;';
  }
  out += '&lt;/ul&gt;';
  f.innerHTML = out;
}
&lt;/script&gt;
&lt;script type="text/javascript" src="http://query.yahooapis.com/v1/public/yql?q=USE%20%22http%3A%2F%2Fwww.paulhagon.com%2Fyql%2Fnla.xml%22%20AS%20nla%3B%0ASELECT%20*%20FROM%20nla%20WHERE%20lookfor%20IN%20(SELECT%20name%20FROM%20music.artist.popular%20LIMIT%201)%20limit%205%3B&amp;format=json&amp;diagnostics=false&amp;callback=nlabooks"&gt;&lt;/script&gt;</code></pre>
<p>We&#8217;ve now got a little widget that we can use inside any page to dynamically mashup 2 separate data sources.</p>
<p>If we were to do that in a traditional manner we would have to be writing two separate calls to the web services and possibly parsing the results in different ways. By using YQL, all that hard work can be carried out in a minimal amount of code.</p>
<p>Building these tables was as much a case of learning a bit more about YQL and the possibilities that it can offer. What I&#8217;ve shown here is a simple demonstration at the ease with which you can use services like YQL to expand your data to a wider audience.</p>
<p><strong>Note</strong>: Please don&#8217;t build any mission critical applications using these data tables &#8211; they are only there for demonstration purposes. I&#8217;ll hopefully make them more permanent and hosted on the National Library&#8217;s servers.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/p_WV_DeiixU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2009/12/09/yql-mashups-for-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2009/12/09/yql-mashups-for-libraries/</feedburner:origLink></item>
		<item>
		<title>Immediate sharing</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/aL1VAE-kKgQ/</link>
		<comments>http://www.paulhagon.com/blog/2009/09/27/immediate-sharing/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 08:27:25 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[flickr]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=308</guid>
		<description><![CDATA[This week the east coast of Australia was blanketed in a dust storm. The worst day was on Wednesday the 23rd when Sydney was blanketed in errie red dust. The social networks were bombarded with people&#8217;s accounts of the events. I decided to do a little analysis of how quickly people reacted to the event [...]]]></description>
			<content:encoded><![CDATA[<p>This week the east coast of Australia was blanketed in a dust storm. The worst day was on Wednesday the 23rd when Sydney was blanketed in errie red dust. The social networks were bombarded with people&#8217;s accounts of the events.</p>
<p>I decided to do a little analysis of how quickly people reacted to the event &amp; how quickly they shared their experiences of the event. Using the Flickr API I exported all the photos that had been taken on the 23rd of September that had been tagged with Sydney and dust. I then looked at how long it took people to upload the photos. Out of these photos I removed those photos where the user wasn&#8217;t displaying the EXIF metadata and those where the camera time was obviously set incorrectly (where the time the photo was taken was later than the time it was uploaded).</p>
<p><img class="alignnone size-full wp-image-316" title="Time to upload days" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/09/Time-to-upload-days.png" alt="Time to upload days" width="355" height="274" /></p>
<p>The bulk of the photos were uploaded to Flickr within 24 hours of being taken, with very few photos being uploaded 2 or 3 days after being taken. It was an immediate action. I then looked in more detail at what happened with those photos that were uploaded within 24 hours of being taken.</p>
<p><img class="alignnone size-full wp-image-315" title="Time to upload hours" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/09/Time-to-upload-hours.png" alt="Time to upload hours" width="425" height="274" /></p>
<p>51% of photos were uploaded to Flickr within 4 hours of when they were taken. Given the time of day when the dust storms were happening, as people were going to work, there is also a small increase in the number of photos being uploaded 10-15 hours later, which corresponds time wise to people uploading images later that evening when they arrived home from work, quite possibly the first opportunity they would have had to upload their images.</p>
<p>I also did some analysis on those photos that were uploaded in the first 4 hours of being taken. Did this immediacy relate to the type of camera used?</p>
<p><img class="alignnone size-full wp-image-317" title="Camera type" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/09/Camera-type.png" alt="Camera type" width="413" height="304" /></p>
<p>24% of images didn&#8217;t have the model of camera recorded in their EXIF metadata. What was surprising was that only 6% of these rapidly uploaded images came from mobile devices like iPhone and Nokia mobile phone cameras. Over 50% of images came from digital SLR cameras while the remainder were mostly compact cameras.</p>
<p>This demonstrates a desire for us to be wanting to immediately share what is happening in our environment with a wider audience, but we aren&#8217;t sharing it using our mobile devices.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/aL1VAE-kKgQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2009/09/27/immediate-sharing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2009/09/27/immediate-sharing/</feedburner:origLink></item>
		<item>
		<title>Common Ground</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/bQ6zBbdjDgw/</link>
		<comments>http://www.paulhagon.com/blog/2009/09/23/common-ground/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 03:29:40 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Museums]]></category>
		<category><![CDATA[Presentation]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=304</guid>
		<description><![CDATA[I&#8217;m really excited to be playing a small part in the upcoming Common Ground meet up to be held on the 2nd-3rd October 2009. Common Ground is a global meet up celebrating the Commons on Flickr to be held by as many of the institutions in the Commons as possible. The institutions will be projecting [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m really excited to be playing a small part in the upcoming Common Ground meet up to be held on the 2nd-3rd October 2009. Common Ground is a global meet up celebrating the Commons on Flickr to be held by as many of the institutions in the Commons as possible. The institutions will be projecting images from the Commons onto their buildings at night. In keeping with the community based spirit of Flickr &amp; The Commons, the images have all been chosen by the public.</p>
<p>I&#8217;ve <a href="http://commonground.eastmanhouse.org/vote.php">cast my vote</a> on the images I would like to see and will head to Sydney to the <a href="http://www.powerhousemuseum.com/commonground/">Powerhouse Museum</a> to sit with friends and watch the slideshow. On the night I&#8217;ll be giving a brief presentation on some of the <a href="http://www.paulhagon.com/thenandnow/">work I&#8217;ve been doing</a> using The Commons.  On Sunday 4th October, I&#8217;ll be giving a presentation with Paula Bray at the <a href="http://www.powerhousemuseum.com/talks/">Powerhouse Museums Talks After Noon</a>, where I&#8217;ll talk about what Flickr Commons means to me, show some of the things I&#8217;ve done with it and most importantly discuss the power of the community.</p>
<p>Come along, it will be a great night.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/bQ6zBbdjDgw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2009/09/23/common-ground/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2009/09/23/common-ground/</feedburner:origLink></item>
		<item>
		<title>Using VLC for screen capture</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/9oWIdwv3INM/</link>
		<comments>http://www.paulhagon.com/apple/2009/07/27/using-vlc-for-screen-capture/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 01:24:56 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[recording]]></category>
		<category><![CDATA[screen capture]]></category>
		<category><![CDATA[VLC]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=285</guid>
		<description><![CDATA[I recently had to make a screen capture for embedding into a Keynote presentation. As this sort of thing isn&#8217;t something I do often I didn&#8217;t really want to pay money for a program to do it. Luckily, something totally unrelated happened and I found the solution. VLC, the open source media player was updated [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to make a screen capture for embedding into a Keynote presentation. As this sort of thing isn&#8217;t something I do often I didn&#8217;t really want to pay money for a program to do it. Luckily, something totally unrelated happened and I found the solution. <a href="http://www.videolan.org/vlc/">VLC</a>, the open source media player was updated to version 1.0. It was one of those programs I had always had installed, but only ever used to play media files. As I was exploring the menus to see what was new, I discovered it was easy to be able to record your screen. Here are some instructions on how to do it.</p>
<p>First you&#8217;ll need to download and install <a href="http://www.videolan.org/vlc/">VLC</a>.</p>
<p>Open VLC and select <strong>File</strong> -&gt; <strong>Streaming/Exporting Wizar</strong><strong>d&#8230;</strong></p>
<p><img class="alignnone size-full wp-image-286" title="1-file menu" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/1-file-menu.png" alt="1-file menu" width="331" height="280" /></p>
<p>A wizard appears. You will want to select <strong>Transcode/Save to file</strong><br />
<img class="alignnone size-full wp-image-287" title="2-streaming wizard" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/2-streaming-wizard.png" alt="2-streaming wizard" width="500" height="601" /></p>
<p>Choose <strong>Select a stream</strong>. As we want to record the screen, in the input box enter <strong>screen://</strong><br />
<img class="alignnone size-full wp-image-288" title="3-choose input" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/3-choose-input.png" alt="3-choose input" width="500" height="601" /></p>
<p>Choose the format and the bitrate. As I&#8217;m using a Mac I&#8217;ll choose <strong>H.264</strong> and select a suitable bit rate. If you have audio you wish to include you can select the audio option as well.<br />
<img class="alignnone size-full wp-image-289" title="4-choose format" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/4-chose-format.png" alt="4-choose format" width="500" height="601" /></p>
<p>Select the method of encapsulation &#8211; for H.264 it&#8217;s good to select <strong>MPEG 4/MP4</strong>.<br />
<img class="alignnone size-full wp-image-290" title="5-encpsulated" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/5-encpsulated.png" alt="5-encpsulated" width="500" height="601" /></p>
<p>Select where to save your movie.<br />
<img class="alignnone size-full wp-image-291" title="6-save to" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/6-save-to.png" alt="6-save to" width="500" height="601" /></p>
<p>You&#8217;ll then be presented with a summary screen so you can check all the settings. If they are OK, click on <strong>Finish</strong> and VLC will start to record your screen (including the mouse movements).<br />
<img class="alignnone size-full wp-image-292" title="7-summary" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/7-summary.png" alt="7-summary" width="500" height="601" /></p>
<p>Once you have finished recording, switch back to VLC and click the stop button. The recording will stop and the file is saved.<br />
<img class="alignnone size-full wp-image-293" title="8-stop recording" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/8-stop-recording.png" alt="8-stop recording" width="472" height="181" /></p>
<p>You will probably need to trim the start and the end of the screen capture in another program as the screen capture will record you switching back and forth between VLC to hit the stop button. For instance, if you are using the screen capture in a Keynote presentation you can import the movie into your presentation and then move the Start and Stop markers in the QuickTime inspector to remove these portions.<br />
<img class="alignnone size-full wp-image-294" title="9-Trim" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/9-Trim.png" alt="9-Trim" width="244" height="377" /></p>
<p>You&#8217;ll now have a beautifully created screen capture movie for your presentation. I hope you find this tip useful.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/9oWIdwv3INM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/apple/2009/07/27/using-vlc-for-screen-capture/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/apple/2009/07/27/using-vlc-for-screen-capture/</feedburner:origLink></item>
		<item>
		<title>Building location aware websites</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/dbKggn3nzLc/</link>
		<comments>http://www.paulhagon.com/blog/2009/07/24/building-location-aware-websites/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 04:30:19 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Interaction]]></category>
		<category><![CDATA[Mashup]]></category>
		<category><![CDATA[Presentation]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=276</guid>
		<description><![CDATA[On the 24th of July I gave a presentation to the Canberra Web Standards Group on Building location aware websites. Here are the slides and notes from my presentation. Slides 1-2 Welcome I&#8217;m Paul Hagon a web developer at the National Library of Australia. This is my twitter handle if you are twittering about my [...]]]></description>
			<content:encoded><![CDATA[<p>On the 24th of July I gave a presentation to the Canberra Web Standards Group on Building location aware websites. Here are the slides and notes from my presentation.</p>
<div id="__ss_1758984" style="width: 425px; text-align: left;"><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=geolocation-static-090723083956-phpapp01&amp;stripped_title=building-location-aware-websites" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=geolocation-static-090723083956-phpapp01&amp;stripped_title=building-location-aware-websites" allowscriptaccess="always" allowfullscreen="true"></embed></object>
</div>
<p>Slides 1-2<br />
Welcome I&#8217;m Paul Hagon a web developer at the National Library of Australia. This is my twitter handle if you are twittering about my presentation while  I talk</p>
<p>Slide 3</p>
<p>Slides 4-5<br />
Traditionally websites have required the user to make a choice about their location. This is stored in a cookie or within the user login.</p>
<p>Slides 6-9<br />
There are applications where I don&#8217;t want to make the choice. I am travelling and in a different location and I want the information that is relevant to my current environment. A perfect example of this is the weather. I&#8217;m primarily interested in the weather and forecast for where I am.</p>
<p>Slide 10<br />
The W3C geolocation group released their first working draft in late 2008. Their final recommendation is due to be released at the end of 2009. Their goal is to:</p>
<blockquote><p>define a secure and privacy-sensitive interface for using client-side location information in location-aware Web applications</p></blockquote>
<p>Slide 11<br />
Location detection takes a variety of forms. The first form is an IP address lookup. If you are lucky this might give you the users location to the nearest town or state. It is generally fairly inaccurate. The next option is to determine the location of your wi-fi network router. If the user is on a cellular network, their location can be triangulated by  using the tower ID&#8217;s. These methods can be very accurate (to within a couple of hundred metres). The final method is to use a dedicated GPS chip and obtain a satellite fix. This is accurate to within a few metres.</p>
<p>Slide 12-13<br />
Mobile phones started to have built in GPS chips, but it was really the iPhone that opened up the possibilities in this area. The problem was, the location sensors could only be accessed through dedicated iPhone applications written in Objective C. We are web developers and like angle brackets rather than square brackets. It&#8217;s a bit of a leap to go to a &#8216;proper&#8217; programming language</p>
<p>Slide 14-15<br />
Recently 2 developments took place. Firstly Firefox 3.5 was released. In amongst the newer JavaScript engine and native HTML5 audio and vide support, it also featured native geolocation functions. The iPhone operating system was also upgraded to OS 3.0 and with it, access to the iPhone location sensors was made available to mobile Safari.  Both of these implemementations followed the draft W3C guidelines. Native geolocation is also available within development builds of Opera and Fennec (mobile Firefox).</p>
<p>Slide 16<br />
So where does this leave Internet Explorer (and the desktop version of Safari)? Users of these browsers can download Google Gears. This is typically used to offline access to things like gmail, Google docs etc. It also makes available some geolocation functions, although they are slightly different to the W3C recommendations.</p>
<p>Slide 17<br />
A user can also use a service such as Fire Eagle to update their location, and this web service has an API that allows the data to be shared between sites (for example automatically updating your twitter location).</p>
<p>Slide 18-20<br />
Privacy is a major concern. A user has to opt in to sharing their location with a web site. These services store IP addresses, the access point information and a unique identifier (for a period of 2 weeks). No identifiable information is passed to or stored by these services. You probably have in place something in your privacy policies to cover storing log files. We tend to know a fair bit of general location information about our users anyway from things like Google Analytics reports.</p>
<p>Slide 21<br />
Users start broadcasting their location through services like Google Latitude or brightkite. This raises many more privacy issues, and they have options to allow a user to decide just how much information they wish to share.</p>
<p>Slide 22-30<br />
The code to make it happen. Create a function that we can call from an event like a page load or event click. Make a location call. If the call is successful, extract the latitude and longitude. If it is unsuccessful (may not be able to get a signal or the service may not be able to resolver your location) do something else.</p>
<p>Slide 31<br />
Reverse geogoding is the process of turing a latitude and longitude into a human readable form.</p>
<p>Slide 32-37<br />
An example of a location aware application. It&#8217;s a mashup searching for photos in a particular location. Firstly in Safari (a non native geolocation aware browser) the user has to pick the location. In Firefox 3.5 (a native geolocation aware browser) the user can ask to be taken directly to their location. The browser asks for their permission before making the call. The location is accurate to a few hundred metres. Now some of the results aren&#8217;t totally accurate. It is searching via a name as there is very little location data in the records.</p>
<p>Slide 38<br />
There are 3 instances of Parkes on the page &#8211; Parkes ACT, Parkes NSW and a name, Henry Parkes. It can&#8217;t differentiate between them</p>
<p>Slide 39<br />
There is a service called Yahoo Placemaker where you can pass in data and it will return the geographic information for that data.</p>
<p>Slide 40<br />
Passing in Parkes Australia we get the relevant geographic information for both locations of Parkes</p>
<p>Slide 41-43<br />
Placemaker also accepts a URL as input. Lets pass some information from Open Australia into it. Open Australia is an application that allows users to see what their members of parliament have been doing. We could add location aware services to this to instantly be able to select the senator for the area we are currently in, or to find all the references to the area you are in, to see what decisions have been made that may have an effect on you.</p>
<p>Slide 44<br />
Placemaker extracts the location names from the text of the page and returns any associated location data</p>
<p>Slides 45-48<br />
Is this usable or is it still too cutting edge? iPhone usage is small (in the overall website usage), but users update quickly and have the capability to use location aware services. Firfox usage is also small, but as it has just been released it will take a little time to build up a user base. Firefox users tend to update rapidly. Users whose browsers have the capability to use location based services if they install Google Gears is more than 95% of our visitors.</p>
<p>Slides 49-50<br />
I expect to see many more location based websites in the future. This presentation is available on slideshare &amp; the references I&#8217;ve used are up on delicious. Thank you.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/dbKggn3nzLc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2009/07/24/building-location-aware-websites/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2009/07/24/building-location-aware-websites/</feedburner:origLink></item>
		<item>
		<title>Tweet de France</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/53Q0qo49L-U/</link>
		<comments>http://www.paulhagon.com/blog/2009/07/08/tweet-de-france/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 14:08:55 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Tour de France]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=273</guid>
		<description><![CDATA[It&#8217;s that time of year again &#38; I&#8217;m staying up late to watch the coverage of the Tour de France. I&#8217;m following a couple of the riders on Twitter, but I found their tweets were getting buried in amongst the rest of the noise. So, I built Tweet de France, a little application that merges [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s that time of year again &amp; I&#8217;m staying up late to watch the coverage of the <a href="http://www.letour.fr/">Tour de France</a>. I&#8217;m following a couple of the riders on Twitter, but I found their tweets were getting buried in amongst the rest of the noise. So, I built <a href="http://www.paulhagon.com/playground/tdf/">Tweet de France</a>, a little application that merges the Twitter feeds from a number of riders in the tour into one feed.</p>
<p>Now I could use <a href="http://tweetdeck.com/">Tweetdeck</a> and set up a group &amp; achieve the same thing, but Tweetdeck just doesn&#8217;t do it for me and I like to experiment.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/53Q0qo49L-U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2009/07/08/tweet-de-france/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2009/07/08/tweet-de-france/</feedburner:origLink></item>
		<item>
		<title>Geolocation in Firefox 3.5 and the iPhone</title>
		<link>http://feedproxy.google.com/~r/paulhagon/~3/lMiqUh0bc34/</link>
		<comments>http://www.paulhagon.com/blog/2009/07/01/geolocation-in-firefox-and-the-iphone/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 05:21:13 +0000</pubDate>
		<dc:creator>Paul Hagon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.paulhagon.com/?p=258</guid>
		<description><![CDATA[Today the Mozilla group released Firefox 3.5. This release has many new features, but one that really interests me is the inbuilt geolocation service. This release also comes hot on the heels of the iPhone OS3.0 software upgrade that also brings inbuilt geolocation to the mobile safari browser. Why is this exciting? They are both [...]]]></description>
			<content:encoded><![CDATA[<p>Today the Mozilla group released <a href="http://en-us.www.mozilla.com/en-US/firefox/">Firefox 3.5</a>. This release has many new features, but one that really interests me is the <a href="http://www.mozilla.com/en-US/firefox/geolocation/">inbuilt geolocation service</a>. This release also comes hot on the heels of the iPhone OS3.0 software upgrade that also brings inbuilt geolocation to the mobile safari browser. Why is this exciting? They are both based upon the <a href="http://www.w3.org/TR/geolocation-API/">W3C geolocation specifications</a>. I&#8217;ve <a href="http://www.paulhagon.com/blog/2008/11/24/flickr-commons-in-my-neighbourhood/">previously written</a> about geolocating using various browser plugins. This is a messy way of doing it and required a lot of code forking to cover the different possibilities. Now we have a standard way of doing this type of thing.</p>
<h3>How do we do it?</h3>
<p>Let&#8217;s start by creating a call to the browsers in built location service. We need to firstly check that the browser supports location services. If it does, then make a call to try and get our location. If we get a successful location we can display the latitude and longitude. We may also get an error. This may occur if the user decides not to share their location or there is an error in the system.</p>
<pre>
<code>
&lt;script type="text/javascript"&gt;
// Check in the browser supports native geolocation and make a call to the geolocation service
function findLocation() {
  if(navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(successCallback,errorCallback);
  } else {
    var displayLocation = document.getElementById("location");
    displayLocation.innerHTML = "Your browser doesn't support geolocation services";
  }
}

// Extract the latitude and longitude from the response
function successCallback(position) {
  var latitude = position.coords.latitude;
  var longitude = position.coords.longitude;
  var displayLocation = document.getElementById("location");
  displayLocation.innerHTML = "latitude: " + latitude + ", longitude:" + longitude;
}

// There was an error
function errorCallback() {
  var displayLocation = document.getElementById("location");
  displayLocation.innerHTML = "Sorry, we couldn't find your location";
}
&lt;/script&gt;
</code></pre>
<p>We are now able to display our current latitude and longitude &#8211; see <a href="http://www.paulhagon.com/example/location/example1.php">example 1</a>.</p>
<h3>Displaying a map</h3>
<p>Now that we have a latitude and longitude it&#8217;s much easier to visualise our location if we plot it onto a map.We will keep the same basic code and add some Google Maps script to it.</p>
<pre><code>
&lt;script type="text/javascript" src="http://www.google.com/jsapi?key=YOUR_GOOGLE_KEY"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;

// Because we are using a geolocation service we need to make sure sensor=true
google.load("maps", "2", {"other_params":"sensor=true"});

// Check in the browser supports native geolocation and make a call to the geolocation service
function findLocation() {
  if(navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(successCallback,errorCallback);
  } else {
    document.getElementById("location").innerHTML = "Your browser doesn't support geolocation services";
  }
}

// Extract the latitude and longitude from the response and display a map
function successCallback(position) {
  var latitude = position.coords.latitude;
  var longitude = position.coords.longitude;
  document.getElementById("location").innerHTML = "latitude: " + latitude + ", longitude:" + longitude;

 // Display the map
  var map = new GMap2(document.getElementById('map'));

  // Centre the map around the latitude and longitude
  var latlng = new google.maps.LatLng(latitude, longitude);
  var zoom=16;
  map.setCenter(latlng, zoom);

  // display the default controls
  map.setUIToDefault();

  // Add a marker
  var point = new GLatLng(latitude, longitude);
  map.addOverlay(new GMarker(point));
}

// There was an error
function errorCallback() {
  document.getElementById("location").innerHTML = "Sorry, we couldn't find your location";
}
&lt;/script&gt;
</code></pre>
<p>Now it is much easier to determine our location by turning the numbers into something visual and meanignful. Try it out in <a href="http://www.paulhagon.com/example/location/example2.php">example 2</a>.</p>
<p>These code samples will work for both Firefox 3.5:</p>
<p><a href="http://www.paulhagon.com/example/location/example2.php"><img class="alignnone size-medium wp-image-259" title="Firefox location" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/location-500x384.png" alt="Firefox location" width="500" height="384" /></a></p>
<p>And mobile Safari on iPhones and iPod touches running OS3.0</p>
<p><a href="http://www.paulhagon.com/example/location/example2.php"><img class="alignnone size-thumbnail wp-image-261" title="iPhone-location" src="http://www.paulhagon.com/wordpress/wp-content/uploads/2009/07/iPhone-location-133x200.jpg" alt="iPhone-location" width="133" height="200" /></a></p>
<p>Now you have the basics of obtaining a latitude and longitude, you can start to use these techniques in your own applications to display locations or items that are relevant to the user in that location.</p>
<img src="http://feeds.feedburner.com/~r/paulhagon/~4/lMiqUh0bc34" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.paulhagon.com/blog/2009/07/01/geolocation-in-firefox-and-the-iphone/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.paulhagon.com/blog/2009/07/01/geolocation-in-firefox-and-the-iphone/</feedburner:origLink></item>
	</channel>
</rss>
