London's Population Profile in 1935

The graphic below shows the population of London across a number of transects overlain on the city’s underlying terrain. It was produced by Ordnance Survey in 1935 and is one of the few early examples I’ve seen of the organisation producing “data visualisations” alongside their famous maps (they do a lot more of this now – see here).

For what it’s worth I really like the way that this approach shows how London is built in a basin and how the population is dissected by rivers and parkland etc (this pattern hasn’t changed much since 1935). But it is a tricky graphic to read if you want to extract more precise info. I’m missing the companion map that would help with orientation, but I’m struggling with extracting values from the graphs since they are essentially adding terrain and population values together in a kind of streamgraph. The axes at either side of the plot therefore don’t really work, although I do like their caveat that “no greater precision must be expected of the curve of population density”.

Here is the full version (I had to scan in 4 sections so it’s a little distorted I’m afraid).

Map Projections

I’ve just discovered this really lovely graphic detailing a number of different map projections. It’s taken from the opening pages of the “Oxford Advanced Atlas” (Bartholomew, 1936) and features well-known projections such as the Mercator and Mollweide, through to the more obscure Van der Grinten, and the heart shaped Bonne. It even features the gores required to make your own globe! I’ve scanned and combined the pages to make them scrollable.

I wish I’d seen this before I did something similar (but much less informative) a few weeks ago…!

Mapped: 5,000 Years of City Growth

I recently stumbled upon a great dataset. It’s the first to provide comprehensive data for world city sizes as far back as 3700BC. The authors (Meredith Reba, Femke Reitsma & Karen Seto) write:
How were cities distributed globally in the past? How many people lived in these cities? How did cities influence their local and regional environments? In order to understand the current era of urbanization, we must understand long-term historical urbanization trends and patterns. However, to date there is no comprehensive record of spatially explicit, historic, city-level population data at the global scale. Here, we developed the first spatially explicit dataset of urban settlements from 3700 BC to AD 2000, by digitizing, transcribing, and geocoding historical, archaeological, and census-based urban population data previously published in tabular form by Chandler and Modelski.
These kinds of data are crying out to be mapped so that’s what I did…
Read more (and get the R code)

Joy Division, Population Surfaces and Pioneering Electronic Cartography

There has been a resurgence of interest in data visualizations inspired by Joy Division’s Unknown Pleasures album cover. These so-called “Joy Plots” are easier to create thanks to the development of the “ggjoy” R package and also some nice code posted using D3. I produced a global population map (details here) using a similar technique in 2013 and since then I’ve been on a quest to find some earlier examples. This is because a number of people have said it reminds them of maps created by Harvard’s digital mapping pioneers in the 1970s and I got the feeling I was coming late to the party…

The pulsar style plots are already well covered by Jen Christiansen who wrote an excellent blog post about the Joy Division album cover, which includes many examples in a range of scientific publications and also features this interview with the designer Peter Saville.

Most interestingly, Jen’s post also includes the glimpse of the kind of map (top left) that I’d heard about but have been unable to get my hands on shown in the book Graphis Diagrams: The Graphic Visualization of Abstract Data.

My luck changed this week thanks to a kind email from John Hessler (Specialist in Mathematical Cartography and GIS at the Library of Congress) alerting me to the huge archive of work they have associated with GIS pioneer Roger Tomlinson (who’s PhD thesis I feature here). I enquired if he knew anything about the population lines maps to which he causally replied “we have hundreds of those” and that he’d already been blogging extensively on the early GIS/ spatial analysis pioneers (I’ve posted links below).
John sent me the below movie entitled “American Graph Fleeting, United States Population Growth 1790-1970” created in 1978. It’s extraordinary, both in how contemporary it looks but also because it was created as a hologram!

He writes:
In 1978 Geoffrey Dutton, who was at the Harvard Lab for Computer Graphics and Spatial Analysis, decided to make a spatial-temporal holographic projection based on the work of William Warntz (see my article How to Map a Sandwich: Surface, Topological Existence Theorems and the Changing Nature of Thematic Cartography for an image of the original Warntz population surface). Dutton’s surface projections were made from the ASPEX software with population data smoothed on to grid of 82 x 127 cells ( a lot to handle computationally at the time)…
The first two images below show the hologram in action and the third shows how it was created.

If you want to find out more information and this pioneering work (and remind yourself how far we have/haven’t come), John Hessler’s “Computing Space” series of blog posts are a great place to start:
From Hypersurfaces to Algorithms: Saving Early Computer Cartography at the Library of Congress
Ernesto and Kathy Split a Sandwich
Taking Waldo Tobler’s Geography 482
Papers of the “Father of GIS” Come to the Library of Congress
Computing Space IV: William Bunge and The Philosophy of Maps
The Many Languages of Space or How to Read Marble and Dacey
Mapping the Web or Pinging your Way to Infinity
Searching for Magpie and Possum: Contemplating the Algorithmic Nature of Cartographic Space
Games Cartographers Play: Alphago, Neural Networks and Tobler’s First Law

Roger Tomlinson's PhD: The first in GIS

Page from Roger Tomlinson thesis

The late Roger Tomlinson is considered the “Father of Geographic Information Systems” and he completed his PhD in the UCL Department of Geography in 1974. Tomlinson pioneered digital mapping – every map created using a computer today still uses the principles he laid down in his thesis and its associated work creating the “The Canada Geographic Information System“. I’m pleased to say that after over four decades of sitting on a shelf within the department we now have it fully digitised (and OCRed so it’s searchable) and available to download here.
The thesis is entitled “Geographical Information Systems, Spatial Data Analysis and Decision Making in Government” and it’s remarkably timeless in its content. So many of Tomlinson’s principles apply today – not just in his conception of the flow and types of spatial data elements…

…but also in the governance and impact of geographic data in the real world.
The maps themselves are amongst the first to showcase the value of combining spatial data for insight – in this case for the identification of areas with high potential for particular land uses given a list of priorities.
I was relieved to see that some things have changed since Tomlinson’s time as a PhD student. The thesis contains various tables of the costs – both in terms of person hours and $$ – for the various calculations required for his system. For example measuring the areas and perimeters of a few thousand polygons took 11.5 days (programming + processing) and cost $650 in CPU time!
Anyone working with spatial data should read this work at least once, if only because when we sought consent to post the work online Roger’s wife Lila said “I’m glad to hear that it will be disseminated far and wide”.  Here’s the link again.

Spinning Globes With R

It has been a long held dream of mine to create a spinning globe using nothing but R (I wish I was joking, but I’m not). Thanks to the brilliant mapmate package created by Matt Leonawicz and shed loads of computing power, today that dream became a reality. The globe below took 19 hours and 30 processors to produce from a relatively low resolution NASA black marble data, and so I accept R is not the best software to be using for this – but it’s amazing that you can do this in R at all!

The code I used to do this is posted below. Under the hood the ggplot2 package is used for the plotting, so the first few data prep steps are taking the raster and converting it into a format that works with that. For information about installing the required packages and some other examples see the mapmate vignette here – there’s a lot more to it than the below. The black marble dataset is from here.

#Load in the packages
#Load in the raster data
#Simplify the raster - to test this out I would set the value at 50+
marble<- aggregate(marble, 10)
#Extact the values and coordinates from the raster grid - this is what is passed onto ggplot2.
marble.pts<-rasterToPoints(marble, spatial=T)
marble.pts@data <- data.frame(marble.pts@data, long=coordinates(marble.pts)[,1],lat=coordinates(marble.pts)[,2])
names(marble.pts@data)<- c("z","lon","lat")
#Convert to the tidyverse, required for mappmate.
#We aren't plotting the image colours - rather a series of rectangles to be coloured by the pixel value. The range of colours needs to be specified. For this I have extraced the main colours from NASA's image and approximately aligned them to their corresponding values. This is seen the colour palette below that gets fed into the map.
pal<-colorRampPalette(c("#0b0c1a","#1e1c37","#202144","#2b3355","#7f6e61","#d0b695","#efd7af", "#fefbe6"), bias=2.75)
#some more magic here - see the vignette I link to above.
marble.frame <- map(1:n, ~mutate(marble.dat, frameID = .x))
rng <- range(marble.dat$z, na.rm=TRUE)
file <- "3D_rotating_simp"
id<- "frameID"
#OK - here goes! You need the parallel package up and running - mc.cores specifies how many processors to use. You can see I used 30 but this can obviously be less.
mclapply(marble.frame, save_map,"z", id=id, lon=0, lat=0, n.period=30, n.frames=n, col=pal(5000), type="maptiles", file=file, z.range=rng,png.args = list(width = 30,
        height = 30, res = 300, bg = "transparent", units="cm"),rotation.axis = 0,mc.cores=30)