<?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>mySociety &#187; Mapumental</title>
	<atom:link href="http://www.mysociety.org/category/projects/mapumental/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysociety.org</link>
	<description>Relentless user-focus on civic websites</description>
	<lastBuildDate>Thu, 09 Feb 2012 18:07:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Mapumental: mapping a new path</title>
		<link>http://www.mysociety.org/2011/10/05/mapumental-mapping-a-new-path/</link>
		<comments>http://www.mysociety.org/2011/10/05/mapumental-mapping-a-new-path/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 16:40:13 +0000</pubDate>
		<dc:creator>Myf</dc:creator>
				<category><![CDATA[Mapumental]]></category>
		<category><![CDATA[Travel Time Maps]]></category>

		<guid isPermaLink="false">http://www.mysociety.org/?p=4738</guid>
		<description><![CDATA[It&#8217;s high time we updated you on Mapumental, our journey-time mapping project. For those who may not remember, Mapumental is based on a simple idea: to visualise transit times, by public transport, from or to any postcode in Great Britain. It all began in 2006, when the Department for Transport approached us to see what [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mysociety.org/wp/wp-content/uploads/2011/10/Royal-Festival-Hall500.png"><img class="aligncenter size-full wp-image-4777" title="Mapumental map showing travel times to the Royal Festival Hall" src="http://www.mysociety.org/wp/wp-content/uploads/2011/10/Royal-Festival-Hall500.png" alt="Mapumental map showing travel times to the Royal Festival Hall" width="500" height="500" /></a></p>
<p>It&#8217;s high time we updated you on <a href="a href=">Mapumental</a>, our journey-time mapping project. For those who may not remember, Mapumental is based on a simple idea: to visualise transit times, by public transport, from or to any postcode in Great Britain.</p>
<p>It all began in 2006, when the Department for Transport approached us to see what we might do with public transport data; in 2009 we won an investment loan from Channel 4 and Screen West Midlands which enabled us to build a <a title="Mapumental demo" href="http://mapumental.com/demo/">beta tool</a> &#8211; you might have played with it. If not, go on, have a go. It&#8217;s fun!</p>
<p>It&#8217;s been quite a long journey to where we are today. Unlike many mySociety projects, funding for Mapumental&#8217;s development came from a commercial investment loan, with a condition that we set it up as a business. For that reason, it&#8217;s not enough that it&#8217;s beautiful and useful &#8211; we need to find ways for it to be profitable, too. All  revenues are set to come back to fund our not-for-profit activities.</p>
<p>We could tell from very early on in the project that Mapumental would be a sought-after tool for all sorts of purposes, from business to personal use. For example, you can see commute times at a glance, so it&#8217;s great for house-hunters and job-seekers. Consequently, it&#8217;s also great for the property and recruitment industries.</p>
<blockquote><p>“Your maps look amazing, such a great way of representing what could be really boring data, but isn&#8217;t.” &#8211; A jobseeker</p></blockquote>
<p>We can see loads of other possibilities too &#8211; like urban  planning. This sort of analysis would have been far more expensive in  the past; with Mapumental, planners can see at a glance how accessible a new development would be by public transport. Its potential uses are wide-ranging, answering questions for businesses, organisations,  charities, and public facilities &#8211; especially those wanting to maximise  accessibility or encourage use of greener transport options.</p>
<blockquote><p>&#8220;The maps are a fantastic, a great tool and should be used for every planning application. I will be using Mapumental for all of our projects!&#8221; &#8211; Lee Taylor, Veridis Design</p></blockquote>
<p>We&#8217;ve recently refined a product that&#8217;s pared down from the dynamic maps you may remember from that beta tool: static maps. These are simple, non-interactive maps which show transit time in bands. They&#8217;re flexible in that they can be generated for any postcode, with any maximum travel time, and depict travel at any given time of day.</p>
<p>We can provide a one-off map for personal use, or batches of many thousands of maps &#8211; as we have done for estate agents <a href="http://www.foxtons.co.uk/foxtons/">Foxtons</a>, who now have a Mapumental map on every property listing.</p>
<p>As we generate more and more maps for different uses, showing different parts of the country, we&#8217;re really enjoying digging out all sorts of surprising facts &#8211; like how it&#8217;s quicker to travel from Watford to Westminster than it is from some parts of Harringay. Or how Cardiff University students might sensibly live at all points east as far as Newport, but will be stymied for transport in the west if they live anywhere other than Barry or Bridgend.</p>
<p>In fact, our very favourite use so far has come from an individual who centred his map around his home postcode. He tells us he has printed it off and put it up by the front door, so that on his way out of the house, he can find a new and surprising destination for day-trips.</p>
<p><a href="http://www.mysociety.org/wp/wp-content/uploads/2011/10/SevenoaksResidential500.png"><img class="aligncenter size-full wp-image-4779" title="Public transport travel times from a residential postcode (TN13 1SX) in Sevenoaks. Leaving at 7am, travelling for no more than 2½ hours. " src="http://www.mysociety.org/wp/wp-content/uploads/2011/10/SevenoaksResidential500.png" alt="Public transport travel times from a residential postcode (TN13 1SX) in Sevenoaks. Leaving at 7am, travelling for no more than 2½ hours. " width="500" height="500" /></a></p>
<p>Find out more on the <a title="Mapumental transit time maps" href="http://mapumental.com/">Mapumental website</a> &#8211; and please do spread the word among friends and colleagues who might benefit from a Mapumental map.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mysociety.org/2011/10/05/mapumental-mapping-a-new-path/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What are the two sorts of Cloud infrastructure called?</title>
		<link>http://www.mysociety.org/2009/09/22/what-are-the-two-sorts-of-cloud-infrastructure-called/</link>
		<comments>http://www.mysociety.org/2009/09/22/what-are-the-two-sorts-of-cloud-infrastructure-called/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 10:42:45 +0000</pubDate>
		<dc:creator>Francis Irving</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[Mapumental]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://www.mysociety.org/?p=3092</guid>
		<description><![CDATA[I&#8217;ve been doing lots of research around &#8220;cloud computing&#8221; recently, so we can change how Mapumental works and take it out of private beta. One thing that&#8217;s struck me is that there doesn&#8217;t seem to be a proper, industry standard name to distinguish what to me are two fundamentally different sorts of &#8220;cloud computing&#8221;. I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing lots of research around &#8220;cloud computing&#8221; recently, so we can change how <a href="http://mapumental.channel4.com/">Mapumental</a> works and take it out of private beta.</p>
<p>One thing that&#8217;s struck me is that there doesn&#8217;t seem to be a proper, industry standard name to distinguish what to me are two fundamentally different sorts of &#8220;cloud computing&#8221;. I&#8217;m focusing here entirely on cloud services for programmers (let&#8217;s leave what it means to end users or businesses for another day).</p>
<p>Here are my own names and descriptions of them:</p>
<p><strong>1) Cloud hardware server provision (Cloud HSP)<br />
</strong> Low level APIs for making and destroying (virtual) servers, and loading machine images onto them. e.g. Amazon Elastic Compute Cloud, Rackspace Cloud Servers,  Eucalyptus&#8217;s EC2 bits. Basically, what <a href="http://open.eucalyptus.com/wiki/API_v1.5">Eucalyptus v 1.5 can do</a> and what <a href="http://libcloud.org/">libcloud</a> should do. (By analogy,  this is the assembly language of cloud computing)</p>
<p><strong>2) Cloud developer service provision (Cloud DSP)</strong> A service that a developer accesses with one name and a simple API, and behind the scenes it scales for him, automatically. e.g. Amazon Queue Service, Rackspace Cloud Files. (By analogy, this layer is the C programming language of cloud computing)</p>
<p>[as an aside, Google AppEngine is an interesting one. It is definitely in the Cloud DSP category, but I think it is larger than that - it is a whole set of APIs all in that category. Something like Google DataStore is a single Cloud DSP, albeit one apparently only accessible within AppEngine apps]</p>
<p>It&#8217;s possible to use a Cloud HSP (assembly language), along with a bunch of your own software or open source software, to build new Cloud DSPs (C code). Right now this is pretty hard &#8211; even quite well known open source distributed datasbases like CouchDB still need scripting to even make them replicate. The code that makes and destroys servers and gives the service one name, needs manually stringing with quite new bits of wire (things like <a href="http://code.google.com/p/scalr/">scalr</a> and <a href="http://www.backhand.org/wackamole/">Wackamole</a>).</p>
<p>For this reason, I&#8217;m reluctant for mySociety to get into the &#8220;making our own Cloud DSP out of Cloud HSP&#8221; game. It feels to me like a suck of time, and like we wouldn&#8217;t be able to guarantee without lots of careful and expensive testing that it would scale. I&#8217;m more tempted to use the commercial Cloud DSP services where possible, even though they are proprietary. But use them via our own abstraction layer, so we can change as we need to. Of course, we have some C++ code (the public transport route finder), so will have to use the Cloud HSP API to get that going, perhaps with <a href="http://aws.amazon.com/autoscaling/">Amazon&#8217;s Auto Scaling</a>. But it can jolly well use AQS and S3 to talk to other services.</p>
<p>So, what do you think about the names Cloud HSP/DSP? Are there already existing names for the distinction that I&#8217;m making? Is it a useful distinction for you? Can you think of better names?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mysociety.org/2009/09/22/what-are-the-two-sorts-of-cloud-infrastructure-called/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How Mapumental works</title>
		<link>http://www.mysociety.org/2009/08/18/how-mapumental-works/</link>
		<comments>http://www.mysociety.org/2009/08/18/how-mapumental-works/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 16:40:13 +0000</pubDate>
		<dc:creator>Francis Irving</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[Mapumental]]></category>

		<guid isPermaLink="false">http://www.mysociety.org/?p=2304</guid>
		<description><![CDATA[Here is a diagram of how the backend of Mapumental works. Take it in the spirit that Chris Lightfoot set when he made a similar diagram for the No. 10 petitions site &#8211; although many such diagrams are useless, hopefully this one contains useful information. If you haven&#8217;t seen Mapumental yet, first take a look [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a diagram of how the backend of Mapumental works. Take it in the spirit <a href="http://www.mysociety.org/2006/12/08/under-the-bonnet/">that Chris Lightfoot set</a> when he made a similar diagram for the No. 10 petitions site &#8211; although many such diagrams are useless, hopefully this one contains useful information. </p>
<p>If you haven&#8217;t seen Mapumental yet, first <a href="http://mapumental.channel4.com/">take a look</a> at the video, and sign up for the private beta.</p>
<p><a href="http://www.mysociety.org/wp/wp-content/uploads/2009/08/mapumental-early-architecture.png"><img src="http://www.mysociety.org/wp/wp-content/uploads/2009/08/mapumental-early-architecture-300x212.png" alt="mapumental-early-architecture" title="mapumental-early-architecture" width="300" height="212" class="alignnone wp-image-2300" style="max-width: 36em; max-height: 25.67em" /></a><br />
<strong>(Click on the diagram for a large version)</strong></p>
<p>Below, I&#8217;ve explained what the main components are, and some interesting things about them.</p>
<p>Everything can, at least in theory, run on lots of servers. Currently we are only actually using one server for web requests, because of problems with HAProxy. We&#8217;re runnning isodaemons on two different servers.</p>
<p><strong>Basic web application</strong> &#8211; it started out as raw Python, but the more Matthew hacks on it the more Django libraries he pulls in. Soon it&#8217;ll be indistinguishable from a Django app. When someone enters a new postcode, it adds it to the work queue in the PostgreSQL database, then refreshes waiting for the job to be finished. Then it displays the flash application (made by Stamen), set up to load the appropriate tile layers.</p>
<p><strong>Tile server and cache</strong> &#8211; This uses the Python-based <a href="http://tilecache.org/">TileCache</a>, calling <a href="http://gdal.org/">Geospatial Data Abstraction Library</a> (GDAL) to help render the tiles from points. It was originally written by Stamen, and expanded by mySociety. GDAL isn&#8217;t perfect, it doesn&#8217;t have fancy enough algorithms for my liking. e.g. Using a median rather than a weighted mean.  </p>
<p><strong>Isodaemons</strong> &#8211; These are controlled by <a href="https://secure.mysociety.org/cvstrac/rlog?f=mysociety/iso/bin/isodaemon.py">a Python script</a>, but the <a href="https://secure.mysociety.org/cvstrac/rlog?f=mysociety/iso/cpplib/makeplan.h">bulk of the code</a> is custom written in C++. Slightly crazily, this can find the quickest route by public transport for each of 300,000 journeys from every station in the UK to a particular station, arriving at a particular time, in 10 to 30 seconds.</p>
<p>I had no idea how to do this, but luckily I live in Cambridge, UK. It&#8217;s a city fit to bursting with computer scientists. Many of the jobs are dull, and need little computing, never mind science &#8211; like <a href="http://www.autonomy.com/content/Autonomy/Careers/Graduates/index.en.html">writing interface layers for SQL server</a>. So if you have a real interesting problem it&#8217;s easy to get help!</p>
<p>The universal advice was to use <a href="http://www.cs.sunysb.edu/~skiena/combinatorica/animations/dijkstra.html">Dijkstra&#8217;s algorithm</a>, which needed a bit of adaptation to work efficiently over space-time, rather than just space. Normally it is used for planning routes round a map, but public transport isn&#8217;t like that, you have to arrive in time for each particular train, so time affects what journeys you can take.</p>
<p>I originally wrote it in Python, which was not only too slow, but used up far far too much RAM. It could never have loaded the whole dataset in.  However, the old Python code is still run by the test script, to double check the C++ code against. It is also still used to make the binary timetable files, see below.</p>
<p><strong>Travel times, 1 binary file / postcode</strong> &#8211; I briefly attempted to insert 300,000 rows into PostgreSQL for each postcode looked up, but it was obvious it wasn&#8217;t going to scale. Going back to basics, it now just saves the time taken to travel to each station in a simple binary file &#8211; two bytes for each station, 600k in total. The tile server then does random access lookups into that file, as it renders each tile. It only needs to look up the values for the stations it knows are on/near the tile.  </p>
<p><strong>There&#8217;s various other bits:</strong></p>
<ul>
<li> cron jobs for <a href="https://secure.mysociety.org/cvstrac/rlog?f=mysociety/iso/bin/email-invites">sending out invites</a> </li>
<li> <a href="https://secure.mysociety.org/cvstrac/fileview?f=mysociety/iso/bin/do-nptdr.py&#038;v=1.35https://secure.mysociety.org/cvstrac/rlog?f=mysociety/iso/bin/do-nptdr.py">converting timetable data</a> from ATCO-CIF to the binary format </li>
<li> <a href="https://secure.mysociety.org/cvstrac/rlog?f=mysociety/iso/bin/populate-houseprices.py">loading static layer data</a> into the database </li>
<li> <a href="https://secure.mysociety.org/cvstrac/rlog?f=mysociety/iso/bin/grab-uk-bounds-urls">precaching every tile</a> for static datasets </li>
<li> Squid and Apache and FastCGI both sit in front of the web applications </li>
<li> for speed, we cache the <a href="http://developers.cloudmade.com/projects/show/tiles">mapping background tiles</a> from Cloudmade </li>
<li> when zoomed out, there is code to <a href="https://secure.mysociety.org/cvstrac/rlog?f=mysociety/iso/bin/cull_stations.py">cull which stations</a> are used to draw tiles </li>
<li> of course, a <a href="https://secure.mysociety.org/cvstrac/rlog?f=mysociety/iso/bin/test-run">bunch of test code</a> </li>
</ul>
<p>Thanks to everyone who helped make Mapumental, we couldn&#8217;t have done it without lots of clever people.</p>
<p>I realise the above is a sketchy overview, so please ask questions in the comments, and I&#8217;ll do my best to answer them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mysociety.org/2009/08/18/how-mapumental-works/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

