All about that base(map)

Carbon & Place calculator poster
Malcolm Morgan, EDRC
News 31 July, 2024

We recently launched the most significant update to the www.carbon.place website in years. This is the first in a series of blog posts explaining the plans for the next few years. But before we delve into the new, here is a little recap.

In 2020, as part of the Centre for Research into Energy Demand Solutions (CREDS), we launched the Place-Based Carbon Calculator (PBCC). This free map-based tool showed the carbon footprint of every neighbourhood in England.   The tool was a big success, and when CREDS finished in 2023, the Energy Demand Research Centre (EDRC) agreed to keep it going and fund a major upgrade. We are approaching the first year of the EDRC, so it is an excellent time to reveal some of our early work.

New name, same mission

The most obvious change is that the website has been rebranded Carbon & Place. This is because we wanted to add more tools to the website, so we needed a clear way to refer to the website as a whole as distinct from the Place-Based Carbon Calculator tool specifically. We wanted to keep the easy-to-remember URL www.carbon.place and many people called the tool “Carbon Place” anyway. So Carbon & Place is the website, and the PBCC is now one of five tools.

The Place-Based Carbon Calculator will become one of five tools on the Carbon & Place website

Figure 1: The Place-Based Carbon Calculator will become one of five tools on the Carbon & Place website 

At the time of writing, the website now has four tools. The original PBCC, which will be maintained until its successor is ready, and three new Beta tools on the topics of Transport & Accessibility, Land Use & Planning, and Land Ownership. One extra tool is in the works on building retrofit, and we can add further tools if needed.

The three new tools are in Beta, which means they may still have some bugs and rough edges to iron out. I’ll be writing a blog post about each tool shortly, but in this post, I want to discuss what ties them all together.

The basemap: A common framework for place-based data visualisation.

While each tool is thematically different under the hood, they share much in common and often try to solve the same problems. Each tool embodies the principle of “Think globally, act locally” by taking big complex issues, like climate change, and trying to express them within a local context. I’ve written before about how maps that let you zoom into your area make complex and abstract research personally relevant. However, for these tools to work, the map must be easy to navigate, and the data visualisation must be understandable to a wider audience. So, my first task was to completely rebuild the foundations of the map to enable the best possible tools.

A choice of backgrounds

One of the challenges of data visualisation is that people’s vision varies a lot; things that are clear to one person are confusing to another. One way to address this is to give users a choice of background map. Each map can use a different colour palette and emphasise different features. It is a minor feature but greatly benefits those needing it.

Figure 2: A variety of basemaps are included in the new tools

Figure 2: A variety of basemaps are included in the new tools

Rebuilding the basemap also allowed for other quality-of-life features, such as optional place names and anti-aliasing to improve the visual quality of the maps.

Into the third dimension

Maps are traditionally flat, but our lives are not 2D. Terrain affects the weather, what and where we build, travel choices, and our sense of place. Interactive maps need not be limited to two dimensions, and many people are now familiar with detailed 3D maps from services like Google Earth. So, adding true 3D support was an early goal for the map. While I don’t have Google’s resources to create photorealistic 3D cities, some significant improvements can be made.

The first step was to build a high-resolution Digital Terrain Model (DTM) and Digital Surface Model (DSM) of Great Britain. A DTM is basically a big picture where every pixel contains the elevation of the ground. The difference between a DTM and a DSM is that DTMs measure ground level while the DSM includes things on top of the ground, such as buildings and trees.

Picture comparing the old hill shade effect to the new one. The old shade effect looks much less realistic and defined than the new one

Figure 3: Comparing the old hill shade effect (left) to the new one (right)

The original PBCC had a 50m resolution hill shade, based on the free OS Terrain 50, which gives a rough sense of the terrain at a national scale but does not look realistic when zoomed in. Instead, I turned to the LIDAR data published by the Environment Agency, Welsh, and Scottish Governments. I stitched together my own map at a 2m resolution. This was no small feat. The 50m DTM was a hefty 442 megapixel image; for context, a photo taken on your phone is typically 2-3 megapixels. But the 2m DTM comes in at a mind-blowing 237,935 megapixels. But the image above speaks for itself. Rather than a vague sense of hills and valleys, you can see the detailed texture of the terrain. This makes the maps more realistic and aids navigation as people can recognise local features. For example, I’m especially pleased that the White Cliffs of Dover now look more like cliffs in Carbon & Place than they do in Google Earth.

Figure 4: The cliffs of Dover do not look very cliff-like without a high-resolution DTM

Figure 4: The cliffs of Dover do not look very cliff-like without a high-resolution DTM

Having a high-resolution DTM and DSM also enables the extraction of building heights. 3D buildings add to the sense of realism. They will also aid in future work on the analysis of buildings by clearly separating tower blocks from houses.

Figure 5: 3D Buildings in Leeds

Figure 5: 3D Buildings in Leeds

Unfortunately, the coverage of my new DTM is not universal. In England, coverage is over 95%, but in Wales, it is about 70%, and in Scotland, only about 40% (mostly in southern and central Scotland), so I’ve had to infill with 50m data in places. Fortunately, the coverage is concentrated in the most populated places, so a higher proportion of people are covered even if the beauty of the Highlands is slightly lost.

Figure 6: A join between the smooth 2m terrain data and the pixilated 50m data

Figure 6: A join between the smooth 2m terrain data and the pixilated 50m data

I’ve only begun to scratch the surface of what is possible with this new data. For example, it could be used to analyse whether buildings are suitable for rooftop solar panels. However, the foundations are now in place to enable 3D to be used with every tool on Carbon & Place.

Dasymetric Mapping

One of the common questions I got from users of the PBCC was; “why is that park high carbon?” This was due to a common misunderstanding of what the maps were showing. Within the PBCC, the data is for small areas called Lower Super Output Areas (LSOAs). LSOAs are contiguous; there are no gaps between them, and every part of the country is inside an LSOA. However, the data I am visualising is often about the houses or the people within them. So, the park isn’t high carbon; the households within the same LSOA as the park are high carbon. The park just happened to be there. This is a failure of data visualisation. It is my job to make the message clear, not for the public to understand the intricacies of statistical geographies.

So, I’ve turned to a mapping technique called dasymetric mapping. Dasymetric maps differ from traditional Choropleth maps in that they only colour the buildings within an area rather than the whole area.

Figure 7: Dasymetric (left) and Choropleth (right) mapping techniques

Figure 7: Dasymetric (left) and Choropleth (right) mapping techniques

Dasymetric maps highlight that the data refers to the buildings and/or occupants rather than the areas and aids in navigation by making the roads and buildings more visible. On the downside, they can be more visually cluttered, so I provided a toggle to switch between the two modes.

While dasymetric maps help with the “high carbon park” problem, they don’t help with it inverse the “low carbon airport”. This happens when an LSOA contains a mix of residential and non-residential buildings, and data about residential buildings are used to colour non-residential buildings. Again, this is a problem because the LSOAs do not have any gaps. So, I’ve been pushing the map further by classifying buildings based on their use, ultimately allowing domestic and non-domestic data to blend seamlessly.

Under the hood

In addition to the visible enhancements, there have been many improvements to the code base that will make future updates easier to deliver. The analysis code has been completely rebuilt using the targets pipeline, which makes the code more modular easier to update and rerun. On the front end, almost every line of code on the website has also been rewritten. Notable changes include upgrading from MapLibre 2.4 to 4.5; using pmtiles as the underlying data store for the map data; and including dynamic help text drawn from the manual. I should give a big thank you to Martin Lucas-Smith for his work on the Network Planning Tool (NPT). He took my inelegant code from the PBCC and updated it for the NPT, and I, in turn, took the NPT code as the starting point for Carbon & Place. This is a lovely example of the symbiotic relationship between open-source projects.

There is much more to discuss, but for now, try out the new Carbon & Place website; any feedback is welcome.

EDRC logo
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.