<?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>Online Journalism Blog &#187; latitude</title>
	<atom:link href="http://onlinejournalismblog.com/tag/latitude/feed/" rel="self" type="application/rss+xml" />
	<link>http://onlinejournalismblog.com</link>
	<description>A conversation.</description>
	<lastBuildDate>Thu, 24 May 2012 08:39:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<cloud domain='onlinejournalismblog.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>How to: convert easting/northing into lat/long for an interactive map</title>
		<link>http://onlinejournalismblog.com/2011/08/12/how-to-convert-eastingnorthing-into-latlong-for-an-interactive-map/</link>
		<comments>http://onlinejournalismblog.com/2011/08/12/how-to-convert-eastingnorthing-into-latlong-for-an-interactive-map/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 08:27:07 +0000</pubDate>
		<dc:creator>Paul Bradshaw</dc:creator>
				<category><![CDATA[data journalism]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[easting]]></category>
		<category><![CDATA[fusion tables]]></category>
		<category><![CDATA[google refine]]></category>
		<category><![CDATA[latitude]]></category>
		<category><![CDATA[longitude]]></category>
		<category><![CDATA[northing]]></category>
		<category><![CDATA[speed cameras]]></category>

		<guid isPermaLink="false">http://onlinejournalismblog.com/?p=14794</guid>
		<description><![CDATA[Google Fusion Tables is great for creating interactive maps from a spreadsheet &#8211; but it isn&#8217;t too keen on easting and northing. That can be a problem as many government and local authority datasets use easting and northing to describe the geographical position of things &#8211; for example, speed cameras. So you&#8217;ll need a way [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fonlinejournalismblog.com%2F2011%2F08%2F12%2Fhow-to-convert-eastingnorthing-into-latlong-for-an-interactive-map%2F" onclick="urchinTracker('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fonlinejournalismblog.com_2F2011_2F08_2F12_2Fhow-to-convert-eastingnorthing-into-latlong-for-an-interactive-map_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fonlinejournalismblog.com%2F2011%2F08%2F12%2Fhow-to-convert-eastingnorthing-into-latlong-for-an-interactive-map%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<figure id="attachment_14984" class="wp-caption alignnone" style="width: 412px"><a href="http://onlinejournalismblog.com/wp-content/uploads/2011/07/Picture-42.png"><img class="size-full wp-image-14984 " src="http://onlinejournalismblog.com/wp-content/uploads/2011/07/Picture-42.png" alt="A map generated in Google Fusion Tables from a geocoded dataset" width="412" height="254" /></a><figcaption class="wp-caption-text">A map generated in Google Fusion Tables from a dataset cleaned using these methods</figcaption></figure>
<p>Google Fusion Tables is great for creating interactive maps from a spreadsheet &#8211; but it isn&#8217;t too keen on <a href="http://en.wikipedia.org/wiki/Easting_and_northing" onclick="urchinTracker('/outgoing/en.wikipedia.org/wiki/Easting_and_northing?referer=');">easting and northing</a>. That can be a problem as many government and local authority datasets use easting and northing to describe the geographical position of things &#8211; for example, <a href="http://www.google.co.uk/search?sourceid=chrome&amp;ie=UTF-8&amp;q=easting+northing+speed+cameras" onclick="urchinTracker('/outgoing/www.google.co.uk/search?sourceid=chrome_amp_ie=UTF-8_amp_q=easting+northing+speed+cameras&amp;referer=');">speed cameras</a>.</p>
<p>So you&#8217;ll need a way to convert easting and northing into something that Fusion Tables does like &#8211; such as latitude and longitude.</p>
<p>Here&#8217;s how I did it &#8211; quickly.<span id="more-14794"></span></p>
<h2>Find an API to do the work for you</h2>
<p>The first thing I needed was an online tool that will do the conversions. <a href="http://www.nearby.org.uk/" onclick="urchinTracker('/outgoing/www.nearby.org.uk/?referer=');">Nearby.org.uk</a> is pretty useful for doing so manually &#8211; and <a href="http://www.nearby.org.uk/api/convert-help.php" onclick="urchinTracker('/outgoing/www.nearby.org.uk/api/convert-help.php?referer=');">there&#8217;s an API as well</a> &#8211; but I wanted something that would give me a nice JSON feed for Google Refine.</p>
<p>So I asked Twitter.</p>
<p>This is where being a part of <a href="http://onlinejournalismblog.com/2011/04/01/communities-of-practice-teaching-students-to-learn-in-networks/">communities of practice</a> is important for journalists. (Samuel Johnson once said that there are <a href="http://www.samueljohnson.com/twokinds.html" onclick="urchinTracker('/outgoing/www.samueljohnson.com/twokinds.html?referer=');">two types of knowledge</a>: &#8220;We know a subject ourselves, or we know where we can find information upon it.&#8221; Those communities are an example of the latter).</p>
<p>Stuart Harrison very helpfully said he would adapt <a href="http://www.uk-postcodes.com/api.php" onclick="urchinTracker('/outgoing/www.uk-postcodes.com/api.php?referer=');">his postcodes API</a> to convert easting and northing &#8211; and within an hour <a href="http://www.uk-postcodes.com/eastingnorthing.php" onclick="urchinTracker('/outgoing/www.uk-postcodes.com/eastingnorthing.php?referer=');">it was ready</a>.</p>
<h2>Using Google Refine to work with the API</h2>
<p>The API works by generating information in JSON format based on a URL (<a href="http://onlinejournalismblog.com/2011/04/14/data-for-journalists-json-for-beginners/">I explain JSON in this post</a>).</p>
<p>For example, the following URL generates a page of JSON with the latitude and longitude for easting 492412, northing 329757:</p>
<p><a href="http://www.uk-postcodes.com/eastingnorthing.php?easting=492412&amp;northing=329757" onclick="urchinTracker('/outgoing/www.uk-postcodes.com/eastingnorthing.php?easting=492412_amp_northing=329757&amp;referer=');">http://www.uk-postcodes.com/eastingnorthing.php?easting=492412&amp;northing=329757</a></p>
<p>I know that <a href="http://code.google.com/p/google-refine/wiki/Downloads?tm=2" onclick="urchinTracker('/outgoing/code.google.com/p/google-refine/wiki/Downloads?tm=2&amp;referer=');">Google Refine</a> will be able to use that JSON to extract the latitude and longitude for dozens of rows with different values and add them to the spreadsheet (<a href="http://onlinejournalismblog.com/2010/12/16/adding-geographical-information-to-a-spreadsheet-based-on-postcodes-google-refine-and-apis/">here&#8217;s a post explaining that</a> in more detail).</p>
<p>So here&#8217;s what I do:</p>
<h2>Generating the end bit of the URLs</h2>
<p>I need a new column in my spreadsheet that fetches information from those URLs &#8211; there are a couple of ways of doing this but I&#8217;m going to show the simplest way for a beginner (rather than the simplest method programmatically*)</p>
<p>This involves creating a new column which conveniently puts together the end part of the URL that I&#8217;ll be calling: in this case easting=492412&amp;northing=329757 (where the numbers change in each cell).</p>
<ol>
<li>Click on the drop-down arrow at the top of the Easting column and select <strong>Edit column &gt; Add column based on this column&#8230;</strong></li>
<li>In the window that appears type the following GREL (Google Refine Expression Language): <strong>&#8220;easting=&#8221;+cells["Easting"].value+&#8221;&amp;northing=&#8221;+cells["Northing"].value</strong></li>
<li>This assumes that the column with the easting values is called &#8216;Easting&#8217; (note the capital E) and the northing column is called &#8216;Northing&#8217;. Change these to the names of your columns if they&#8217;re different.</li>
<li>Give the new column a name in the box at the top and save it. You should see a new column appear, populated with values like easting=492412&amp;northing=329757 &#8211; in each cell the process is simply writing a string of characters that begins with easting=, then adds the value in the cell within the &#8216;Easting&#8217; column, adds &amp;northing=, then adds the value in the cell within the &#8216;Northing&#8217; column.</li>
</ol>
<p>These are the second parts of the URLs we&#8217;re going to fetch lat-long values from.</p>
<h2>Fetching data from those URLs</h2>
<p>At the top of this new column, then:</p>
<ol>
<li>Click on the drop-down arrow of your newest column and select <strong>Edit column &gt; Add column by fetching URLs&#8230;</strong></li>
<li>In the window that appears type the following GREL (Google Refine Expression Language): <strong>&#8220;http://www.uk-postcodes.com/eastingnorthing.php?&#8221;+value<br />
</strong></li>
<li>As you can see, this simply looks at a URL that begins http://www.uk-postcodes.com/eastingnorthing.php? and ends with the value in each cell of the column selected. It will then populate a new column of cells with the JSON returned by each different URL.</li>
<li>Give the new column a name in the box at the top and save it. You should again see a new column appear &#8211; but this will take longer, because it is going to that website and gathering information. Make a cup of tea.</li>
</ol>
<h2>Extracting the latitude and longitude into separate cells</h2>
<p>Great &#8211; now we have the lat-long values for each row. But to visualise this data we need separate columns for latitude and longitude, so this is how we get that out of the JSON. <em>UPDATE: In the 2.0 version of Refine the old GREL (struck through below) no longer seems to work &#8211; thanks to Tom in the comments for pointing this out and adding the new code which is shown below.</em></p>
<ol>
<li>Click on the drop-down arrow and select <strong>Edit column &gt; Add column <strong>based on this column&#8230;</strong></strong></li>
<li>In the window that appears type the following GREL (Google Refine Expression Language): <strong><del>value.parseJson()lng</del> parseJson(value).get(&#8220;lng&#8221;)<br />
</strong></li>
<li>This will look at the value of each cell, and pull out the bit after &#8220;lng&#8221; and populate a new column of cells with each value</li>
<li>Give the new column a name in the box at the top (e.g. longitude) and save it.</li>
<li>Repeat the process for latitude &#8211; the GREL you need is <strong><del>value.parseJson()lat</del> parseJson(value).get(&#8220;lat&#8221;)</strong></li>
</ol>
<p>You should now have a spreadsheet of data that includes latitude and longitude for each row. Click on <strong>Export</strong> in the upper right corner and select <strong>Comma-separated value</strong>.</p>
<h2>Visualise it in Fusion Tables</h2>
<p>Go to <a href="http://www.google.com/fusiontables/Home" onclick="urchinTracker('/outgoing/www.google.com/fusiontables/Home?referer=');">Google Fusion Tables</a> and upload that file. Then open it. Click on <strong>Visualize </strong>and you should have a map option. Once visualised you can embed it elsewhere by clicking on <strong>Get embeddable link</strong>.</p>
<p>For <a href="http://helpmeinvestigate.com/transport/speedcameras/" onclick="urchinTracker('/outgoing/helpmeinvestigate.com/transport/speedcameras/?referer=');">an example of how that embed code looks on a page, here is one I prepared earlier</a>. (And <a href="https://spreadsheets.google.com/spreadsheet/ccc?key=0ApTo6f5Yj1iJdHF4T2FOX00zaUJ2TEhTNEE0QXNDcXc&amp;hl=en_GB" onclick="urchinTracker('/outgoing/spreadsheets.google.com/spreadsheet/ccc?key=0ApTo6f5Yj1iJdHF4T2FOX00zaUJ2TEhTNEE0QXNDcXc_amp_hl=en_GB&amp;referer=');">here is the data it is pulling from</a>).</p>
<p><em>*The simpler way programmatically is to go straight to &#8216;Fetching data from URLs&#8217; and use the following GREL code:</em></p>
<p><strong>&#8220;http://www.uk-postcodes.com/eastingnorthing.php?easting=&#8221;+cells["Easting"].value+&#8221;&amp;northing=&#8221;+cells["Northing"].value</strong></p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fonlinejournalismblog.com%2F2011%2F08%2F12%2Fhow-to-convert-eastingnorthing-into-latlong-for-an-interactive-map%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe><div align="center"><a href="http://twitter.com/paulbradshaw" target="_blank" onclick="urchinTracker('/outgoing/twitter.com/paulbradshaw?referer=');"><img src="http://onlinejournalismblog.com/wp-content/plugins/igit-follow-me-after-post-button-new/twitter8.png" /></a><div style="font-size:8px;"><a href="http://php-freelancer.in/" style="color:#D2D2D2" title="PHP Freelancer , PHP Freelancer India , Hire PHP Freelancer" title="PHP Freelancer , PHP Freelancer India , Hire PHP Freelancer"  onclick="urchinTracker('/outgoing/php-freelancer.in/?referer=');">PHP Freelancer</a></div></div>]]></content:encoded>
			<wfw:commentRss>http://onlinejournalismblog.com/2011/08/12/how-to-convert-eastingnorthing-into-latlong-for-an-interactive-map/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Latitude&#8217;s Location History provides more opportunities for mobile journalism</title>
		<link>http://onlinejournalismblog.com/2009/11/21/google-latitudes-location-history-provides-more-opportunities-for-mobile-journalism/</link>
		<comments>http://onlinejournalismblog.com/2009/11/21/google-latitudes-location-history-provides-more-opportunities-for-mobile-journalism/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 08:03:33 +0000</pubDate>
		<dc:creator>Paul Bradshaw</dc:creator>
				<category><![CDATA[online journalism]]></category>
		<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Google Latitude]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[latitude]]></category>
		<category><![CDATA[mapping]]></category>

		<guid isPermaLink="false">http://onlinejournalismblog.com/?p=3852</guid>
		<description><![CDATA[This was originally published in Poynter&#8217;s E-Media Tidbits last week Google Latitude &#8211; a service that allows people to see where you are &#8211; has launched 2 new services &#8211; Location History and Location Alerts - that provide some interesting potential for mobile journalism. Location History (shown above) allows you to &#8220;store, view, and manage your [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fonlinejournalismblog.com%2F2009%2F11%2F21%2Fgoogle-latitudes-location-history-provides-more-opportunities-for-mobile-journalism%2F" onclick="urchinTracker('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fonlinejournalismblog.com_2F2009_2F11_2F21_2Fgoogle-latitudes-location-history-provides-more-opportunities-for-mobile-journalism_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fonlinejournalismblog.com%2F2009%2F11%2F21%2Fgoogle-latitudes-location-history-provides-more-opportunities-for-mobile-journalism%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><em>This was <a href="http://www.poynter.org/column.asp?id=31&amp;aid=173345" onclick="urchinTracker('/outgoing/www.poynter.org/column.asp?id=31_amp_aid=173345&amp;referer=');">originally published in Poynter&#8217;s E-Media Tidbits</a> last week</em></p>
<p>Google Latitude &#8211; a service that allows people to see where you are &#8211; has<a href="http://googlemobile.blogspot.com/2009/11/google-latitude-now-with-location.html" onclick="urchinTracker('/outgoing/googlemobile.blogspot.com/2009/11/google-latitude-now-with-location.html?referer=');"> launched 2 new services</a> &#8211; Location History and Location Alerts - that provide some interesting potential for mobile journalism.</p>
<p><img src="http://3.bp.blogspot.com/_V-5em911hQg/SvoEWP02z8I/AAAAAAAAC0g/awgVurkk9XQ/s1600/loc_history_01.png" alt="location history" /></p>
<p><strong>Location History</strong> (shown above) allows you to &#8220;store, view, and manage your past Latitude locations. You can visualize your history on Google Maps and Earth or play back a recent trip in order.&#8221;</p>
<p>There are obvious possibilities here for then editing a map with editorial information &#8211; if you&#8217;re covering a parade, a marathon, or a demonstration you could edit placemarks to add relevant reports as you were posting them (or someone else with access to the account could from the newsroom).</p>
<p><strong>Location Alerts</strong> is less obviously useful: this sends you a notification (by email and/or text) when you are near a friend&#8217;s location, although as Google explains, it&#8217;s a little more clever than that:</p>
<blockquote><p>&#8220;Using your past location history, Location Alerts can recognize your regular, routine locations and not create alerts when you&#8217;re at places like home or work. Alerts will only be sent to you and any nearby friends when you&#8217;re either at an unusual place or at a routine place at an unusual time. Keep in mind that it may take up to a week to learn your &#8220;unusual&#8221; locations and start sending alerts.&#8221;</p></blockquote>
<p>There <em>is</em> potential here for making serendipitous contact with readers or contacts, but until Latitude has widespread adoption (its biggest issue for me, and one that may never be resolved), it&#8217;s not likely to be useful in the immediate future.</p>
<p>The good thing about Latitude is you can enable it and disable it to suit you, and my own experience is that I only enable it when I want to meet someone using GPS on my phone. To sign up to Google Latitude user, <a id="yv6j" title="get it here" href="http://www.google.com/latitude/intro.html" target="_blank" onclick="urchinTracker('/outgoing/www.google.com/latitude/intro.html?referer=');">go here</a>. To enable the new features, go to <a id="q3gn" title="google.com/latitude/apps" href="http://www.google.com/latitude/apps" target="_blank" onclick="urchinTracker('/outgoing/www.google.com/latitude/apps?referer=');">google.com/latitude/apps</a>.</p>
<p>Those are 2 uses I can think of, and I&#8217;ve yet to have a serious play &#8211; can you think of any others?</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fonlinejournalismblog.com%2F2009%2F11%2F21%2Fgoogle-latitudes-location-history-provides-more-opportunities-for-mobile-journalism%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe><div align="center"><a href="http://twitter.com/paulbradshaw" target="_blank" onclick="urchinTracker('/outgoing/twitter.com/paulbradshaw?referer=');"><img src="http://onlinejournalismblog.com/wp-content/plugins/igit-follow-me-after-post-button-new/twitter8.png" /></a><div style="font-size:8px;"><a href="http://php-freelancer.in/" style="color:#D2D2D2" title="PHP Freelancer , PHP Freelancer India , Hire PHP Freelancer" title="PHP Freelancer , PHP Freelancer India , Hire PHP Freelancer"  onclick="urchinTracker('/outgoing/php-freelancer.in/?referer=');">PHP Freelancer</a></div></div>]]></content:encoded>
			<wfw:commentRss>http://onlinejournalismblog.com/2009/11/21/google-latitudes-location-history-provides-more-opportunities-for-mobile-journalism/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

