Mappiness – A Personal Mood Map

The Mappiness project is run by one of CASA’s technology superstars Dr George MacKerron – it was his Ph.D project at LSE. The project, which is still going, aims to quantify happiness based on environmental factors, such as location, views and sound, as well as who people are with and what they are doing. Data is collected by volunteers downloading an iPhone app, which then pings them at random moments twice a day between 8am and 11pm (configurable) to ask them the questions and collect the data. Volunteer incentive is driven by having access to a personal webpage which contains all their collected data, visualised in a wealth of attractive graphs and maps.

I’ve been using the app since late October, it has been steadily pinging me twice a day since then, and most of the time I hear the familiar ‘ding ding’ and get around to recording the information. With around 160 responses, some interesting insights are now appearing, some(!) of which are non-personal enough to share here. The map above shows the locations where I was pinged, for the London area – yellow stars indicate where a photo was taken.

Here’s one, based on the general environment:

Perhaps more interesting is that I spend much less time outdoors than I thought. The app (by default) only asks for a picture if you are outdoors, so by counting the number of pictures that appear on my personal webpage – just 14 out of 161 – this in theory means that I spend only 8-9% of my waking life outside. This percentage will hopefully grow as summer approaches and things start to warm up again.

Because I don’t get to choose when to post the images, the photos are a good snapshot of my “everyday” outdoor view, rather than a nice or interesting place that I would specifically stop to photograph. Here’s a couple of my most recent ones:

One of Dr MacKerron’s current projects involves using Microsoft Kinect sensors for visualisation – this is my very tenuous link to allow me to post the image below, which is a 3D grid “photograph” of me at my desk, constructed from Kinect data.

Mappiness managed to choose to ping me this morning precisely at the moment that my bike chain snapped, on the way to work. Needless to say, a low score for happiness was recorded.

Map background Copyright Google.

Vienna: Previewing GEMMA

At State of the Map EU I presented a preview of GEMMA, my current UCL CASA funded project, focusing particularly on the OpenStreetMap Feature Highlighter, that will be one of our key data sources – it being an OpenStreetMap conference, I thought this would be of most interest to the audience. GEMMA is more than that though – it will both be a portal of content and created maps, and a mobile application for collection and viewing of data.

Unfortunately my talk clashed with a cartography talk but quite a few people were in my track and saw some screenshots of OpenStreetMap data being highlighted in GEMMA. I also talked about integration with other CASA data sources – GEMMA is a consolidation project to tie together a number of CASA products – and mocked up some examples, focusing on a need to understand more of the demographics of London bike-share cyclists, a current personal interest of mine.

GEMMA is a JISC-funded project that I am working on with Steven Gray. It’s one of the JISCGeo projects, and should launch this autumn. It has its own website and also a blog, where I go into more detail about the project. This is the first CASA project, I believe, to make significant use of OpenStreetMap, and its great that we are now able to take advantage of such a rich and expanding dataset.

The iPhone Locations DB – Fun, but not Accurate

As a followup to my previous post about the (re-)discovery of the iPhone locations cache, the graphic above shows the apparent locations (of known mobile-phone masts and wifi) that were captured on my iPhone, over the last couple of weeks while I have been in Scotland. These were either independently detected by my iPhone and georeferenced using a built-in service, or, more likely as it turns out, the details of supposed nearby masts were downloaded by my iPhone from this service, based on its own location, in the hope they would subsequently be detected and allow for quick positioning.

The graphic is from my hacked version of iPhoneLocator, changed to show a higher density of dots and include the wifi data. I have superimposed on the map red lines showing where I’ve actually gone over the break. Some of the detected (or downloaded in the hope of detection) mobile-phone masts were over 40 miles away from where I actually was. Some of these may have been when I was on top of a Munro (i.e. over 3000 feet up) which therefore affords a good line of sight. Or simply, there were so few in the area, that details from the far-away ones were the best available to be obtained.

If I hadn’t drawn the red lines, you would probably be surprised to discover, for example, that I never went to Inverness during this trip (the big patch of yellow circles in the very top part of the map extract. I also never went along the various roads visible in the north, west or east part of the map, but my phone still saw the towers in these locations. So to conclude, take the detected locations with a pinch of salt. They tell you where an external database thinks a cell-phone tower once was, or where the nearest few are, even if they are a long way away. They certainly don’t tell you where you’ve actually been…

Should the UK move to Double Summer Time?

Every autumn, as predictably as the clocks going back from British Summer Time (BST, i.e. GMT+1) to Greenwich Mean Time (GMT), there are newspaper articles with people suggesting that we scrap the change and just stay with BST all year around. Lighter evenings in the winter would make days feel longer for most people, and reduce the gloom of the season. Indeed this was done, for a few years from 1968, but politics intervened and we went back to the the annual GMT/BST cycle. Well, things might be changing. More specifically, we could be moving to the timezone that much of the rest of Europe adopts – GMT+1 in the winter, GMT+2 in the summer (so Double Summer Time is a bit of a mis-nomer.

What do you think? Here’s a 10-second survey:

Where is London?

When I was at school, I lived a long way up north. My geography of the much of the rest of the U.K. was limited to the AA road atlas my parents had in the car, which I used to look at compulsively during long journeys. I was fascinated by the schematic diagrams showing the layout of road junctions on each of the motorways. The motorways were represented on the diagrams themselves by dead straight lines – with one exception: the M25. This motorway was shown as a square, apparently enclosing all of London. So, for many years, I assumed that the London boundary was the M25 itself. I was a little disappointed when I moved down to the city and discovered this was not the case. Several large areas – Epsom, Loughton, Watford – are comfortably inside the M25 ring but not within the administrative boundary of Greater London. Similarly, the boundary pushes out beyond the M25 in a few, generally rural, places.

It turns out there are a lot of official and unofficial ways to define London’s extent.

  • Greater London – the administrative extent, made up of the 32 London boroughs and the City of London at its centre. It is the area that is administered by the boroughs and also forms the area of the six concentric Transport for London travelcard zones – although there are some “special” additional zones which go beyond the boundary. Greater London is shown above.
  • Greater London Urban Area – the Office of National Statistics defines this as the conurbation area of London (i.e. the continuous urban environment) which is roughly equivalent to Greater London but excludes the large rural areas within the latter boundary, such as Biggin Hill, and includes some towns which “spill over” the Greater London boundary, such as Staines and Dartford.
  • London Travel to Work Area (TTWA) – Travel to Work Areas are contiguous regions containing mainly people that both live and work there. London is such a region, its TTWA extends slightly beyond Greater London to include places with sufficiently good transport links that, as far as employment is concerned, are “local”.
  • The extent of the “020″ telephone number prefix – the dialling code for “London”.
    The London postal district – the extent of the SW, W, NW, N, E and SE postcodes. These miss out a surprisingly large part of the London urban area, except in the north, where they even extend beyond the Greater London boundary.
  • The County of London – this approximately represented inner London and ceased to exist in 1965 with the creation of Greater London. However many older people continue to refer to the counties that were lost or redrawn to accommodate Greater London, such as Middlesex, which is now subsumed by the northern part of Greater London.
  • The City of London – this still exists but only covers the Square Mile – the financial and historic centre of London. It is surrounded by the 32 London boroughs. One of the other boroughs – Westminster – is also a city. Hence the electoral constituency which currently covers both being called “Cities of London and Westminster”.

Personally, I still prefer the M25 as the boundary. If I’m heading on a long cycle ride from the centre of London to (say) Brighton, then its when I pass underneath the M25 – a very tangible, physical feature – that I feel I have finally left the city. None of the other borders described above are represented on the ground, other than by road signs. But you can’t miss a huge 6+ lane orbital highway.

The bottom set of pictures are, clockwise from the top right: The London postal district in red, the London Travel To Work Area in dark blue, the former County of London in green, the City of London in bright red, aerial imagery of London’s built up areas, and the London 020 dialling code area in red. Apart from the top picture, which is from OpenStreetMap, all pictures are sourced from Wikipedia. All the picture here are are subject to Creative Commons copyrights of their respective authors. The middle picture shows Greater London, with the boroughs (and the City of London) numbered.

Skyscraper City or Cathedral City?

Cross-posted from the Hodder Geography Nest blog, where I am one of this month’s guest-bloggers.


 

I was walking down Bishopsgate in the City of London yesterday, and I noticed the giant concrete “core” of the Pinnacle, the City’s next skyscraper, has finally started to rise out of the ground. It’s just one of a number of very tall buildings now under construction in London, after a couple of quiet years due to the economic conditions. The Pinnacle, also known as the Bishopsgate Tower and nicknamed the Helter-Skelter because of its spiral shape, will be 288m tall and is due to be completed by the end of 2012.

Next door, the Leadenhall Building is due to commence construction in early 2011, it will be 225m high and also has a nickname, the Cheese Grater. Just up the road is the Heron Tower, 230m high and was completed in July, it opens early next year. Not far away is 20 Fenchurch Street, nicknamed the Walkie Talkie because of its bulging design, which is due to start construction any day now and will be 160m high. Finally, just across London Bridge, is the Shard, which will be the tallest of all – the main core has already risen 60 stories high, and the building will be 310m high when complete, again in 2012, making it the tallest building in the European Union. A photograph of the Shard under construction is on the right.

Many of these new skyscrapers will have public viewing galleries and rooftop restaurants, so for those without a fear of heights, it is going to be an exciting few years.

An artist’s impression of the Pinnable is on the left. Three of the four buildings on the right of the picture have now been demolished – 30 St Mary Axe, popularly known as the Gherkin, remains, but the two square buildings will soon instead be replaced with the Cheese Grater and the Walkie Talkie. The building at the front has also been demolished and replaced with a new mid-level office building.

It’s anything but straightforward to build a skyscraper in London though. The planning process takes many years, and many organisations voice objections at the public enquiries, notably English Heritage, which manages the historic built environment of the country. The costs of building a skyscraper are of course very high, and there is always the risk that the demand for office space has dropped by the time the building is finally completed, as happened with the Broadgate Tower last year.

There is one other factor that is special to London – St Paul’s Cathedral, or specifically, viewing corridors to it. There are ten designated places in London, from which the view to the cathedral must be uninterrupted. Some of the places include Primrose Hill, Greenwich Park, Parliament Hill on Hampstead Heath, Alexandra Palace and most interestingly King Henry VIII’s Mound in Richmond Park. The latter view is through a small hole cut in the hedge on the mound, allowing a suprising glimpse of the cathedral standing nearly 10 miles away.

One very different kind of building development that opened last fortnight was One New Change, a shopping mall and offices on Cheapside, directly east from the cathedral. It is just 40m high, despite having as much floor space as the 225m Leadenhall Building. The building height was very deliberately fixed, so that the building appears to “nestle” alongside St Paul’s rather than overshadowing it.

The new City skyscrapers are all clustered together in the eastern part of the Square Mile, where they don’t impact on the St Paul’s protected views – by not blocking the building, appearing to be close by it from the viewpoints, or adding a dominating backdrop. Indeed, one of the reasons why the Cheese Grater building slopes back is to minimise its impact on the skyline with respect to the cathedral. No super-tall skyscrapers will be appearing immediately beside the cathedral, or to its north or west, any time soon.

The map below shows some of the protected views to St Paul’s Cathedral – marked with the red pin. King Henry VIII’s Mound is marked with the green pin.

The image of the Shard under construction is CC-By-SA George Rex photography on Flickr. The artists impression of the Pinnacle is CC-By-SA Will Fox on Wikipedia. The OpenStreetMap screenshot is of data which is CC-By-SA OpenStreetMap contributors. The photo of St Paul’s Cathedral with the pre-2007 skyscrapers is by the author.

General Election Swings Visualisation

I’ve created a visualisation of the results from the UK general election this month. By default, it shows the most significant swings between parties, for each constituency. By using the options on the right, you can change it to show simple vote counts, overall results, or swings between any two significant parties. I’m using a circle to represent each constituency. The area of the circle is directly proportional to the metric being shown (number of votes, or percentage point swing) with a dynamic key on the right to help out. Click on a circle to see the vote results.

Some Notes:

By choosing “Winning Party” from the “Other” drop down, you see the simplest map – each circle is the same size, and it simply shows the winning results – with the previous winner shown as the colour on the edge of the circle. I think this kind of view is a “best of both worlds” approach – as long as the circles don’t overlap, it has the “fairness” of cartograms (aka “proportional” maps in the BBC’s coverage) while retaining the geographical familiarity of the choropleth (“normal”) map of the UK.

Only Great Britain is included, not Northern Ireland, as the OS Open Data release, which provides the parliamentary boundaries from which the centroids were calculated for the circle locations, does not at the moment include Northern Ireland.

The definition of swing is tricky – swing can only be described as being from one party to another. Choosing which two parties to use for the “headline” swing was tricky. In the end, I’ve chosen to show the swing between the losing and winning party where the seat changed hands, and where it didn’t, the swing between the two parties with the highest number of votes. This means “interesting” swings like in Bethnal Green & Bow are still included. It does however mean that the largest swing is not necessarily shown.

There were a large number of parties contesting seats – in the end I’ve only included parties that got at least 30,000 votes in total, to prevent the lists becoming too long. I’ve also excluded swings where either party in the swing had less than 5% of the vote (i.e. losing their deposit) as such a swing is probably not very meaningful.

In general, a swing between a “small” party and a “large” party is not meaningful anyway, because any voting changes that a large party suffers/gains from are probably to/from another large party, rather than to/from the small party. So, bear this in mind when viewing the swings between (for example) Labour and UKIP. UKIP appears to have gained almost everywhere but actually it was probably another “large” party (Conservatives or Liberal Democrats) that actually got the floating votes.

The background imagery was custom-rendered to show the constituency boundaries and be entirely grey – so that the only colours are those representing the party results. Because the boundaries generally run to the low-water mark and estuary mid-lines, whereas OpenStreetMap boundaries generally run to the high-water mark and consider estuaries to be sea rather than river, there are some odd looking estuarine areas (e.g. the Bristol Channel and the Thames Estuary.)

Said another way, this is because of a mismatch between where OpenStreetMap and the parliamentary boundaries commission consider the rivers to stop and the coast to start. I have manually edited two boundaries – NW Bristol sticks far out into the Bristol Channel, and the Medway boundaries also stick far out. NW Bristol’s centroid was also manually moved. There are other, lesser quirks with the data, and being OSM data, not every village is on there yet. I consider the background imagery overall to be “good enough” for the visualisation at hand.

No fancy AJAX was used – the data (about 120KB) is simply loaded into the browser at the start – the visualisation being done entirely on your browser using the OpenLayers API.

It’s not very easy to draw circles in Javascript, so I’ve let OpenLayers do it for me. The two circles that make up the key are actually miniature OpenLayers maps themselves, with a single point feature at the origin of the map. They update in sync with the main map.

The visualisation was ready to go last week but the way Internet Explorer draws the vector graphics (using VML rather than SVG) was causing considerable performance problems, when trying to show all 650-odd constituencies at once. As a work around, the map starts by being zoomed in if you visit the site in IE. Zoom out at your peril!

If you spot any bugs (apart from the IE chronic slowness!) please let me know.

A Google Streetview History

Inspired by Alex – all the places I’ve ever lived:

Google’s UK streetview coverage isn’t quite ubiquitous – a couple of the images are snapped looking across fields from the nearest main road, and one of the images is pointing in the correct direction, but the house is completely hidden by all the trees in that general area.

The New York one should be pretty easy to spot, as well as my move to London and its terraced housing. The last picture is of my parent’s new house – the Google camera seems to have fallen onto its side when driving down this particular steep and twisty road.

Prettier Maps with Mapnik 0.7.0

[Updated] The Mapnik 0.7.0 release last month has added a number of features, including one that makes choropleth maps, and others with numerous adjacent polygons, more pretty. The PolygonSymbolizer has a new parameter, gamma, which, when set to a value between 0 and 1, causes the polygon edges to bleed into each other slightly, removing distinctive hairlines that allow the background colour to “shine through” the joins.

Here’s a before-and-after of a choropleth of England & Wales. We don’t care much for the boundaries, as they are Middle-Level Super Output Areas (MSOAs), which are administrative boundaries that people are not familiar with, unlike say county boundaries. So, using the gamma parameter, we can hide them.


Mapnik 0.6


Mapnik 0.7

The new parameter is also useful for my OpenOrienteeringMap project, particularly to make large estuaries, which are typically made up of multiple polygons, appear contiguous. However, applying too low a value appears to affect the anti-aliasing of line features, even ones away from the affected polygons. Here, the gamma is just applied to the “water” style. Note the thin white line crossing the water, near the black dotted line that also crosses it, disappears, but the paths and roads start to distort too:


Mapnik 0.6 – thin white line running across the river.


Mapnik 0.7+patch (Gamma 0.8) – the thin white line has gone. Other features are unchanged.

The map tile, by the way, is showing the Greenwich Foot Tunnel crossing the River Thames in east London.

[Update - The crossed-out section highlights a bug that has now been fixed by the Mapnik development team. I've patched my Mapnik build and the gamma changes now only appear where expected.]