<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<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>tfl &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/tfl/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Fri, 10 Apr 2026 08:23:05 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>tfl &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Singing the TfL Blues]]></title>
		<link>https://shkspr.mobi/blog/2025/02/singing-the-tfl-blues/</link>
					<comments>https://shkspr.mobi/blog/2025/02/singing-the-tfl-blues/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 17 Feb 2025 12:34:38 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[tfl]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=58204</guid>

					<description><![CDATA[I am a regular user of Transport for London&#039;s services. On my phone I have the TfL Go app for finding my way around the city, and a web shortcut to a specific bus stop so I can find my way home.    Why are they different shades of blue⁉️⁉️⁉️  TfL, like most large organisations, have brand guidelines. It enables them to set a consistent look and feel across their services which, hopefully, makes it…]]></description>
										<content:encoded><![CDATA[<p>I am a regular user of Transport for London's services. On my phone I have the TfL Go app for finding my way around the city, and a web shortcut to a specific bus stop so I can find my way home.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/02/TfL-Blue.png" alt="Two TfL icons with subtly different blue colours." width="480" height="240" class="aligncenter size-full wp-image-58207">

<p>Why are they different shades of blue⁉️⁉️⁉️</p>

<p>TfL, like most large organisations, have brand guidelines. It enables them to set a consistent look and feel across their services which, hopefully, makes it easier for users to identify them. A glowing roundel in the night tells you you're near a tube station, the colours of the lines reassures you that you jumped on the right train, even the font lets you know you're in the right place.</p>

<p>They publish <a href="https://content.tfl.gov.uk/tfl-colour-standard.pdf">the TfL Colour Standard</a> - a short document which explains what all their colours are.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/02/tfl-colours-fs8.png" alt="TfL Colour Guidelines." width="1592" height="868" class="aligncenter size-full wp-image-58206">

<p>If you examine the <a href="https://play.google.com/store/apps/details?id=uk.gov.tfl.gotfl">TfL Go app</a> you'll see that its icon is <code>R0 G25 B168</code> (<code>#0019A8</code>).</p>

<p>But on the web, their <a href="https://tfl.gov.uk/cdn/static/assets/icons/favicon-196x196.png">standard Favicon</a> uses <code>R17 G64 B145</code> (<code>#114091</code>).</p>

<p>Yet <a href="https://tfl.gov.uk/cdn/static/assets/icons/apple-touch-icon-72@2x.png">their Apple Favicon</a> uses <code>R17 G59 B146</code> (<code>#113B92</code>).</p>

<p>Over the years, the colour standard has been refined. <a href="https://ia801704.us.archive.org/32/items/tfl-design-standards/Colour%20Standard%2C%20Issue%201.pdf">Issue 1</a> from 2003 had the corporate blue as <code>R0 G45 B115</code> (<code>#002D73</code>) with a "<a href="https://en.wikipedia.org/wiki/Web_colors#Web-safe_colors">web safe</a>" version of <code>#003399</code>.</p>

<p>By <a href="https://ia601704.us.archive.org/32/items/tfl-design-standards/Colour%20Standard%2C%20Issue%202.pdf">Issue 2</a> in 2007, the corporate colour was set at <code>R0 G25 B168</code>, with a web safe version of <code>#000099</code>.  The same is present in 2007's <a href="https://sucs.org/~cmckenna/transfer/tfl-colour-standard-issue03.pdf">Issue 3</a>.</p>

<p>Given the RGB value has been in set in stone for over 15 years, where does this discrepancy come from?</p>

<p>I don't think it is an accessibility issue. <a href="https://tfl.gov.uk/corporate/website-accessibility/accessibility-statement">TfL have great documentation on how they meet WCAG</a> and I can't see the correct corporate colour causing any issues.</p>

<p>As far as I can tell, the <code>#113B92</code> colour first appeared on the web <a href="https://web.archive.org/web/20120531072545/http://www.tfl.gov.uk/">around 2012</a>.</p>

<p>The <a href="https://web.archive.org/web/20140602022811im_/http://www.tfl.gov.uk/static/-13545301/assets/icons/favicon-196x196.png"><code>#114091</code> Facicon first appeared around 2014</a>.</p>

<p>Along the way, they also had this nifty iPhone icon with, you guessed it, <em>another</em> shade of blue <code>#0044a3</code>.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/02/iphone.png" alt="Glossy iOS icon with a train on it." width="144" height="144" class="aligncenter size-full wp-image-58209">

<p>Perhaps it is a conversion issue? What's the <a href="https://en.wikipedia.org/wiki/CMYK_color_model">CMYK</a>?</p>

<p>The <a href="https://content.tfl.gov.uk/tfl-colour-standard.pdf">colour standard</a> says corporate blue is C100 M97 Y3 K3
But the <a href="https://content.tfl.gov.uk/tfl-basic-elements-standards-issue-08.pdf">TfL elements standard</a> says it is C100 M88 Y0 K5.</p>

<p>Both agree that it should be Pantone 072.</p>

<p>Looking at the <a href="https://www.pantone.com/color-finder/Blue-072-C">Pantone website</a> that blue is <code>#1007a0</code>.</p>

<p>Which, If I <a href="https://cmyktool.com/cmyk/90-96-0-37/">convert to CMYK</a> is <code>C90 M96 Y0 K37</code>.</p>

<p>Any way you slice it, that's several completely different shades of blue!</p>

<h2 id="for-you-blue"><a href="https://shkspr.mobi/blog/2025/02/singing-the-tfl-blues/#for-you-blue">For You, Blue</a></h2>

<p>Colours are hard. Humans have varying perceptions of shades and hues. We have several different ways of representing these colours. Applying colour to a screen is different to applying it in paint or fabric.</p>

<p>True consistency across different media is almost impossible.</p>

<p>But, on digital media, having a single colour is a relatively simple <em>technical</em> issue. Pick a single RGB (or <a href="https://en.wikipedia.org/wiki/HSL_and_HSV">HSL</a>) colour and stick to it.</p>

<p>There's no reason that I can fathom that these two icons should be different. If you disagree, please let me know what basic error I have made.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=58204&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2025/02/singing-the-tfl-blues/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Combining 3 transport APIs for one info screen]]></title>
		<link>https://shkspr.mobi/blog/2023/07/combining-3-transport-apis-for-one-info-screen/</link>
					<comments>https://shkspr.mobi/blog/2023/07/combining-3-transport-apis-for-one-info-screen/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 06 Jul 2023 11:34:16 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[eink]]></category>
		<category><![CDATA[nook]]></category>
		<category><![CDATA[rail]]></category>
		<category><![CDATA[tfl]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=46190</guid>

					<description><![CDATA[Last year, I blogged about how I turned an old eReader into an Information Screen.  I&#039;ve since updated the display to show me three different sets of transport information.    At a glance, I can see the next bus, whether there are delays on the Elizabeth Line, and if my regular trains are running.  Here&#039;s how all three APIs work.  Bus  The bus is the easiest one of all. Transport for London (TfL) …]]></description>
										<content:encoded><![CDATA[<p>Last year, I blogged about how I <a href="https://shkspr.mobi/blog/2020/02/turn-an-old-ereader-into-an-information-screen-nook-str/">turned an old eReader into an Information Screen</a>.</p>

<p>I've since updated the display to show me <em>three</em> different sets of transport information.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/06/departure.jpg" alt="An eInk screen which is displaying the times until the next bus, what delays there are on the tube, and then a bunch of train departure times." width="1024" height="768" class="aligncenter size-full wp-image-46191">

<p>At a glance, I can see the next bus, whether there are delays on the Elizabeth Line, and if my regular trains are running.</p>

<p>Here's how all three APIs work.</p>

<h2 id="bus"><a href="https://shkspr.mobi/blog/2023/07/combining-3-transport-apis-for-one-info-screen/#bus">Bus</a></h2>

<p>The bus is the easiest one of all. Transport for London (TfL) have a set of free APIs. No registration required!
You will need to know the ID of your local bus stop. Visit <a href="https://tfl.gov.uk/disambiguation?Input=oxford+circus&amp;DataSetsJson=%5B%5B%22stopPoints%22%2C%22%2Fmaps%2Fbus%3FInput%3D%7B%7Binput%7D%7D%26InputGeolocation%3D%7B%7Blat%7D%7D%2C%7B%7Blon%7D%7D%26searchBoxType%3Dbus%22%5D%2C%5B%22routes%22%2C%22%2F%7B%7Bmode%7D%7D%2Froute%2F%7B%7BlineIds%7D%7D%2F%22%5D%5D&amp;Modes=bus&amp;PlaceHolderText=Bus+route+or+stop+name&amp;InputGeolocation=">the TfL bus search page</a> and search for your local stop. Click the stop on the map.</p>

<p>You'll be taken to a URl like <a href="https://tfl.gov.uk/bus/stop/490000173RF/oxford-circus-stn-margaret-street"></a><a href="https://tfl.gov.uk/bus/stop/490000173RF/oxford-circus-stn-margaret-street">https://tfl.gov.uk/bus/stop/490000173RF/oxford-circus-stn-margaret-street</a> - that will show you the Bus Stop ID (technically the <a href="https://beta-naptan.dft.gov.uk/">NaPTAN ID</a>). In this case <code>490000173RF</code>.</p>

<p>You can then call this API: <a href="https://api.tfl.gov.uk/StopPoint/490000173RF/arrivals"></a><a href="https://api.tfl.gov.uk/StopPoint/490000173RF/arrivals">https://api.tfl.gov.uk/StopPoint/490000173RF/arrivals</a> - which will return JSON like this:</p>

<pre><code class="language-json">[{
    "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
    "id": "-119695796",
    "operationType": 1,
    "vehicleId": "LTZ1049",
    "naptanId": "490000173RF",
    "stationName": "Oxford Circus Stn  / Margaret Street",
    "lineId": "12",
    "lineName": "12",
    "platformName": "RF",
    "direction": "outbound",
    "bearing": "152",
    "destinationNaptanId": "",
    "destinationName": "Dulwich Library",
    "timestamp": "2023-06-29T10:40:18.3147535Z",
    "timeToStation": 1470,
    "currentLocation": "",
    "towards": "Trafalgar Square Or Green Park",
    "expectedArrival": "2023-06-29T11:04:48Z",
    "timeToLive": "2023-06-29T11:05:18Z",
    "modeName": "bus",
    "timing": {
        "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
        "countdownServerAdjustment": "-00:00:02.7011995",
        "source": "2023-06-29T07:28:52.918Z",
        "insert": "2023-06-29T10:40:01.313Z",
        "read": "2023-06-29T10:39:58.591Z",
        "sent": "2023-06-29T10:40:18Z",
        "received": "0001-01-01T00:00:00Z"
    }
}, {
    "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
    "id": "-1460579610",
    "operationType": 1,
    "vehicleId": "LTZ1447",
    "naptanId": "490000173RF",
    "stationName": "Oxford Circus Stn  / Margaret Street",
    "lineId": "12",
    "lineName": "12",
</code></pre>

<p>Hopefully the entity names are self-explanatory. If you need a specific route, you will need to filter on the <code>lineId</code>'s value.</p>

<p>Personally, I use <code>timeToStation</code> to see how long until the bus arrives. If it's less than a couple of minutes, I don't display it.</p>

<h2 id="crossrail"><a href="https://shkspr.mobi/blog/2023/07/combining-3-transport-apis-for-one-info-screen/#crossrail">CrossRail</a></h2>

<p>Again, I am overjoyed that TfL have a free API which lets you check the status of various tube lines.</p>

<p>The Elizabeth Line's status can be found at <a href="https://api.tfl.gov.uk/Line/elizabeth/status"></a><a href="https://api.tfl.gov.uk/Line/elizabeth/status">https://api.tfl.gov.uk/Line/elizabeth/status</a> - can you guess the URl for the other lines 😉?</p>

<p>And, again, we get back some fairly self-explanatory JSON:</p>

<pre><code class="language-json">[{
    "$type": "Tfl.Api.Presentation.Entities.Line, Tfl.Api.Presentation.Entities",
    "id": "elizabeth",
    "name": "Elizabeth line",
    "modeName": "elizabeth-line",
    "disruptions": [],
    "created": "2023-06-27T12:37:57.107Z",
    "modified": "2023-06-27T12:37:57.107Z",
    "lineStatuses": [{
        "$type": "Tfl.Api.Presentation.Entities.LineStatus, Tfl.Api.Presentation.Entities",
        "id": 0,
        "lineId": "elizabeth",
        "statusSeverity": 9,
        "statusSeverityDescription": "Minor Delays",
        "reason": "Minor delays between Stratford and Shenfield due to a an earlier signal failure at Tottenham Court Road. GOOD SERVICE on the rest of the line. ",
        "created": "0001-01-01T00:00:00",
        "validityPeriods": [{
            "$type": "Tfl.Api.Presentation.Entities.ValidityPeriod, Tfl.Api.Presentation.Entities",
            "fromDate": "2023-06-29T10:30:50Z",
            "toDate": "2023-06-30T00:29:00Z",
            "isNow": true
        }],
        "disruption": {
            "$type": "Tfl.Api.Presentation.Entities.Disruption, Tfl.Api.Presentation.Entities",
            "category": "RealTime",
            "categoryDescription": "RealTime",
            "description": "Minor delays between Stratford and Shenfield due to a an earlier signal failure at Tottenham Court Road. GOOD SERVICE on the rest of the line. ",
            "affectedRoutes": [],
            "affectedStops": [],
            "closureText": "minorDelays"
        }
    }],
    "routeSections": [],
    "serviceTypes": [{
        "$type": "Tfl.Api.Presentation.Entities.LineServiceTypeInfo, Tfl.Api.Presentation.Entities",
        "name": "Regular",
        "uri": "/Line/Route?ids=Elizabeth line&amp;serviceTypes=Regular"
    }],
    "crowding": {
        "$type": "Tfl.Api.Presentation.Entities.Crowding, Tfl.Api.Presentation.Entities"
    }
}]
</code></pre>

<p>You can grab the text out of there for easy display.</p>

<h2 id="train-times"><a href="https://shkspr.mobi/blog/2023/07/combining-3-transport-apis-for-one-info-screen/#train-times">Train Times</a></h2>

<p>This is the only pain-in-the-arse service.  It uses <a href="https://realtime.nationalrail.co.uk/OpenLDBWS/">National Rail's Live Departure Boards Web Service (LDBWS)</a>. This is an XML SOAP API which requires credentials.</p>

<p><a href="https://realtime.nationalrail.co.uk/OpenLDBWSRegistration/Registration">Register for an API token at National Rail's site</a>.</p>

<p>Find the three letter CRS code for your departure and arrival station <a href="https://www.nationalrail.co.uk/find-a-station/">on the National Rail website</a>.</p>

<p>I use the <a href="https://lite.realtime.nationalrail.co.uk/OpenLDBWS/#GetDepBoardWithDetailsHeader"><code>GetDepBoardWithDetailsHeader()</code></a> API call. For example: <code>GetDepBoardWithDetails(20, "WWA", "LBG", "to")</code> gets the next 20 trains <em>from</em> Woolwich Arsenal <em>to</em> London Bridge.</p>

<p>There are <a href="https://github.com/orgs/openraildata/repositories?type=all">OpenLDBWS libraries available in most major programming languages</a>. Don't bother writing your own!</p>

<p>There's more discussion online about <a href="https://wiki.openraildata.com/index.php/OpenLDBWS_Troubleshooting">how to test and use OpenLDBWS</a>.</p>

<p>Once you've got a response, you can filter it for the specific trains you're interested in.</p>

<h2 id="putting-it-all-together"><a href="https://shkspr.mobi/blog/2023/07/combining-3-transport-apis-for-one-info-screen/#putting-it-all-together">Putting it all together</a></h2>

<p>Well, that's up to you Sparky! Personally, I have a hodge-podge of PHP building it into a format suitable for my ancient eInk screen. You can do what you like!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=46190&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/07/combining-3-transport-apis-for-one-info-screen/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Force Directed Graph of the London Tube Map - including CrossRail!]]></title>
		<link>https://shkspr.mobi/blog/2021/02/force-directed-graph-of-the-london-tube-map-including-crossrail/</link>
					<comments>https://shkspr.mobi/blog/2021/02/force-directed-graph-of-the-london-tube-map-including-crossrail/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 14 Feb 2021 12:30:13 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[Open Data]]></category>
		<category><![CDATA[tfl]]></category>
		<category><![CDATA[tube]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=38123</guid>

					<description><![CDATA[Force Directed Graphs of the London Underground have been done many times before - but I think I&#039;m the first person to add the new Elizabeth Line (CrossRail).  I&#039;ve also created a JSON graph of all of London&#039;s rail services - including DLR, Trams, C2C, ThamesLink etc.  Demo     Play with it yourself Grab the code from GitLab I&#039;ve also created a version with every London station and train line.  …]]></description>
										<content:encoded><![CDATA[<p>Force Directed Graphs of the London Underground have been done many times before - but I think I'm the first person to add the new Elizabeth Line (CrossRail).</p>

<p>I've also created <a href="https://gitlab.com/edent/force-directed-london-tube-map/-/blob/master/TfL%20Graph.json">a JSON graph of all of London's rail services</a> - including DLR, Trams, C2C, ThamesLink etc.</p>

<h2 id="demo"><a href="https://shkspr.mobi/blog/2021/02/force-directed-graph-of-the-london-tube-map-including-crossrail/#demo">Demo</a></h2>

<iframe title="Force Directed Graph of London Underground - including CrossRail - using D3." width="620" height="349" src="https://www.youtube.com/embed/gclRxDKlCEY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<ul>
<li><a href="https://edent.gitlab.io/force-directed-london-tube-map/force.html">Play with it yourself</a></li>
<li><a href="https://gitlab.com/edent/force-directed-london-tube-map/">Grab the code from GitLab</a></li>
<li>I've also created a version with <a href="https://edent.gitlab.io/force-directed-london-tube-map/full.html"><em>every</em> London station and train line</a>.</li>
</ul>

<h2 id="limitations"><a href="https://shkspr.mobi/blog/2021/02/force-directed-graph-of-the-london-tube-map-including-crossrail/#limitations">Limitations</a></h2>

<ul>
<li>This is a quick weekend hack - don't expect polished code or performance!</li>
<li>"Overlapping" lines don't show. So where a route is served by multiple lines, you'll only see one of them.</li>
<li>Zoom is a bit shonky.</li>
<li>Relies on an older version of D3 (V5).</li>
</ul>

<h2 id="background"><a href="https://shkspr.mobi/blog/2021/02/force-directed-graph-of-the-london-tube-map-including-crossrail/#background">Background</a></h2>

<p>Drawing the Tube map as a graph is a popular pastime. See these prior arts:</p>

<ul>
<li>"<a href="http://blogs.casa.ucl.ac.uk/2011/09/01/force-directed-graph-of-tube-lines/">Force-directed graph of tube lines</a>" by Martin Zaltz Austwick (2011)</li>
<li>"<a href="https://www.researchgate.net/figure/The-London-Underground-map-with-a-focus-on-Green-Park-created-using-the-method-described_fig2_320371151">Graph Drawing by Weighted Constraint Relaxation</a>" (2017)</li>
<li>"<a href="https://www.linkedin.com/pulse/what-would-london-tube-map-look-like-data-scientist-designed-mcnulty/">What would the London Tube Map look like if Data Scientists designed it?</a>" by Keith McNulty (2018)</li>
<li>"<a href="https://neo4j.com/blog/going-underground-graphing-pathfinding-london-tube-lines/">Going Underground: Graphing and Pathfinding London Tube Lines</a>" by Joe Depeau (2019)</li>
<li>And many others.</li>
</ul>

<p>I forked some code from <a href="https://gist.github.com/mapio/53fed7d84cd1812d6a6639ed7aa83868">Massimo Santini</a>.</p>

<p>Chris Bell maintains an excellent <a href="https://www.doogal.co.uk/london_stations.php">CSV of all London stations and their connections</a></p>

<p>The official colours for each line can be found in <a href="https://web.archive.org/web/20210214123302/https://content.tfl.gov.uk/tfl-colour-standards-issue04.pdf">TfL's colour branding guide</a> and in hex versions at <a href="https://oobrien.com/2012/01/tube-colours/">Oliver O'Brien's site</a>.</p>

<h2 id="whats-next"><a href="https://shkspr.mobi/blog/2021/02/force-directed-graph-of-the-london-tube-map-including-crossrail/#whats-next">What's next</a></h2>

<p>Possible ideas - feel free to <a href="https://gitlab.com/edent/force-directed-london-tube-map/">contribute on GitLab</a>.</p>

<ul>
<li>Experiment with different layout algorithms.</li>
<li>Weight links according to speed, distance, business, or some other metric.</li>
<li>Better colour options for non-TfL lines.</li>
<li>More efficient code.</li>
</ul>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=38123&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2021/02/force-directed-graph-of-the-london-tube-map-including-crossrail/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[When is an Electric Car not an Electric Car? When TfL say so!]]></title>
		<link>https://shkspr.mobi/blog/2019/12/when-is-an-electric-car-not-an-electric-car-when-tfl-say-so/</link>
					<comments>https://shkspr.mobi/blog/2019/12/when-is-an-electric-car-not-an-electric-car-when-tfl-say-so/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Tue, 03 Dec 2019 07:08:13 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[pcn]]></category>
		<category><![CDATA[tfl]]></category>
		<category><![CDATA[ulez]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=32958</guid>

					<description><![CDATA[Another middle-class rant about an easily solved problem.  Or, how a software bug nearly cost me £80.  Things you should know...   London has a Congestion Zone. You have to pay £11 to drive through it. If you have an EV (Electric Vehicle), you don&#039;t have to pay the Congestion Charge.   Easy, right?  Not quite.  In order to get the 100% discount, you have to register your vehicle and pay a £10 per …]]></description>
										<content:encoded><![CDATA[<p>Another middle-class rant about an easily solved problem.  Or, how a software bug nearly cost me £80.</p>

<p>Things you should know...</p>

<ol>
<li>London has a Congestion Zone. You have to pay £11 to drive through it.</li>
<li>If you have an EV (Electric Vehicle), <a href="https://tfl.gov.uk/modes/driving/congestion-charge/discounts-and-exemptions">you don't have to pay the Congestion Charge</a>.</li>
</ol>

<p>Easy, right?  Not quite.  In order to get the 100% discount, you have to register your vehicle and pay a £10 per year charge.  A bit annoying but basically fair.  So, I registered. That's where the problems began.</p>

<p>TfL (Transport for London) demanded a scanned copy of my car's <a href="https://www.carbuyer.co.uk/tips-and-advice/160024/what-is-a-v5c-all-you-need-to-know-about-the-logbook">V5C</a> - a government document which, amongst other things, tells you what fuel type your vehicle is.  I got a scan of it from my vehicle lease company, uploaded it, paid £10, and got a receipt. Nifty.</p>

<p>A few days later I drove through the Conestion Zone and got hit by a fine. WTAF?</p>

<p>If I'd read the small print, I would have seen that it can take <em>up to 10 days</em> for the exemption to be applied to their system.</p>

<p>Why? How does it take so long to add an entry into a database?  I <em>suspect</em> it's because someone has to manually check the V5C to check it says the car is electric.  And, in case of forgery, double check the information is correct with an official source.</p>

<p>But, here's the thing... If they're going to check my vehicle - why bother asking me in the first place?</p>

<p>If you use the <a href="https://vehicleenquiry.service.gov.uk/">Government's vehicle checking service</a>, you can see that my car is an EV.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/11/Screenshot_2019-10-10-Check-if-a-vehicle-is-taxed-and-has-an-MOT.png" alt="DVLA screen showing vehicle is electric." width="486" height="381" class="aligncenter size-full wp-image-32961">
There's even an <a href="https://dvsa.github.io/mot-history-api-documentation/">API</a> they can use.</p>

<p>Perhaps this is a bit beyond TfL's technical team? Nope!</p>

<p>London has an Ultra-Low Emissions Zone.  If you want to drive a polluting vehicle in London, you have to pay.  If you drive an EV, it's free.</p>

<p>But here's the thing with the ULEZ - you <em>don't have to register!</em></p>

<p>If you go to the <a href="https://tfl.gov.uk/modes/driving/check-your-vehicle-35896">ULEZ exemption checker</a> and enter your EV's numberplate, it will tell you that the vehicle is exempt because it is electric.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/11/Screenshot_2019-10-10-Check-your-vehicle.png" alt="TfL screen saying the vehicle is exempt." width="711" height="460" class="aligncenter size-full wp-image-32960">

<p><strong>WHY THE BLOODY HELL DO I HAVE TO PAY TO TELL YOU IT IS EXEMPT FROM THE CONGESTION CHARGE WHEN YOU AUTOMATICALLY KNOW IT IS EXEMPT FROM THE ULEZ CHARGE!?!?!?!?</strong></p>

<p><em>...ahem...</em></p>

<p>Anyway, I wrote a grovelling email, and TfL graciously used their discretion to waive the charges.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/11/TfL-Letter.jpeg" alt="Letter saying they'll use their discretion to waive the charges." width="1200" height="327" class="aligncenter size-full wp-image-32962"></p>

<h2 id="what-have-we-learned"><a href="https://shkspr.mobi/blog/2019/12/when-is-an-electric-car-not-an-electric-car-when-tfl-say-so/#what-have-we-learned">What have we learned?</a></h2>

<p>This isn't a "don't make me think" situation.  It's a "do this automatically for me" situation.</p>

<p>If you can automatically get the information from somewhere - don't ask the user for it!</p>

<p>When one part of your system works automatically, and another part doesn't - fix it!</p>

<p>If something is going to take an unexpectedly long time, make it extremely clear to the user.</p>

<p>Never drive through London.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=32958&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2019/12/when-is-an-electric-car-not-an-electric-car-when-tfl-say-so/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[The Great(er) Bear - using Wikidata to generate better artwork]]></title>
		<link>https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/</link>
					<comments>https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 01 Nov 2019 07:18:50 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[NaBloPoMo]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tfl]]></category>
		<category><![CDATA[wikipedia]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=32337</guid>

					<description><![CDATA[One of my favourite works of art is The Great Bear by Simon Patterson.    At first glance, it appears to be a normal London Tube map. But look closer...    Cool! But there is something about it which has always bothered me. Each Tube line represents a theme - therefore, a station at the intersection of multiple lines should be represented by someone who matches all of those themes.  For example,…]]></description>
										<content:encoded><![CDATA[<p>One of my favourite works of art is <a href="https://www.tate.org.uk/art/artworks/patterson-the-great-bear-p77880">The Great Bear</a> by Simon Patterson.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Great-Bear-512.png" alt="A map of the London Underground - entitled The Great Bear." width="512" height="402" class="aligncenter size-full wp-image-32343">

<p>At first glance, it appears to be a normal London Tube map. But look closer...</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Great-Bear-Detail.png" alt="Close up of the artwork. All the lines have been renamed by a theme." width="512" height="512" class="aligncenter size-full wp-image-32342">

<p>Cool! But there is something about it which has always bothered me. Each Tube line represents a theme - therefore, a station at the intersection of multiple lines should be represented by someone who matches <em>all</em> of those themes.</p>

<p>For example, here's Baron's Court - the intersection of the Explorer line and the Saint line - represented by <a href="https://en.wikipedia.org/wiki/Saint_Ursula">Saint Ursula</a>. 
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/St-Ursula.png" alt="Saint Ursula Station." width="71" height="106" class="aligncenter size-full wp-image-32341">
She is <em>just</em> an saint - she has nothing to do with exploring. This artwork is <em>wrong!</em></p>

<p>So, can we write something to query Wikidata to generate a <em>more accurate artwork?</em><br>
Because accuracy is my aesthetic.</p>

<h3 id="jump-straight-to-the-finished-product-and-skip-all-the-geeky-details"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#go-go-go">Jump straight to the finished product and skip all the geeky details</a>!<a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#jump-straight-to-the-finished-product-and-skip-all-the-geeky-details">🔗</a></h3>

<h2 id="a-brief-guide-to-sparql"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#a-brief-guide-to-sparql">A brief guide to SPARQL</a></h2>

<p>Wikipedia holds structured data about people and things. It uses <a href="https://en.wikipedia.org/wiki/SPARQL">SPARQL</a> to query that data. It is a bit complex to use, but a valuable skill.</p>

<p>For example, this query finds people who are explorers and also saints.</p>

<pre><code class="language-sparql">SELECT DISTINCT ?person ?personLabel WHERE {
  ?person wdt:P106 wd:Q11900058 . # People whose occupation (P106) is explorer (Q11...)
  ?person wdt:P411 wd:Q43115      # People whose canonization status (P411) is sainthood (Q43...)

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
  }
}
</code></pre>

<p><a href="https://w.wiki/57h">The result is just <strong>four</strong> people</a>.  And that's where the problem starts. Simon Patterson chose categories for the lines which often don't have <em>any</em> intersections. There is no one who is an Italian Artist who is also a Saint and <em>also</em> a Footballer.</p>

<p>So, to create a more accurate artwork, we'll need different categories.</p>

<h2 id="nodes"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#nodes">Nodes</a></h2>

<p>One of the first things we need to do is understand the Tube map as a graph - with stations as nodes and lines as edges.</p>

<p>We want to know:</p>

<ol>
<li>Which stations are on which lines</li>
<li>Which stations are on <em>multiple</em> lines</li>
<li>Which station has the <em>most</em> lines</li>
<li>How many stations are on each line</li>
</ol>

<p>Thankfully <a href="http://markdunne.github.io/2016/04/10/The-London-Tube-as-a-Graph/">Mark Dunne has done lots the hard work for us, and provided a great tutorial</a>. Sadly, the data are about 5 years out of date.</p>

<p>Alternatively, the TfL API has lots of the information we need. Here's the call for all the stations on the Bakerloo line - <a href="https://api.tfl.gov.uk/line/bakerloo/stoppoints"></a><a href="https://api.tfl.gov.uk/line/bakerloo/stoppoints">https://api.tfl.gov.uk/line/bakerloo/stoppoints</a></p>

<p>Let's throw some Python down to grab the data we need. First, how many stations are there on the Bakerloo line?</p>

<pre><code class="language-python">import requests
r = requests.get("https://api.tfl.gov.uk/line/bakerloo/stoppoints")
stations = r.json()
count = len(stations)
print("There are " + str(count) + " stations on the Bakerloo Line")
</code></pre>

<p>Next, let's get the lines for each station:</p>

<pre><code class="language-python">import requests
r = requests.get("https://api.tfl.gov.uk/line/bakerloo/stoppoints")
stations = r.json()

for station in stations:
    stationName = station["commonName"]
    lineGroups   = station["lineModeGroups"]
    for lineGroup in lineGroups:
        modeName = lineGroup["modeName"]
        if (modeName=="tube"):
            lineCount = len(lineGroup["lineIdentifier"])

    print(stationName + "," + str(lineCount))
</code></pre>

<p>The line names can be found at <a href="https://api.tfl.gov.uk/Line/Mode/tube"></a><a href="https://api.tfl.gov.uk/Line/Mode/tube">https://api.tfl.gov.uk/Line/Mode/tube</a></p>

<h2 id="brief-survey-of-the-problem"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#brief-survey-of-the-problem">Brief survey of the problem...</a></h2>

<p>270 Tube Stations(!) across 11 lines. King's Cross St Pancras has the most lines - 6.</p>

<p>There a few anomalies in the data. It lists Edgware Road as two separate stations - even though it's really one station.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Edgeware-Road.png" alt="Edgware Road station on a map." width="381" height="126" class="aligncenter size-full wp-image-32346">
The same problem is present on Hammersmith and Paddington. Cleaning data is "fun"...</p>

<p>The categories are also challenging. This is how many times the Bakerloo line intersects with the other lines</p>

<pre><code class="language-json">'bakerloo': {
    'circle': 3,
    'hammersmith-city': 1,
    'jubilee': 2,
    'metropolitan': 1,
    'northern': 4,
    'district': 2,
    'central': 1,
    'victoria': 1,
    'piccadilly': 1,
    'waterloo-city': 1
},
</code></pre>

<p>That is - the Bakerloo line touches <em>every</em> other line at least once.  As do the Northern, Central, and Jubilee lines.  Those lines will need to contain some very broad categories.</p>

<h2 id="back-to-wikidata"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#back-to-wikidata">Back to Wikidata</a></h2>

<p>So, we want to replace each station's name with a human's name. We need attributes which are wide-spread enough to get good coverage in the data - and quirky enough to be interesting.  I'd also like to keep some of the original categories:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Key-to-Lines.png" alt="engineers, philosophers, explorers, planets, journalists, footballers, musicians, film actors, saints, Italian artists, sinologues (Chinese scholars), comedians and 'Louis' (French kings)." width="451" height="248" class="aligncenter size-full wp-image-32348">

<p>I suspect there's a way to interrogate SPARQL to find a list of categories based on a graph - but I'm not clever enough to do that. I started off with an entirely arbitrary set of attributes:</p>

<ul>
<li>Academy Award Winners</li>
<li>Left-handed people</li>
<li>Nobel Prize Winners</li>
<li>People born in London</li>
<li>Educated at UEA (the university where my wife and I first met)</li>
<li>Female Computer Scientists</li>
<li>Saints</li>
<li>Explorers</li>
<li>Journalists</li>
<li>Sinologues</li>
<li>Comedians</li>
</ul>

<p>Here's the query for Comedians who were educated at UEA and were born in London:</p>

<pre><code class="language-sparql">SELECT DISTINCT ?person ?personLabel WHERE {
  ?person wdt:P69 wd:Q1045828 .
  ?person wdt:P106 wd:Q245068 .
  ?person wdt:P19 wd:Q84
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
  }
}
</code></pre>

<p>One result - <a href="https://en.wikipedia.org/wiki/Doc_Brown_(rapper)">Doc Brown</a>. There are no saints who have won an Oscar, and data about left-handed people is suspiciously absent. The categories will have to be completely rejigged.</p>

<h2 id="keep-it-simple-stupid"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#keep-it-simple-stupid">Keep It Simple, Stupid</a></h2>

<p>I figured the easiest thing to do would be to start from a well data'd individual and work backwards from there.</p>

<pre><code class="language-sparql">SELECT DISTINCT ?person ?personLabel WHERE {  
  ?person wdt:P108 wd:Q35794  . #Employed by Cambridge University #Bakerloo
  ?person wdt:P19  wd:Q84     . #Born in London                   #Circle
  ?person wdt:P463 wd:Q123885 . #Member of the Royal Society      #Hammersmith&amp;City
  ?person wdt:P106 wd:Q121594 . #Professor                        #Waterloo&amp;City
  ?person wdt:P106 wd:Q205375 . #Inventor                         #Metropolitan
  ?person wdt:P106 wd:Q81096  . #Engineer                         #District
  ?person wdt:P106 wd:Q4964182. #Philosopher                      #Piccadilly
  ?person wdt:P106 wd:Q11063  . #Astronomer                       #Victoria
  ?person wdt:P106 wd:Q170790 . #Mathematician                    #Jubilee
  ?person wdt:P106 wd:Q82594  . #Computer Science                 #Northern
  ?person wdt:P106 wd:Q188094 . #Economist                        #Central

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
  }
}
</code></pre>

<p>The <a href="https://w.wiki/5BF">result of that query</a> is the inventor of steampunk, <a href="http://sydneypadua.com/2dgoggles/">Charles Babbage</a>!</p>

<p>We can do a reverse query. <a href="https://w.wiki/5EW">Given these people, which common properties do they have</a>?</p>

<pre><code class="language-sparql">SELECT ?property ?propnameLabel ?value_Label
where
{ 
  wd:Q46633 ?property ?value . #Babbage
  wd:Q7259  ?property ?value . #Lovelace
  ?propname wikibase:directClaim ?property . # constrain to directClaims
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
                         ?value rdfs:label ?value_Label .
                         ?propname rdfs:label ?propnameLabel .}
} order by ?property
</code></pre>

<p>(Thanks to <a href="https://twitter.com/Tagishsimon/status/1142947487520608258">TagishSimon for the help</a>)</p>

<p>This is where things got trickier! Most of the major intersections didn't have any candidates other than Babbage - truly a Renaissance Man! - so I expanded "born in London" to "born in the UK".</p>

<p>We can't use <code>?person wdt:P27  wd:Q145</code> becuase that only covers the <em>current</em> United Kingdom - not <a href="https://www.wikidata.org/wiki/Q161885">The Kingdom of Great Britain (1707–1801)</a> nor <a href="https://www.wikidata.org/wiki/Q174193">The United Kingdom of Great Britain and Ireland (1801 to 1927)</a></p>

<p>The correct query seems to be ensuring the place of birth is within the current administrative territory of UK:</p>

<pre><code class="language-sparql">?person wdt:P19 ?pob . ?pob wdt:P131* wd:Q145 .
</code></pre>

<p>But you can also use a <code>UNION</code></p>

<pre><code class="language-sparql">{?person wdt:P27 wd:Q145} UNION {?person wdt:P27 wd:Q174193} UNION {?person wdt:P27 wd:Q161885} .
</code></pre>

<p>That got closer - but still not enough.</p>

<h2 id="unions"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#unions">Unions</a></h2>

<p>Wikidata is fickle. Someone may have an <em>occupation</em> as a "computer scientist" or they may <em>work in the field</em> of "computer science".  SPARQL eschews the <code>or</code> operator, and uses <code>UNION</code>:</p>

<pre><code class="language-sparql">{?person wdt:P101 wd:Q21198} #Field of Work CS
UNION
{?person wdt:P106 wd:Q82594} #Occupation CS
</code></pre>

<p>I'm beginning to see why the original artist was more liberal in his accuracy!</p>

<h2 id="sorting"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#sorting">Sorting</a></h2>

<p>I want the map to contain notable people. There are a couple of ways to assess the "notability" of a Wikidata subject. I've chosen to use "<a href="https://www.wikidata.org/wiki/Help:Sitelinks">sitelinks</a>" - that shows how many languages their article is available in.  It's a crude, but quick method.</p>

<p>Here's it in action:</p>

<pre><code class="language-sparql">SELECT DISTINCT ?person ?personLabel ?sitelinks WHERE {
  ?person wdt:P106 wd:Q205375 . #Inventor
  ?person wikibase:sitelinks ?sitelinks .

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
  }
} ORDER BY DESC (?sitelinks)
</code></pre>

<h2 id="correcting-for-bias"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#correcting-for-bias">Correcting for Bias</a></h2>

<p>Wikipedia has an <a href="https://en.wikipedia.org/wiki/Gender_bias_on_Wikipedia">acknowledged male bias</a>. So I used SPARQL's <code>FILTER</code> property to great effect:</p>

<pre><code class="language-sparql">FILTER ( !EXISTS{ ?person wdt:P21 wd:Q6581097 }) 
</code></pre>

<p>It says to return anyone without the <a href="https://www.wikidata.org/wiki/Property:P21">sex/gender</a> of "Male". (Yes, I know things are a bit more complicated than that - but this is a good way to return women, intersex people, agender, transgender folk etc).</p>

<p>If no non-men were returned, I repeated the search but omitted the filter.</p>

<p>Because I used "Born in the UK" as a filter, there is probably a bias towards white people. And people who become Professors or members of the Royal Society may also be the product of a biased society.  There are many other filters and categories I could have chosen - and I hope some of you will create maps for your own cultures and societies.</p>

<h2 id="p-p-p-pickup-some-python"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#p-p-p-pickup-some-python">P-p-p-pickup Some Python</a></h2>

<p>There are several Python libraries for SPARQL, I used <a href="https://github.com/rdflib/sparqlwrapper">sparqlwrapper</a>.</p>

<p>Here's a sample query</p>

<pre><code class="language-python">from SPARQLWrapper import SPARQLWrapper, JSON

sparql = SPARQLWrapper("https://query.wikidata.org/sparql")
sparql.setQuery("""
    SELECT DISTINCT ?person ?personLabel ?sitelinks WHERE {
        ?person wdt:P106 wd:Q81096 . #Engineer
        ?person wdt:P20  wd:Q84    . #Died in London
        ?person wikibase:sitelinks ?sitelinks .
        SERVICE wikibase:label {
            bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
        }
    } ORDER BY DESC (?sitelinks)
""")
sparql.setReturnFormat(JSON)
results = sparql.query().convert()

for result in results["results"]["bindings"]:
    print('%s %s %s' % (result["person"]["value"], result["personLabel"]["value"], result["sitelinks"]["value"]))
</code></pre>

<h2 id="plotting-onto-an-image"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#plotting-onto-an-image">Plotting onto an image</a></h2>

<p>Let's leave who and what we select for now, and work out how we draw the eventual results.</p>

<p>We could do all sorts of clever things plotting out locations - but I decided to cheat!</p>

<p>There is <a href="https://tfl.gov.uk/Modules/TubeMap?nightMode=false">a fully semantic SVG of the tube lines</a> (Thanks to <a href="http://misc.oomap.co.uk/misc/tubemap/">Oliver O’Brien for finding it</a>).</p>

<p>I removed all the lines I didn't want, then I was able to search &amp; replace station names with my preferred text.</p>

<h3 id="search-and-replace"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#search-and-replace">Search And Replace</a></h3>

<p>Well... sort of! Charing Cross Station has an ID of <code>940GZZLUCHX</code>.</p>

<p>On the map it is:</p>

<pre><code class="language-svg">&lt;g id="s-940gzzluchx_label"&gt;
    &lt;g id="s-940gzzluchx_label_1_"&gt;
        &lt;text transform="matrix(1 0 0 1 515.8999 487.6963)"&gt;
            &lt;tspan x="0" y="0"&gt;Charing&lt;/tspan&gt;
            &lt;tspan x="4.3" y="4.5"&gt;Cross&lt;/tspan&gt;
        &lt;/text&gt;
    &lt;/g&gt;
    &lt;polygon id="s-940gzzluchx_nr" fill="#EE3124" points="514.3,487.7 512.6,486.9 515,486.9 515,486.4 512.5,486.4 513.8,485.8 515,485.8 515,485.3 513.8,485.3 512.2,484.6 511,484.6 512.7,485.3 510.2,485.3 510.2,485.8 512.7,485.8 511.4,486.4 510.2,486.4 510.2,486.9 511.5,486.9 513.1,487.7 "/&gt;
&lt;/g&gt;
</code></pre>

<p>Whereas the SVG element for North Wembley is just:</p>

<pre><code class="language-svg">&lt;text id="s-940gzzlunwy_label_2_" transform="matrix(1 0 0 1 282.1489 289.1079)"&gt;North Wembley&lt;/text&gt;
</code></pre>

<p>Again, I'm not quite clever enough to work out a way to reliably find the inner text for an element which may be inside (or not) several other similarly named elements.</p>

<p>So a lot of repetitive search-and-replace it is. <em>*sigh*</em></p>

<p>I also need to manually place some of the station names, because they're a different length to the originals.  <em>*double-sigh*</em></p>

<h2 id="putting-it-all-together"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#putting-it-all-together">Putting it all together</a></h2>

<p>I have great pleasure in revealing to you "<a href="https://shkspr.mobi/svg/Great(er)%20Bear.svg">The Great(er) Bear</a>"!</p>

<iframe src="https://shkspr.mobi/svg/Great(er)%20Bear.svg" width="1024" height="800"></iframe>

<p><a href="https://shkspr.mobi/svg/Great(er)%20Bear.svg">See the full sized version</a>.</p>

<h2 id="copyright"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#copyright">Copyright</a></h2>

<p>OK gang, turns out that copyright law is even trickier than computer code!  I've spoken to Simon Patterson and he is happy for me to host a not-for-profit version of this piece of art which is heavily indebted to his original.</p>

<p><a href="https://en.wikipedia.org/wiki/London_Underground_anagram_map">TfL has been litigious in the past</a> when it comes to derivative maps.  I tried contacting them several times, but didn't receive any clear answers as to whether I could do this.</p>

<p>The data that I used to generate the art is "Powered by TfL Open Data" and provided under <a href="https://tfl.gov.uk/corporate/terms-and-conditions/transport-data-service">OGLv2</a>. It may contain OS data © Crown copyright and database rights 2016.</p>

<p><a href="https://tfl.gov.uk/info-for/suppliers-and-contractors/font-requests">The original font is tightly controlled</a>. So I've used a freely available font called <a href="https://www.fontsquirrel.com/fonts/hammersmith-one">Hammersmith One</a> which is broadly similar.</p>

<p>Lots of people create modified tube maps:</p>

<ul>
<li><a href="https://www.inthebook.com/en-gb/literary-tube-map/">The Literary Tube Map</a> - putting authors on the map</li>
<li><a href="https://www.reddit.com/r/CasualUK/comments/cefrwe/tube_map_with_the_cheapest_pint_at_the_closest_pub/">Tube Map of Beer Prices</a></li>
<li><a href="https://secretldn.com/tube-noise-map-london/">Decibel levels on the Tube</a></li>
<li><a href="https://www.totallymoney.com/mortgages/how-much-salary-buy-london/">House Price Tube Map</a></li>
<li>And no doubt many more.</li>
</ul>

<p>If you want to build your own version of my modified map, <a href="https://gitlab.com/edent/greater-bear">all the data are on my GitLab</a>!</p>

<h3 id="details"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#details">Details</a></h3>

<p>Here are a few interesting close-ups of the map - they may be different from the final version.</p>

<p><img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Detail-of-the-Map.png" alt="A close up of the map." width="482" height="434" class="aligncenter size-full wp-image-32413">
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Central-and-Victoria-Lines.png" alt="Central and Victoria Lines." width="521" height="251" class="aligncenter size-full wp-image-32414">
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Thames.png" alt="River Thames and surrounding stations." width="436" height="179" class="aligncenter size-full wp-image-32416">
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Arabic-and-Russian.png" alt="Tube Lines with Arabic and Russian text." width="776" height="174" class="aligncenter size-full wp-image-32420">
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/06/Key-to-Lines-1.png" alt="Legend on a map." width="771" height="620" class="aligncenter size-full wp-image-32424"></p>

<h2 id="errata"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#errata">Errata</a></h2>

<ul>
<li>The data in Wikidata may be incorrect or incomplete.</li>
<li>I originally didn't restrict it to just humans! So a few weird entries snuck in. Using <code>?person wdt:P31 wd:Q5 .</code> corrected that. But I'm wondering if anyone on the map is <em>fictional</em>...!</li>
<li>Due to timeouts and my crappy coding, I ran the code over several passes on different days. If you run the code, you might get different results.</li>
<li>I didn't use people's names in their original language, I had to back-fill them. I probably missed some. I should have used <a href="https://www.wikidata.org/wiki/Property:P1559"><code>P1559</code></a>.</li>
<li>Even after lots of jiggling of categories, one or two stations kept coming up blank. So I manually added in a few people. Can you spot who they are?</li>
<li>Some people's names were too long for the allotted space, so I have swapped a few people around. Better code would try to keep name length as close to the original as possible.</li>
<li>There's no (intentional) ordering. It might be nice to put people on the line in order of, say, year of birth.</li>
<li>Similarly, there's almost no relation between the people and the places. Although I've contrived to put the author of Mary Poppins somewhere special!</li>
<li>The Hammersmith One font only has a basic set of characters - so non-European languages (and some accents) are in the default font.</li>
<li>The Elizabeth Line / CrossRail hasn't opened yet. I suspect it will be much harder to produce a new map once it goes live. Similarly the DLR and Overground lines are excluded.</li>
<li>The SVG renders well in Firefox, and seems to work OK in Chrome. Please let me know of any glitches.</li>
<li>I've also added a couple of Easter Eggs. Enjoy finding them!</li>
</ul>

<h2 id="thanks"><a href="https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/#thanks">Thanks</a></h2>

<p>Mainly to my wife, Liz, for being very patient with me while I swore at my code.</p>

<p>I am indebted to Simon Patterson for his incredible and inspirational artwork. When it was created in 1992, Wikipedia did not exist. Linked Data stores were in their infancy. It would have been close to impossible to create a semantically correct map. Nothing in my version is intended to take away from Patterson's work and creativity.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=32337&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2019/11/the-greater-bear-using-wikidata-to-generate-better-artwork/feed/</wfw:commentRss>
			<slash:comments>15</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[TfL QR Followup - 5,000 scans per month!]]></title>
		<link>https://shkspr.mobi/blog/2012/04/tfl-qr-followup-5000-scans-per-month/</link>
					<comments>https://shkspr.mobi/blog/2012/04/tfl-qr-followup-5000-scans-per-month/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Tue, 10 Apr 2012 13:21:07 +0000</pubDate>
				<category><![CDATA[qr]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[tfl]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=5515</guid>

					<description><![CDATA[At the start of 2012, I revealed how many scans TfL&#039;s QR campaign was getting.    A lot of comments on Twitter &#38; Google+ dismissed these results as a success.  A typical response was:  70 scans a day? In a city of millions? Rubbish!  This fails to address something that advertisers are conspicuously loathe to reveal - the true &#34;response rate&#34; of any advert is hard to calculate.  How many phone…]]></description>
										<content:encoded><![CDATA[<p>At the start of 2012, <a href="https://shkspr.mobi/blog/2012/01/real-qr-statistics-from-tfl/">I revealed how many scans TfL's QR campaign was getting</a>.</p>

<p><a href="https://shkspr.mobi/blog/wp-content/uploads/2012/01/TfL-QR-Detail.jpg"><img src="https://shkspr.mobi/blog/wp-content/uploads/2012/01/TfL-QR-Detail.jpg" alt="TfL QR Detail" title="TfL QR Detail" width="500" height="375" class="aligncenter size-full wp-image-5205"></a></p>

<p>A lot of comments on Twitter &amp; Google+ dismissed these results as a success.  A typical response was:</p>

<blockquote><p>70 scans a day? In a city of millions? <strong>Rubbish!</strong></p></blockquote>

<p>This fails to address something that advertisers are conspicuously loathe to reveal - the true "response rate" of any advert is hard to calculate.  How many phone calls, visits to a website, or SMS interactions are directly attributable to a regular poster?  No one really knows - or, if they know, they're not telling.</p>

<p>For the <em>first time</em>, we're able to see how many people are reacting to an advert, scanning a code, and then visiting a site.</p>

<p>Currently, TfL's campaign is running at 5,000 scans per month - peaking at 259 scans on April 3rd.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/04/tfl-statistics-5000-clicks.jpg" alt="tfl statistics 5000 clicks" title="tfl statistics 5000 clicks" width="440" height="378" class="aligncenter size-full wp-image-5517"></p>

<p>Or, 16,000 in the last five months.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/04/tfl-statistics-months-16000-clicks.jpg" alt="tfl statistics months 16000 clicks" title="tfl statistics months 16000 clicks" width="440" height="365" class="aligncenter size-full wp-image-5516">
With a rather nice growth in usage in the last few months.</p>

<p>Here come the nay-sayers....</p>

<blockquote><p>But... But.... How many sites is that across? Millions of people, thousands of sites, only a few scans?  <strong>Rubbish!</strong></p></blockquote>

<p>So, I performed a <a href="https://www.whatdotheyknow.com/request/location_of_posters_with_qr_code">Freedom of Information request to TfL</a>.</p>

<p>There were around 400 sites showing these posters in November. That may have changed by now.</p>

<p>Ideally, I would have liked TfL to have created a unique QR code for each poster. That way we could see Putney gets more scans than Waterloo, for example. But I appreciate the logistical difficulties of that!</p>

<h2 id="phone-use"><a href="https://shkspr.mobi/blog/2012/04/tfl-qr-followup-5000-scans-per-month/#phone-use">Phone Use</a></h2>

<p>We also get some interesting statistics about the makes of phones that Londoners use:</p>

<table>
<thead>
<tr><th>Platforms</th><th>Count</th><th>Percentage</th><th>Change from January</th></tr>
</thead>
<tbody><tr><td>iPhone</td><td>9001</td><td>56%</td><td>+12</td></tr>
<tr><td>Android</td><td>3651</td><td>23%</td><td>-4</td></tr>
<tr><td>BlackBerry</td><td>2869</td><td>18%</td><td>-4</td></tr>
<tr><td>Windows</td><td>179</td><td>1%</td><td>-</td></tr>
</tbody></table>

<p>iPhone has surged ahead - at the expense of Android and BlackBerry. Windows Phone 7 still remains a minority sport.</p>

<h2 id="haterz-gonna-h8"><a href="https://shkspr.mobi/blog/2012/04/tfl-qr-followup-5000-scans-per-month/#haterz-gonna-h8">Haterz Gonna H8</a></h2>

<p>Frankly, I don't care too much what the doom-mongers say.  Having over 16,000 responses to a poster campaign sounds like a success to me.  And, best of all, the <a href="http://goo.gl/info/dkooC">data is open for anyone to investigate</a>.</p>

<p>If you disagree with me - I politely ask you to show your workings :-)</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=5515&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2012/04/tfl-qr-followup-5000-scans-per-month/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Real QR Statistics from TfL]]></title>
		<link>https://shkspr.mobi/blog/2012/01/real-qr-statistics-from-tfl/</link>
					<comments>https://shkspr.mobi/blog/2012/01/real-qr-statistics-from-tfl/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sat, 07 Jan 2012 09:35:19 +0000</pubDate>
				<category><![CDATA[qr]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[tfl]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=5203</guid>

					<description><![CDATA[Last year, I suggested that TfL should use QR codes to point to their excellent mobile countdown service.  Looks like someone was listening!  I spotted this poster at a tube station.    Nestled in the corner is a QR code pointing at the mobile bus countdown service!   This is a close-to-perfect use of QR.       Points to a mobile site.     Easy to scan code.     Good call to action.   As I…]]></description>
										<content:encoded><![CDATA[<p>Last year, I suggested that <a href="https://shkspr.mobi/blog/2011/10/qr-and-tfl-countdown/">TfL should use QR codes to point to their excellent mobile countdown service</a>.</p>

<p>Looks like someone was listening!  I spotted this poster at a tube station.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/01/TfL-QR.jpg" alt="TfL QR Poster" title="TfL QR Poster" width="320" height="427" class="aligncenter size-full wp-image-5204">

<p>Nestled in the corner is a QR code pointing at the mobile bus countdown service!
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/01/TfL-QR-Detail.jpg" alt="TfL QR Detail" title="TfL QR Detail" width="500" height="375" class="aligncenter size-full wp-image-5205"></p>

<p>This is a close-to-perfect use of QR.</p>

<ul>
    <li>Points to a mobile site.</li>
    <li>Easy to scan code.</li>
    <li>Good call to action.</li>
</ul>

<p>As I suggested  <a href="https://shkspr.mobi/blog/2011/10/qr-and-tfl-countdown/">in my original post</a>, TfL could customise the code, or print a separate one for each bus stop.  This is, however, an excellent start.</p>

<p>What's particularly useful is that TfL are using the goo.gl URL shortener - meaning <a href="https://shkspr.mobi/blog/2012/01/tsas-qr-statistics/">we can see their statistics</a>!</p>

<h2 id="statistics"><a href="https://shkspr.mobi/blog/2012/01/real-qr-statistics-from-tfl/#statistics">Statistics</a></h2>

<p>There's a dearth of good quality QR statistics which are publicly available.  What is available is often put through the lens of a marketing team.  So it's particularly refreshing to get the data straight from the source.</p>

<p>One simply needs to append any goo.gl URL with a "+" in order to see the statistics.</p>

<p>Let's dive in!</p>

<p>Since their launch in November, the QR codes have been scanned 4,500 times.  I don't know how many of these posters are up, but that seems like a pretty impressive number.</p>

<p>The graph from the last month shows the codes are being scanned around 70 times per day.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2012/01/TfL-QR-statis-graph.png" alt="TfL QR statistics graph" title="TfL QR statistics graph" width="448" height="394" class="aligncenter size-full wp-image-5210"></p>

<p>We can get a rough idea of what sort of phones Londoners use - or, at least, what those who use the buses use.</p>

<table>
<thead>
<tr><th>Platforms</th><th>Count</th></tr>
</thead>
<tbody><tr><td>
iPhone</td><td>
2014</td></tr>
<tr><td>Android</td><td>
1247</td></tr>
<tr><td>BlackBerry</td><td>
987</td></tr>
<tr><td>Windows</td><td>
73</td></tr>
<tr><td>Nokia</td><td>
58</td></tr>
<tr><td>Symbian/3</td><td>
34</td></tr>
<tr><td>iPod</td><td>
15</td></tr>
</tbody></table>

<p>iPhone takes a significant chunk - although not the majority - with 45%. Android coming next at 28%.  BlackBerry still has a strong showing among Londoners with 22%.</p>

<p>I'm unsure whether "Windows" is WP7 or the older "Windows Mobile".  Either way, Nokia's market share has collapsed.</p>

<p>The next interesting thing to look at is which countries the users are from.</p>

<table>
<thead><tr><th>Countries</th><th>Count</th></tr></thead>
<tbody><tr><td>United Kingdom</td><td>
4453</td></tr>
<tr><td>Lithuania</td><td>
15</td></tr>
<tr><td>United States</td><td>
10</td></tr>
<tr><td>Germany</td><td>
2</td></tr>
<tr><td>France</td><td>
2</td></tr>
<tr><td>Italy</td><td>
2</td></tr>
<tr><td>Jordan</td><td>
2</td></tr>
<tr><td>Netherlands</td><td>
2</td></tr>
<tr><td>Spain</td><td>
1</td></tr>
<tr><td>Ireland</td><td>
1</td></tr>
</tbody></table>

<p>As expected, the majority are using UK SIMS.</p>

<p>This doesn't count visitors who are using a local SIM on their stay - but it's still interesting to see where tose whoa re prepared to pay roaming data charges are coming from. Who knew so many Lithuanians loved our bus system...?</p>

<p>As far as I can tell, the Google statistics don't actively prevent duplications - so one enthusiastic Lithuanian could have scanned the code 15 times.</p>

<p>The data aren't entirely rigorous - but do show some interesting trends for QR use in London.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=5203&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2012/01/real-qr-statistics-from-tfl/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[QR and TfL Countdown]]></title>
		<link>https://shkspr.mobi/blog/2011/10/qr-and-tfl-countdown/</link>
					<comments>https://shkspr.mobi/blog/2011/10/qr-and-tfl-countdown/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 17 Oct 2011 14:10:50 +0000</pubDate>
				<category><![CDATA[qr]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[Open Data]]></category>
		<category><![CDATA[tfl]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=4559</guid>

					<description><![CDATA[There are Nineteen thousand, five hundred bus stops in London!  Each one of them is (eventually) going to be upgraded with a new real time bus countdown signs.  If you&#039;ve got an Internet capable phone, you can get real time information for your bus at http://m.countdown.tfl.gov.uk/.  The service has a number of cool features, including geolocation.  The great thing, in my opinion, is that each…]]></description>
										<content:encoded><![CDATA[<p>There are Nineteen <em>thousand</em>, five hundred bus stops in London!</p>

<p>Each one of them is (eventually) going to be upgraded with a <a href="https://tfl.gov.uk/info-for/media/press-releases/2011/october/realtime-bus-information-now-available-anytime-and-anywhere">new real time bus countdown signs</a>.</p>

<p>If you've got an Internet capable phone, you can get real time information for your bus at <a href="https://web.archive.org/web/20111018112455/http://m.countdown.tfl.gov.uk/">http://m.countdown.tfl.gov.uk/</a>.  The service has a number of cool features, including geolocation.</p>

<p>The great thing, in my opinion, is that each stop has a unique URL.  I can bookmark <code>m.countdown.tfl.gov.uk/arrivals/72073</code> and check the buses as my train pulls in to Waterloo Station.</p>

<p>At the moment, there's no signs on bus stops to let people know how they can access the countdown page for their location.  That needs to change.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2011/10/TFL-Bus-Countdown-QR-Branded.png" alt="TFL Bus Countdown QR Branded" title="TFL Bus Countdown QR Branded" width="300" height="300" class="aligncenter size-full wp-image-4560">

<p>Here, I've used the TfL Bus Roundel (<a href="https://web.archive.org/web/20111011123415/https://www.tfl.gov.uk/tfl/corporate/media/logos/default.asp">entirely <strong>without</strong> permission</a>) to show a potential design.</p>

<p>The QR code is designed to be stuck on a bus stop information panel and leads directly to that stop's arrivals page.
</p><div id="attachment_4561" style="width: 330px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-4561" src="https://shkspr.mobi/blog/wp-content/uploads/2011/10/TfL-Countdown-Page.gif" alt="TfL Countdown Page" title="TfL Countdown Page" width="320" height="533" class="size-full wp-image-4561"><p id="caption-attachment-4561" class="wp-caption-text">TfL Countdown Page</p></div><p></p>

<p>Where's the best place to stick this?
<img src="https://shkspr.mobi/blog/wp-content/uploads/2011/10/TfL-QR-too-high.jpg" alt="TfL QR too high" title="TfL QR too high" width="512" height="683" class="aligncenter size-full wp-image-4563"></p>

<p>The above image is an excellent example of what <em>not</em> to do.</p>

<ul>
    <li>The code is physically too high for most people to scan.</li>
    <li>No descriptive text saying what the code does.</li>
    <li>Susceptible to dirt and defacement.</li>
</ul>

<p>It would probably be best to place it directly on the maps provided at each stop.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2011/10/Bus-Spider-QR.jpg" alt="Bus Spider QR" title="Bus Spider QR" width="271" height="699" class="aligncenter size-full wp-image-4565"></p>

<p>There may need to be a little rejiggling of the maps to accommodate the code - as well as some tests to see what wording works best to encourage people to scan.</p>

<p>The net result should be something which is suitable for every one of the 19,500 bus stops in London.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2011/10/TfL-Bus-stand.jpg" alt="TfL QR Bus stand" title="TfL QR Bus stand" width="184" height="952" class="aligncenter size-full wp-image-4566"></p>

<p>It should be fairly easy for TfL to get this going. QR Codes <em>everywhere</em>!</p>

<p>Thanks to Ben Stewart for the idea.</p>

<blockquote class="social-embed" id="social-embed-120832320822456320" lang="en" itemscope="" itemtype="https://schema.org/SocialMediaPosting"><header class="social-embed-header" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><a href="https://twitter.com/yousability" class="social-embed-user" itemprop="url"><img class="social-embed-avatar social-embed-avatar-circle" src="data:image/webp;base64,UklGRrgBAABXRUJQVlA4IKwBAADwCgCdASowADAAPrFKnEmnJKKhLjgOYOAWCWQAwQ92yZdML2qmqKhpd+17JhMDz20d2xg0Fc1w0JlCyUV7LapK+UBd1gElebolVw/ft38S/qIHhf/mI6TKJ8yeLOg/FsAA/v3ymAt/s6jnmYPCgE/Q63rxOZ6QCxzIjzCgau+y7gr9nuigvIlRx1rvXJDa2RABa0G7u2slrEIzZoIsv3fqfKZGiBNxYjFbAGy3mim7gLI1GPQK0gmcdOFp12qYtD160mU2Dyesfo5T9hfgZPE0+n7BbmE7qpBYkpTnSMIacOffjbpfxs6b+OTCbXDTeLtcKaVbiKgbMhGSr/zA8L9hQ691JNtJnnPmQ8FAbtNCnCSkP9xXxubfiyJ60t+P4EBY9kVm5TxcD0uMLqj2Vw8FfqIxt1bFulV+5qCVV6zHRXLNAwGrLhIq+jQOlCTDjnIwOtnpErilI2dFKqqc5oC6SHARBgIKRO5u7jVk9Ylb2cuxIWGmdkltMa1VRaAWS2UW7I59NVIA9VQAF+u/FQaGxKsQxuEwwprZjujsGSiwiACFyDrtqvrF0yAAAA==" alt="" itemprop="image"><div class="social-embed-user-names"><p class="social-embed-user-names-name" itemprop="name">Ben Stewart</p>@yousability</div></a><img class="social-embed-logo" alt="Twitter" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0Aaria-label%3D%22Twitter%22%20role%3D%22img%22%0AviewBox%3D%220%200%20512%20512%22%3E%3Cpath%0Ad%3D%22m0%200H512V512H0%22%0Afill%3D%22%23fff%22%2F%3E%3Cpath%20fill%3D%22%231d9bf0%22%20d%3D%22m458%20140q-23%2010-45%2012%2025-15%2034-43-24%2014-50%2019a79%2079%200%2000-135%2072q-101-7-163-83a80%2080%200%200024%20106q-17%200-36-10s-3%2062%2064%2079q-19%205-36%201s15%2053%2074%2055q-50%2040-117%2033a224%20224%200%2000346-200q23-16%2040-41%22%2F%3E%3C%2Fsvg%3E"></header><section class="social-embed-text" itemprop="articleBody"><small class="social-embed-reply"><a href="https://twitter.com/edent">Replying to @edent</a></small><a href="https://twitter.com/edent">@edent</a> can you persuade @TfLofficial to put QR codes linking to the relevant countdown on <a href="http://bit.ly/p8Ddrc">bit.ly/p8Ddrc</a> on all London bus stops?</section><hr class="social-embed-hr"><footer class="social-embed-footer"><a href="https://twitter.com/yousability/status/120832320822456320"><span aria-label="0 likes" class="social-embed-meta">❤️ 0</span><span aria-label="2 replies" class="social-embed-meta">💬 2</span><span aria-label="0 reposts" class="social-embed-meta">🔁 0</span><time datetime="2011-10-03T12:07:24.000Z" itemprop="datePublished">12:07 - Mon 03 October 2011</time></a></footer></blockquote>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=4559&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2011/10/qr-and-tfl-countdown/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Microsoft's New Marketing Campaign]]></title>
		<link>https://shkspr.mobi/blog/2009/12/microsofts-new-marketing-campaign/</link>
					<comments>https://shkspr.mobi/blog/2009/12/microsofts-new-marketing-campaign/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 09 Dec 2009 13:07:44 +0000</pubDate>
				<category><![CDATA[badvertising]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[advertising]]></category>
		<category><![CDATA[BSOD]]></category>
		<category><![CDATA[cbs]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[tfl]]></category>
		<category><![CDATA[ThisIsBroken]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=1340</guid>

					<description><![CDATA[I wander around the world in a perpetual state of confusion.  Why is the world the way it is?  Why do people make bad decisions?  Why - when there are so many better alternatives - do people choose the worst of all possible worlds?  Rather than getting bogged down in philosophy, I refer to the reason people choose Microsoft Windows to do anything public facing.    Advertisers obviously care…]]></description>
										<content:encoded><![CDATA[<p>I wander around the world in a perpetual state of confusion.  Why is the world the way it is?  Why do people make bad decisions?  Why - when there are so many better alternatives - do people choose the worst of all possible worlds?</p>

<p>Rather than getting bogged down in philosophy, I refer to the reason people choose Microsoft Windows to do anything public facing.</p>

<p><a title="Broken Windows Advertising Screens on the Tube by terenceeden, on Flickr" href="http://www.flickr.com/photos/edent/4155903292/"><img src="https://farm3.static.flickr.com/2636/4155903292_a62635f3c1.jpg" alt="Broken Windows Advertising Screens on the Tube" width="500" height="334"></a></p>

<p>Advertisers obviously care enough about their message to craft 30 second videos, they invest millions on infrastructure to support showing them.  Then they take a totally unsuitable and unstable method for playing them back - why?</p>

<p><a title="Broken Windows Advertising Screens on the Tube by terenceeden, on Flickr" href="http://www.flickr.com/photos/edent/4155141169/"><img src="https://farm3.static.flickr.com/2765/4155141169_cb33242122.jpg" alt="Broken Windows Advertising Screens on the Tube" width="500" height="334"></a></p>

<p>It's a phenomena I repeatedly see.  Advertising screens around the world which are really only displaying one message.</p>

<p><a title="12122007046 by terenceeden, on Flickr" href="http://www.flickr.com/photos/edent/2104834677/"><img src="https://farm3.static.flickr.com/2164/2104834677_f4a125b487.jpg" alt="12122007046" width="375" height="500"></a></p>

<p>They're saying "Windows - The Worst Way To Get Your Message Across".</p>

<iframe title="Windows Error on Advertising Screen (DYNAMAX POV Player)" width="620" height="349" src="https://www.youtube.com/embed/Sf2PatuU98E?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<p>However, it's not just Windows which has the problem - each of these three photos show a PC which has failed to <a href="http://en.wikipedia.org/wiki/Power-on_self-test">POST</a> correctly.  So they are stuck - forever displaying their inadequacies to thousands of passers-by.  (Click to embiggen)</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2009/12/2795825.jpg" alt="The *real* reason the Bakerloo line was suspended this morning! An advertising screen showing a DOS startup screen." width="600" height="450" class="aligncenter size-full wp-image-47662">

<img src="https://shkspr.mobi/blog/wp-content/uploads/2009/12/2826366.jpg" alt="BS advertising @ Waterloo, FAIL yet again #ThisIsBroken. A projector screen on a tube line is showing an error page." width="600" height="450" class="aligncenter size-full wp-image-47663">

<img src="https://shkspr.mobi/blog/wp-content/uploads/2009/12/1902137.jpg" alt="&quot;Disk Error. Press Any Key To Continue&quot; this advertising screen has been broken all day!" width="600" height="450" class="aligncenter size-full wp-image-47664">

<p>My real rant isn't about Windows - it's about the design and thinking behind such advertising screens.  It would appear that each screen is driven by its own PC.  What madness!  The cost of hardware - let alone software - must be phenomenal.</p>

<p>At the moment, each screen displays exactly the same content as its neighbour.  There's no reason why a single computer couldn't be used to drive all the screens.</p>

<p>I say exactly the same - the screens get progressively out of sync as the day goes on.  Presumably the separate PCs don't communicate with one and other.</p>

<p>The next thing that bothers me is the use of Windows.</p>

<p>These screens aren't using an embedded version of Windows - they're using XP.  Now, XP is a fine OS - but it is bloated in terms of what is needed. All that is needed is a small embedded device which can be loaded with video files and set to play back.</p>

<p>It doesn't need a desktop OS.&nbsp; It doesn't need anything more complicated than a display, video codecs and an Ethernet port.&nbsp; This is the sort of thing for which Linux is perfect.</p>

<p>So, why?&nbsp; Why has this system been allowed to develop?&nbsp; Every day I see another screen which is broken, out of sync, or crashed.&nbsp; Why has such a fragile and expensive solution become so prevalent?</p>

<p>The majority of these photos show <a href="http://web.archive.org/web/20110924061523/http://www.tfl.gov.uk:80/businessandpartners/commercialopportunities/5559.aspx">TFL advertising screens</a> managed by <a href="http://www.cbsoutdoor.co.uk/">CBS Outdoor</a>.&nbsp; I really do wonder if they ever wander through the tube and see what a shoddy experience they are delivering.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=1340&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2009/12/microsofts-new-marketing-campaign/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Holborn Station and Sousveillance]]></title>
		<link>https://shkspr.mobi/blog/2009/10/holborn-station-and-sousveillance/</link>
					<comments>https://shkspr.mobi/blog/2009/10/holborn-station-and-sousveillance/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 16 Oct 2009 10:15:05 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[sousveillance]]></category>
		<category><![CDATA[tfl]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=764</guid>

					<description><![CDATA[Sousveillance (pronounced /suːˈveɪləns/, French pronunciation: [suvɛjɑ̃s]) as well as inverse surveillance are terms coined by Steve Mann to describe the recording of an activity from the perspective of a participant in the activity, typically by way of small portable or wearable recording devices that often stream continuous live video to the Internet.  http://www.youtube.com/watch?v=u804C65q_Jk …]]></description>
										<content:encoded><![CDATA[<blockquote><p><strong>Sousveillance</strong> (pronounced <span title="Pronunciation in the International Phonetic Alphabet (IPA)"><a title="Wikipedia:IPA for English" href="http://en.wikipedia.org/wiki/Wikipedia:IPA_for_English">/suːˈveɪləns/</a></span>, <small>French pronunciation: </small><span title="Pronunciation in IPA"><a title="Wikipedia:IPA for French" href="http://en.wikipedia.org/wiki/Wikipedia:IPA_for_French">[suvɛjɑ̃s]</a></span>) as well as <strong>inverse <a title="Surveillance" href="http://en.wikipedia.org/wiki/Surveillance">surveillance</a></strong> are terms coined by <a title="Steve Mann" href="https://en.wikipedia.org/wiki/Steve_Mann_(inventor)">Steve Mann</a> to describe the recording of an activity from the perspective of a participant in the activity,<sup id="cite_ref-0"><a href="http://en.wikipedia.org/wiki/Sousveillance#cite_note-0"><span>[</span>1<span>]</span></a></sup> typically by way of small portable or wearable recording devices that often stream continuous live video to the Internet.</p></blockquote>

<p><a href="https://web.archive.org/web/20091025175955/http://www.youtube.com/watch?v=u804C65q_Jk">http://www.youtube.com/watch?v=u804C65q_Jk</a></p>

<p>When this London Underground employee (now thought to be Ian Morbin) had a bad day at work, he thought, like the rest of us, that it would be forgotten by morning.&nbsp; Many of us take our stresses out inappropriately - whether it's on the call centre worker or a traffic warden - occasionally on a customer.&nbsp; What he hadn't counted on was <a href="https://web.archive.org/web/20091025175957/http://www.jonathanmacdonald.com/?p=4024">Jonathan Macdonald</a> whipping out his camera and recording the event.&nbsp; We're wearily resigned to CCTV monitoring our every move - but handheld cameras present a more intimate and dispassionate view of events.</p>

<p>Expanding on <a href="https://web.archive.org/web/20091025175957/http://www.jonathanmacdonald.com/?p=4024">my comments in the original post</a> -</p>

<p>The pro-gun lobby often says "A well armed society is a polite society." The implication being that you don't go around being aggressive when anyone could pull a gun on you.</p>

<p>With the rise of sousveillance -&nbsp; I wonder if we'll see a rise in professionalism and politeness. Because, you never know who is recording for posterity.</p>

<p>There are two problems I have with this:</p>

<ol>
    <li> It relies on those higher up to do something. If this Ian chap doesn't get disciplined - what has been achieved? Nothing. Similarly, if after all the videos of police abuses of power (G20, climate camp etc.) no officer gets punished / the rule aren't changed - it's all been for naught.</li>
    <li>I think people should be polite and professional because <strong>IT'S THE RIGHT THING TO DO</strong>. Not because they're afraid of being punished. Call me old fashioned, but I want to live in a world where people are respectful to one and other - not merely afraid of being caught out.</li>
</ol>

<p>I hope that "Ian" doesn't lose his job - I hope that he realises what an arse he has been and learns to treat customers with a bit more respect.</p>

<p>This video is presented out of context and - although I trust Jonathan's reporting of events - we do only have his word for it.&nbsp; He may very well have chopped off the footage which completely exonerates Ian.&nbsp; Although I can't quite conceive what that would be.</p>

<h2 id="meta"><a href="https://shkspr.mobi/blog/2009/10/holborn-station-and-sousveillance/#meta">Meta</a></h2>

<p>It's interesting to notice how the blogosphere reacts to these events.&nbsp; Multiple repostings often fail to mention the originating site.&nbsp; The conversation is split between YouTube, Jonathan's blog and those who have reposted it.</p>

<p>Is it better to keep conversations separate in this way? Leave the drooling YouTube commentators&nbsp; away from the TFL blogs - or should diverse communities try to interact to keep a canonical view of what is being said about this incident?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=764&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2009/10/holborn-station-and-sousveillance/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
	</channel>
</rss>
