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.

Continue reading »

Census Atlas Japan

Japan Census AtlasThe 2011 Census Open Atlas project has been put on hold recently as various other research projects have intervened – more on these soon. However, over the summer  Chris Brunsdon and I have taken a research trip to Ritsumeikan University (Japan) where we visited Keiji Yano and Tomoki Nakaya. As part of this trip I began developing a census atlas for Japan.

I have developed Atlases for a series of larger urban city areas (multiple municipalities), and also separately, those municipalities that were not within these zones.

Some randomly selected examples are as follows [you might be better right clicking these and selecting ‘save as’ or ‘download’ given that the file sizes are quite large for the cities]:

And for the cities:

The full list of maps are available here.

tokyo

More details after the break about how the maps were created…

The data used in this Atlases are available from Statistics Japan, however, for this project these were provided to me by Keiji Yano and  Tomoki Nakaya who also supplied the boundaries and various lookups. The places highlighted on the map were extracted from the Japan gazetteer file from Geonames.

In the previous atlas I used R to render out A4 PDF files which had an integrated scale bar and legend, however, due to the different shapes of the regions being mapped, these results were not always satisfactory; with some scale bars and legends overlapping the content of the maps. This positioning is difficult (although not impossible) to control when the map production is automated. Also, I was not happy about the scaling of the maps, as R had a tendency to put a lot of white space  around the maximum extent of the plot (could be my bad coding!). My ex-colleague Jon Reades also pointed out that this issue might be resolved with LaTex. Previously I had just been stitching together a series of PDF maps and a cover PDF with pdftk. An advantage of LaTex is that this has very good layout functionality, enabling images to be scaled to page widths etc. Also, LaTex enabled me to create a table of contents (toc) listing each of the maps at the front of the atlas. It was also possible to make the toc and the maps clickable, enabling links back and forth. Overall I think this is more satisfactory than the previous method I used, however, there are obviously a lot more things that would improve the layouts.

From a workflow perspective, the code operates slightly differently than before; loops render out all maps and a separate legend for each area. As these PDF are processed, an  external library PDFCrop was used to trim away all whitespace around the image extent. A loop then writes a Latex file that processes all images and their appropriate legend into a single document including the toc and links. This is rendered on the terminal with pdflatex and then pdftk is used to append the cover.

I think LaTex is definitely the way forward, although I would not claim that I have the process optimised yet. A massive benefit of this little project is that it has forced me to learn LaTex, and indeed I have now started using this for my academic writing… like R, LaTex is quite liberating once you are over the initial learning curve. Again, as before, the code to make the maps is available over on my Rpubs page here.

Continue reading »

PhD Studentship Available: Geographically Weighted Geodemographics

Applicants are invited for a PhD studentship at the University of Liverpool within the ESRC North West DTC. The studentship will be supervised by Dr Alex Singleton and Professor Chris Brunsdon in the Department of Geography and Planning; and is being conducted in collaboration with the Office for National Statistics.  This three year advanced quantitative […]

Continue reading »

Census Atlas Japan

The 2011 Census Open Atlas project has been put on hold recently as various other research projects have intervened – more on these soon. However, over the summer  Chris Brunsdon and I have taken a research trip to Ritsumeikan University (Japan) where we visited Keiji Yano and Tomoki Nakaya. As part of this trip I began developing a census atlas for […]

Continue reading »

Drone Flight

Latest install into the lab has been a Parrot AR.Drone 2.0 which are flown using wifi and an iPad or iPhone app. This drone has both a forward facing and base camera which can be used to record flights / survey. First impression is that this is pretty …

Continue reading »

2011 Census Open Atlas Project

This month has seen the release of the 2011  census data for England and Wales at Output Area Level. This offers the possibility to map various attributes about people and places for very small geographic areas. Output Areas represent the most detailed geography for which Census data are released and are the building blocks for […]

Continue reading »

2011 Census Open Atlas Project

CensusAtlasThis month has seen the release of the 2011  census data for England and Wales at Output Area Level.

This offers the possibility to map various attributes about people and places for very small geographic areas. Output Areas represent the most detailed geography for which Census data are released and are the building blocks for many popular products such as geodemographic classifications.

Because the data and boundaries are available under an open government licence, and that these data have been usefully placed online as direct downloads (data, boundaries), it makes it  possible to create maps for England and Wales in a highly automated way.

As such, since launch of the Output Area level data I have been busy writing (and then running – around 4 days!) a set of R code that would map every Key Statistics variable for all local authority districts. The code for doing this is fully reproducible, and I have dropped this on my Rpubs blog.

THERE IS A NEW VERSION OF THE ATLAS AVAILABLE HERE

I have generated a PDF atlas for each local authority district, for example:

IF YOU THINK ANY OF THE INFORMATION I HAVE CREATED IS USEFUL, INTERESTING OR OF VALUE, THEN PLEASE  READ THIS BLOG POST AND HELP PROTECT THE NEXT CENSUS!

Why have I created these atlases?

  1. To demonstrate the value of the 2011 census
  2. Provide a free 2011 static Census atlas to anyone who wants one
  3. Because I do not believe web maps should necessarily be the default way of distributing geographic data
  4. To illustrate how open data and software can be used in creative ways to generate insight
  5. An attempt to save local authorities money who might be thinking of doing these type of analyses themselves
  6. To provide reproducible code that enable others to generate similar maps at Output Area level
  7. For fun!
  8. Because R is awesome!
  9. Because R really is awesome!

What is in each atlas?

Each atlas contains a series of vector PDF maps for each Key Statistics variable. The following is a map from the Liverpool Atlas and shows the percentage of “White: English/Welsh/Scottish/Northern Irish/British” for each Output Area in Liverpool.
white

About the data and maps

Almost every non count variable (apart from Hectares) was mapped from the  Key Statistics data disseminated by Nomis, and are either percentage scores or some type of ratio / average. Maps were excluded where there were only a few scores within a local authority district – you can see further explanation of this on the Rpubs page accompanying the analysis. A couple of further points…

  • The variables mapped were based on the calculations that were part of the Nomis data.
  • I have always been a fan of blue choropleth maps which was why the particular colour scheme was chosen.
  • The cartography was automated for all the maps – this means it is more successful for some local authority districts than in others. Some issues I have noted;
  • Those local authorities with many wards appear a little busy with labels (e.g. Cornwall)
  • Cardiff  appears to have a rogue polygon which may be issue with the OA to higher geography lookup table. I will investigate this in a future release…. [Power of the crowd reveals that this is in fact Flat Holm island – thanks to @geospacedman]
  • It would be nice to add scale bars and north arrows to the maps, however, this was proving to be problematic when outputting to PDF. Again, I will try and fix this in a future release.
  • The boundaries used are the generalised files to increase mapping speed and reduce file size – these could be supplemented for the full resolution boundaries in the future
  • These maps are without guarantee or warranty / feel free to fix my code!

View the maps

All maps are available after clicking the post title….

Continue reading »

Creating 2011 Census Output Area Change Maps Using R

E08000003The 2001 Census used a different set of Output Areas (OA) than the current 2011 boundaries; reflecting changes in the spatial distribution of the underlying population. For example, if an area has become more heavily populated since 2001, it makes sense that a previous OA might be split into multiple new segments.

The ONS have provided both the Shapefiles and lookup tables for these changes, however, as yet, I haven’t seen any maps of these changes.

I have had a go at creating these in a reproducible way using R – the code with links to all the data (which is public domain) can be found on my Rpubs page. At the base of the Rpubs post are links to downloadable PDF maps of all local authority districts in England and Wales.

A recurring pattern that will become clearer when the high resolution census data become available in 2013, is the splitting of OA in the centre of many large urban areas, typically as a result of increased population density. A couple of direct links to maps are as follows:

For the remaining maps and R code, see the Rpubs page.

Continue reading »

The geodemographics of access and participation in Geography

Geography is not a compulsory subject of study beyond the age of 14 in English schools and this has had an impact on both absolute and relative participation rates over recent years. Geodemographic analysis reveals that pupils domiciled within more affluent and less ethnically diverse areas record the highest rates of participation and attainment in […]

Continue reading »

A Survey of the use of Geographic Information Systems in English Local Authority Impact Assessments.

Across the public sector, Geographic Information Systems (GIS) and spatial analysis are increasingly ubiquitous when making decisions involving people and places. However, historically GIS has not been prevalently applied to the various types of impact assessment. As such, this paper presents findings from a survey conducted in 2011 of 100 local authorities in England to […]

Continue reading »

Researching the Riots

This commentary sets out an agenda for researching the riots that swept through English cities in 2011, and for exploring the broader issues raised by these events. Drawing inspiration from groundbreaking social and cultural geographies of the 1981 riots, and also from mappings and quantitative studies of the more recent disturbances, this paper sets out […]

Continue reading »

Installing Routino under OSX

Routino is a set of libraries that enable road based route calculations to be conducted over OpenStreetMap data. I have been using them extensively over the past six months for a project looking at CO2 emissions and the commute to school.

Although Routino was designed to run under Linux, it can also be compiled and installed under OSX (sorry no windows!).

  1. First download and unzip the latest version of Routino from here.

  2. Ensure that Xcode and the Xcode command line tools are both installed. On Xcode 4.5 the command line tools can be installed from within Xcode through Xcode >>> Preferences >>> Downloads tab >>> Click “install”.

  3. Navigate to the downloaded Routino folder using the terminal and compile the source code using a “make” command. You would need to supplement “alex” in the following commands for you own user account name.

cd /Users/alex/Desktop/routino-2.3.2/
make

The result should be a series of messages printed to the terminal that indicate Routino being compiled correctly.

  1. The next stage is to copy the compiled libraries (found in the /web/bin folder into your usr/bin folder which should appear in your system PATH (You can check if this is the case by running echo $PATH from the terminal). The -R and the fact that bin ends with a “/” mean that the contents of the folder are copied rather than the folder itself.
sudo cp -R  /Users/alex/Desktop/routino-2.3.2/web/bin/ /usr/bin/

To check that this has worked, if you enter “planetsplitter” or “router” on the terminal the input parameters of these tools should be printed.

For more information on use of the programme, see the Routino documentation here.

The only issue I have had with Routino is that occasionally I would get implausible and very long routes calculated. It turned out that this was related to an issue in the underlying OSM data where access by foot wasn’t necessarily specified on “trunk” roads. A work around for this was to specify that pedestrians could walk on these routes using the tagging rules in the specification XML files. The results of these changes can be seen in the following map.

Continue reading »

A Survey of the use of Geographic Information Systems in English Local Authority Impact Assessments.

Across the public sector, Geographic Information Systems (GIS) and spatial analysis are increasingly ubiquitous when making decisions involving people and places. However, historically GIS has not been prevalently applied to the various types of impact assessment. As such, this paper presents findings from a survey conducted in 2011 of 100 local authorities in England to examine how embedded GIS, spatial analysis and visualisation practices are to the process of conducting impact assessments. The results show that despite obvious advantages of applying GIS in these processes, applications employing basic techniques are at best sporadic, and where advanced methods are implemented, these in almost all instances are conducted by external contractors, thus illustrating a significant GIS under capacity within the sampled local authorities studied.

Riddlesden, D., A.D. Singleton, and T. B. Fischer. 2012. “A Survey of the Use of Geographic Information Systems in English Local Authority Impact Assessments.” Journal of Environmental Assessment Policy and Management 14 (01): 1250006. http://dx.doi.org/10.1142/S1464333212500068.

Continue reading »

The geodemographics of access and participation in Geography

Geography is not a compulsory subject of study beyond the age of 14 in English schools and this has had an impact on both absolute and relative participation rates over recent years. Geodemographic analysis reveals that pupils domiciled within more affluent and less ethnically diverse areas record the highest rates of participation and attainment in GCSE Geography, and that the stratified patterns of participation have increased between 2005 and 2009. Within this period, those schools that have stopped supplying successful GCSE Geography entries by 2009 were found to have overall low aggregate attainment and to draw pupils from more deprived areas. The profile of schools visited by the Royal Geographical Society (with the Institute of British Geographers) (RGS-IBG) Ambassador Scheme was also considered to assess the extent that the schools visited are representative of pupils who are most at risk of non-participation.

Singleton, A.D. 2012. “The Geodemographics of Access and Participation in Geography.” The Geographical Journal 178 (3): 216–229. http://dx.doi.org/10.1111/j.1475-4959.2012.00467.x.

Continue reading »

Researching the Riots

This commentary sets out an agenda for researching the riots that swept through English cities in 2011, and for exploring the broader issues raised by these events. Drawing inspiration from groundbreaking social and cultural geographies of the 1981 riots, and also from mappings and quantitative studies of the more recent disturbances, this paper sets out a framework for researching the riots, and underlines the importance of doing so. It concludes that while riots are traumatic experiences for many, they can also be opportunities, which effective research can help to realise, recasting these events as catalysts for change.

Phillips, Richard, Diane Frost, and A.D. Singleton. 2012. “Researching the Riots.” The Geographical Journal. http://dx.doi.org/10.1111/j.1475-4959.2012.00463.x.

Continue reading »
1 2 3 4