Alex Singleton

Reader in Geographic Information Science at the University of Liverpool

© 2014. Alex Singleton All rights reserved. About my blog code

Census Open Atlas Project Version Two

CensusAtlasThis time last year I published the first version of the 2011 Census Open Atlas which comprised Output Area Level census maps for each local authority district. This turned out to be quite a popular project, and I have also extended this to Japan.

The methods used to construct the atlases have now been refined, so each atlas is built from a series of PDF pairs comprising a map and a legend. These are generated for each of the census variable (where appropriate), with the layout handled by Latex. As with demonstrated in the Japan atlas, this also gives the advantage of enabling a table of contents and better description for each map.

Some other changes in version two include:

  • Labels added to the legends
  • Scale bars added
  • Addition of the Welsh only census variables
  • Removal of overly dense labels

When the original project was picked up by the Guardian I made an estimate of the actual number of maps created, however, for this run, I counted them. In total 134,567 maps were created.

Download the maps

The maps can be downloaded from github; and again, the code used to create the maps is here (feel free to fix my code!).

Automated Savings

A manual map might typically take 5 minutes to create - thus:

  • 5 minutes X 134,567 maps = 672,835 minutes
  • 672,835 minutes / 60 = 11,213.9 hours
  • 11,213.9 hours / 24 = 467.2 days (no breaks!)

So, if you take a 35 hour working week for 46 weeks of a year (6 weeks holiday), this equates to 1,610 hours of map making time per year. As such, finishing 134,567 maps would take 6.9 years (11,213.9 / 1,610).

This would obviously be a very boring job; however, it would also be expensive. If we take the median wages of a GIS Technician at £20,030 then the "cost" of all these maps would be 6.9 X £20,030 = £138,207. This toy example does illustrate how learning to code can help save significant money, and indeed what a useful tool R is for spatial analysis.


Advances in Geographic Data Science - Open Data and Systems

Talk given at the EEO-AGI seminar series at the University of Edinburgh 31/1/14.


Clipart Cartography

When members of staff within your department retire, there are usually office clearouts, resulting in piles of interesting old books being given away.

A recent addition to my collection is a cartographic gem from 1995 titled "Statlas UK: A Statistical Atlas of the United Kingdom", produced by the Ordnance Survey. For anyone interested in this post, you can still purchase this atlas second hand for as little as 1p from Amazon Marketplace.

Much to my surprise when I opened the atlas, some of the maps were not quite up to the refined standards of the contemporary Ordnance Survey, including:

Giant Clipart

View PDF

Inappropriate Symbols

View PDF

Bar Chart Attack

View PDF

Dominating Pies!

View PDF

A really scary looking child!

View PDF

You can also download an expanded selection of the maps here.


Why Geographers Should Learn to Code

This article is published in the January 2014 issue of Geographical Magazine - page 77.

In my opinion, a geography curriculum should require students to learn how to code, ensuring that they’re equipped for a changed job market that’s increasingly detached from geographic information systems (GIS) as they were originally conceived.

The ability to code relates to basic programming and database skills that enable students to manipulate large and small geographic data sets, and to analyse them in automated and transparent ways. Although it might seem odd for a geographer to want to learn programming languages, we only have to look at geography curriculums from the 1980s to realise that these skills used to be taught. For example, it wouldn’t have been unusual for an undergraduate geographer to learn how to programme a basic statistical model (for example, regression) from base principles in Fortran (a programming language popular at the time) as part of a methods course. But during the 1990s, the popularisation of graphical user interfaces in software design enabled many statistical, spatial analysis and mapping operations to be wrapped up within visual and menu-driven interfaces, which were designed to lower the barriers of entry for users of these techniques. Gradually, much GIS teaching has transformed into learning how these software systems operate, albeit within a framework of geographic information science (GISc) concerned with the social and ethical considerations of building representations from geographic data. Some Masters degrees in GISc still require students to code, but few undergraduate courses do so.

The good news is that it’s never been more exciting to be a geographer. Huge volumes of spatial data about how the world looks and functions are being collected and disseminated. However, translating such data safely into useful information is a complex task. During the past ten years, there has been an explosion in new platforms through which geographic data can be processed and visualised. For example, the advent of services such as Google Maps has made it easier for people to create geographical representations online. However, both the analysis of large volumes of data and the use of these new methods of representation or analysis do require some level of basic programming ability. Furthermore, many of these developments have not been led by geographers, and there is a real danger that our skill set will be seen as superfluous to these activities in the future without some level of intervention. Indeed, it’s a sobering experience to look through the pages of job advertisements for GIS-type roles in the UK and internationally. Whereas these might once have required knowledge of a particular software package, they increasingly look like advertisements for computer scientists, with expected skills and experience that wouldn’t traditionally be part of an undergraduate geography curriculum.

Many of the problems that GIS set out to address can now be addressed with mainstream software or shared online services that are, as such, much easier to use. If I want to determine the most efficient route between two locations, a simple website query can give a response within seconds, accounting for live traffic-volume data. If I want to view the distribution of a census attribute over a given area, there are multiple free services that offer street-level mapping. Such tasks used to be far more complex, involving specialist software and technical skills. There are now far fewer job advertisements for GIS technicians than there were ten years ago. Much traditional GIS-type analysis is now sufficiently non-technical that it requires little specialist skill, or has been automated through software services, with a subscription replacing the employment of a technician. The market has moved on!

Geographers shouldn’t become computer scientists; however, we need to reassert our role in the development and critique of existing and new GIS. For example, we need to ask questions such as which type of geographic representation might be most appropriate for a given dataset. Today’s geographers may be able to talk in general terms about such a question, but they need to be able to provide a more effective answer that encapsulates the technologies that are used for display. Understanding what is and isn’t possible in technical terms is as important as understanding the underlying cartographic principles. Such insights will be more available to a geographer who has learnt how to code.

Within the area of GIS, technological change has accelerated at an alarming rate in the past decade and geography curriculums need to ensure that they embrace these developments. This does, however, come with challenges. Academics must ensure that they are up to date with market developments and also that there’s sufficient capacity within the system to make up-skilling possible.Prospective geography undergraduates should also consider how the university curriculums have adapted to modern market conditions and whether they offer the opportunity to learn how to code.


Swapping from Wordpress to Jekyll

Background

I have been a Wordpress user for a very long time, however, I feel the increased complexity of the system has resulted in feature bloat, and for me at least, creates a not especially intuitive user interface. There are many features of the system that I have never used, and to be honest, it now probably usurps my requirements as a basic tool to create a record of what I do.

More generally, I have changed my academic workflow quite substantially over the past few years, writing almost entirely in either Latex or Markdown and utilising version control in a serious way on Bitbucket for both academic writing and programming. This has been an enlightening experience!

I have been looking around for an alternative blog system for a while and have been experimenting with Ghost which is a new, and I think a really promising system. You will see that the founder shares some of my frustrations about Wordpress. It is early days for Ghost, but I could see myself using this in the future once it is a few more versions into development.

New Solution - Jekyll

Jekyll takes me back to the late 1990s when I first started to code websites in HTML. This system does not use a database and instead generates a static HTML based website using a variety of formats including markdown - it is essentially a parsing engine. What is clever though is how it can generate a blog layout, essentially using the naming conventions of your files to create a page structure filled with posts. The other really neat thing is that you can host a Jekyll powered website on your github repository; even with a custom domain name. This costs nothing and is completely transparent, as all the source is available for others to download. Thus far I have been very impressed.

How I exited wordpress

The first thing was to get all my posts out of the DB - this involved exporting an XML file and then using exiwp which is a set of Python libraries that converts the XML into Markdown posts that are named correctly for Jekyll. I have been through all of these, pruning out some old posts that weren't especially interesting or had many dead hyperlinks. Something else which has been annoying me recently is Slideshare - the interface is increasingly cluttered, and for some reason it has been doing funny things to the layout of my old presentations. Fortunately, a better solution has emerged (again Github based!) called Speaker Deck which I have now converted all my old slides to; and indeed uploaded some new talks I have done recently.

For this blog I have adapted a theme called Hyde, including some extra bits such as: a category based RSS feed for my R posts (this is important for R Bloggers); the [splitting of short and long posts] (http://foldl.me/2012/jekyll-excerpts/); and the use of Disquss to manage comments (not that there are usually many!). Along the way I have borrowed some code from here (which is an excellent introduction to Jekyll), a sitemaps code from here, and also aquired some icons from iconmonstr.

Anyway, I hope you like the new blog.


Advances in Geographic Information Science and the Population of Blackpool

An evening talk for the Blackpool Geographical Association - 4th November 2013