How can we measure how green our towns and cities are?

We’re all much more aware these days of the environment we live and work in, and recognise trees’ ability to help absorb some of the excess carbon dioxide from our atmosphere.

Areas including  Greater Manchester and Northumberland, and organisations like Trees for Cities are actively trying to increase the number of trees and people’s connection with them.

There are various approaches people have developed to work out how physically green a city or town is.

The OECD gathers international data on Depletion and Growth of Forest Resources, open access data available from the UK Data Service.

A couple of years ago, the BBC website highlighted a tool which had been devised to map four types of land use in local authorities: farmland, natural, built on and green urban.

The ONS Data Science Campus has also developed algorithms for mapping the urban forest at street level.

I was intrigued then, when I read a recent article in the Guardian: Green streets: which city has the most trees? about another approach to mapping how tree-filled cities were.

The two particularly interesting things? Firstly, that the work had been based on Google Maps Street View data and secondly that the team at the MIT Senseable City Lab made the code open source.

The researchers at MIT (in collaboration with the World Economic Forum) developed Treepedia, which currently analyses and maps the above-ground tree cover in 27 world cities (with more promised).

Treepedia map of Sydney, showing Green View Indicator percentage

Where other approaches have used satellite mapping, the MIT researchers calculated what they term the ‘Green View Index’ (GVI) using Google Street View (GSV) panoramas.

Taking this approach meant the researchers were able to represent how people perceive their environment at street level. Their GVI uses a scale from 0-100, representing the percentage of canopy coverage at any particular location.

The team go into detail about their methodology for creating the GVI in several papers, including their most recent:  Mapping the spatial distribution of shade provision of street trees in Boston using Google Street View panoramas.

One particular quirk of the team’s chosen method for calculating a Green View Index for an area is that it is (as they acknowledge) limited by where Google Street View vehicles can access.

This leads to the interesting side-effect that their Treepedia map of the Manhattan part of New York has a large dark space where Central Park is. That said, this approach does highlight the amount (or lack thereof) of trees on town and city streets, which in itself is an opener for discussion.

Treepedia map of Manhattan, New York showing the 'empty' space of Central Park

While Treepedia covers a limited number of international cities currently, the team are keen to share their code and have released an open-source Python library that can be used to compute the Green Value Index for any city or region. You will need a GIS file for the street network of your chosen area and a Google StreetView API key. The library can be downloaded from GitHub.

Have you tried mapping how green your area is? Let us know in the comments below.

Mapping census data with ArcGIS Online

Rachel Oldroyd and Luke Burns work step by step through the process of using ArcGIS Online to map census data.

Geographical Information Systems (GIS) have been marked as one of the most important technological developments of the 21st century, providing powerful analytical tools which inform decision making across a number of disciplines. GIS now forms part of the Secondary Geography Curriculum in England, but it’s often difficult for teachers to delegate time to learn a new piece of software alongside other conflicting priorities.

In this tutorial we use a free, online GIS to map UK 2001 census data. ArcGIS Online, provided by ESRI, is easy to use and does not require downloading or installing, so is well suited for use in the classroom. We provide step by step instructions to map and interpret census data, we also provide debugging tips which cover some of the common problems encountered with ArcGIS Online.

Open ArcGIS Online now using your Web Browser by visiting www.arcgis.com/home/webmap/viewer.html. There is no need to make an account or sign in for this tutorial, however doing so provides access to more advanced functionality.

Click on the ‘Modify map’ link from the top right hand corner of the page to begin.

The Web Map Viewer

  1. On the homepage you will see a new map which is centred on the UK. There is a toolbar along the top of the window with a number of different tools and a side panel on the left hand side.

 

  1. At the top of the side panel, you will see three buttons, ‘About’, ‘Content’ and ‘Legend’ which provide further information about the map and the content. If you click on the legend and content buttons now, you will see that the map is currently empty aside from the base map which is called ‘topographic’.

 

  1. To navigate the map window you can click and drag the map to pan to a different location. You can also zoom in and out, zoom to the default extent (the UK) or zoom to your current location using the buttons on the left hand side of the window.

  1. At the moment we are using a base map called ‘topographic’. You can change the base map by clicking on the ‘Basemap’ button on the left hand side of the top toolbar.

  1. Using the zoom and pan buttons, locate Leeds and zoom in such that it occupies the majority of your screen.

Finding Census Data

We will now add 2001 census data. The UK Data Service website contains a wide range of census data to work with.

  1. In a new tab in your web browser. Visit the census pages of the UK Data Service website at the following link: http://casweb.mimas.ac.uk. This website contains huge amounts of census data and as such you will need to specify which data you would like and at which geography (e.g. which country, county, city etc).

 

  1. From the CasWeb homepage, click the ‘Start CasWeb’ link followed by the first link ‘2001 Aggregate Statistics Datasets (with digital boundary data)’. This data format comes in a geographical format (a shapefile) and is ready to map. [Note: unfortunately we cannot use 2011 data as it does not come in the same geographical format, but later in the exercise we compare the 2001 dataset to the 2011 dataset and discuss the changes]. Notice that you can also download data from as far back as 1971.

  1. We now need to specify where we would like to download our census data for – this could be anywhere, but we will focus on West Yorkshire. Use the on-screen options to locate West Yorkshire by selecting the country (England), then ‘select lower geographies’, then select the region (Yorkshire and The Humber), then select ‘Select Counties’, then select the County (West Yorkshire). The illustrations below step you through this process:
  • In Step 1, we specify the country to select. Then choose ‘select lower geographies’ to select a region within England.

  • In Step 2, we narrow down our search for West Yorkshire by specifying the region in which it belongs.

  • In Step 3, we are able to select the West Yorkshire county having searched through the country and region to find this.  Here we can click the ‘Select output Level’ button as we do not need to continue our search.If we wanted to continue and filter Leeds, Bradford etc. we could do.

 

  1. Before we choose the variables to download we first need to specify a geography. Notice the four options presented to you at the bottom of the screen: District, ST Wards, CAS Wards and OA. The smaller the geography, the more detail you will get – you can think of this as being similar to cutting a cake, you can cut it into big or small pieces. In this example, these pieces range from Districts (5 pieces – one for each of Leeds, Bradford, Wakefield, Calderdale and Kirklees) to OAs (7,131 tiny pieces). Let’s select CAS Wards which breaks West Yorkshire down into a manageable 126 areas – select CAS Wards followed by the ‘Select Data…’

  1. Now it is over to you! Using the table towards the bottom of the page, browse the different datasets that you can download for West Yorkshire.  You can highlight a row and click the ‘Display Table Layout’ button to explore the range of data available within each themed table.  Select two datasets that may interest you.

Example using ‘people with poor health’

The instructions below show how to select the number of people with poor health but you should choose a dataset that interests you.

  1. To select persons with poor health visit the ‘Health and provision of unpaid care’ row (KS008) and click the ‘Display Table Layout’

  1. Browse the options available and select box 6 – people who report their general health as ‘Not Good’.

  1. To add this data to your ‘basket’ to download, click the ‘Add variables to data selection’ button above the table. Notice how this adds to the list of data to be downloaded on the right-hand side of the page.

  1. You can then continue searching for data by using the back button above the table or you can proceed to download your data by selecting the ‘Get Data’ button to the top right of your screen.

 

  1. The final step is to give your data a name and select the file format. As we want to map the data we need to check the little button next to Digital Boundary data. You can then click ‘Execute Query’ which will start saving your data to a specified location.

 

Mapping the Data

We have now sourced and downloaded some census data. You may have downloaded the health data stepped through above or you may have downloaded different data. Hopefully you have at least two datasets to explore here as we look to map this.

 

  1. Now, let’s add the data you have just downloaded from CasWeb to ArcGIS Online. In ArcGIS Online, click on the down-arrow beside the Add button to the top left of the main window and choose Add Layer from File. Browse to find the zipped CasWeb file you downloaded earlier, select this and click Import Layer. This may take a few seconds to display on screen.

 

  1. ArcGIS Online will add a default style but this is not always appropriate. Using the drop-down attribute box to the left of the map widow, select one of the variables you downloaded (these will be the longer numbers, in order of selection on CasWeb). You may need to go back into CasWeb to find out which variables the numbers refer to.

  1. Select one of the variables and notice how the software tries to map this for you. Experiment with the display options to show this in a way that you are happy with (e.g. using the Counts and Amounts (colour) option).  Click Done once complete to save this.

 

  1. Spend some time navigating the map and trying to understand the spatial distribution of your data (in the example provided, people who report ‘not good’ health). You may wish to add area labels to make this easier.  Clicking on the three dots “…” beside your map layer and choose Create Labels. Choose Area Labels as opposed to the code to add more useful labels.

 

  1. By this point you may be happy to stop and re-practice the above and if so that is fine – you have downloaded data, mapped it and looked for spatial patterns. However, a nice addition to this session is to compare the currently mapped data with a second dataset to see if any patterns exist between the two.  As you already have one dataset mapped (in my case, people who report ‘not good’ health), it is time to add a second.  To do this, click on the little three dots beside your map layer again “…” and click Copy.

 

  1. This will create a duplicate map layer. You can now repeat the steps followed previously to display a second dataset using this layer (for me, my second dataset is households without access to a car).  Note that this time it would be wise to choose a different method of visualisation so one dataset can be seen ‘on top’ of the other.  If you used Counts and Amounts (colour) last time, using Counts and Amounts (size) this time will enable you to see both datasets at the same time and hopefully draw some comparisons – see my example overleaf.

 

  1. Once selected, click Done and ensure that the map legend (or key) is showing by clicking on the appropriate icon to the top left of the screen. Doing this will enable you to see what colours/symbols represent high values and those that represent low values. You can then explore and compare the data layers.

Follow up questions

If you are running this tutorial with your students, you may want to ask them to think about the following questions:

Q1.  What patterns do both of your datasets show?  What parts of West Yorkshire show particularly high and low values?  Are there are reasons for this?

Q2.  Do both datasets seem to correlate in any way – for example, do they both have high and low values in the same areas or are these rather different?  Does this pattern match what you might have expected?

Q3.  Can you think of any problems with presenting data in this way?  Are the colours or symbols misleading?

Q4.  Visit the Datashine website to compare your dataset(s) from 2001 to those from 2011.  Are the patterns the same or have things changed?  http://datashine.org.uk/ [Note: You will need to pan the map to find West Yorkshire and then use the menu (top right) to locate and map the data – you may find that your datasets(s) aren’t available to select though as the website only contains a selection!]

Debugging tips

The ArcGIS online software is extremely easy to use, only occasionally should you run into problems. Here are a few common scenarios and how to fix them:

1) The ‘Add’ button isn’t visible on the top toolbar.

Simply click the ‘Modify Map’ button in the top right hand corner and it will appear.

2) The ‘table of contents’ panel has disappeared.

Click the ‘Details’ button on the top left hand size of the page and it will reappear.

5) I can’t find the option for ‘change style’

In the ‘Details’ window on the left hand side of the page (see 2 if you can’t see this), ensure that the middle tab is selected – named ‘Show Contents of Map’- hover over the layer name and you will see the ‘Change style’ icon.

6) I’ve changed the style and now I can’t get rid of the ‘Change Style’ window.

Ensure you have clicked ‘OK’ or ‘Done’ at the bottom of the left hand window. The default ‘Details’ window should then appear.

In the very unlikely event that you run into a problem you can’t fix, close the window down and reopen the map.


rachel oldroyd

Rachel Oldroyd is one of our UK Data Service Data Impact Fellows. Rachel is a quantitative human geographer based at the Consumer Data Research Centre (CDRC) at the University of Leeds, researching how different types of data (including TripAdvisor reviews and social media) are used to detect illness caused by contaminated food or drink.

Luke Burns is a Lecturer in Quantitative Human Geography at the University of Leeds. His work focuses on the advanced application of geographical information systems to socioeconomic problems & the development of geodemographic classification systems and composite indicators.  

Mapping divorce and religion in the Czech Republic

Divorces, religion and education in the regions of the Czech Republic, 2011 (data about divorces from 2018)

Klara Valentova explores mapping data from her home country.

Note: In the following maps, darker colour and higher layer signify higher proportions of whichever variable is being portrayed.

Map 1 presents the divorce rate in different regions of the Czech Republic in 2018.

Divorces are most prevalent in the Central Bohemian Region, which surrounds the capital city Prague. Prague has a lower percentage of divorces, and one could argue that’s because young people move to Prague, where they find a partner, get married and start a family, move outside of Prague to the Central Bohemian Region, where they eventually get divorced. We can also see that there are quite high divorce rates in the North and South East of the Czech Republic.

Map 1: Divorce rates in the regions of the Czech Republic, 2018

 

Map 2 shows the proportion of religious population in regions of the Czech Republic in 2011.

The most religious regions are in Moravia, the East part of the country, while there is a little religious population in the North West. A surprising finding is, that some of these regions with very religious people have quite high rates of divorces as seen in Map 3, while in non-religious regions in the West Bohemia, divorce rates are relatively low. And so Czech Republic does not necessarily follow the believed phenomenon of religious people getting divorced less than non-religious people.

Map 2: Rates of religious population in the regions of the Czech Republic, 2011

 

Map 3 shows the distribution of people with a university degree across the regions in the Czech Republic in 2011.

In general, the North and the division between Bohemia and Moravia have the smallest number of people with degrees, while in the capital city, there is an enormous peak with nearly half of the population having a university degree. The South Moravian Region has the second highest proportion of people with university education, which can be explained by the second biggest city in Czechia, Brno, being situated there. However, there seems to be no correlation between education and religion or divorce rates in the Czechia.

Map 3: The distribution of people with a university degree in the Czech Republic, 2011

 

The data are available at: https://www.czso.cz/csu/czso/home, and the boundary data for Czech regions at: http://www.diva-gis.org/datadown. Both files were then uploaded to QGIS, joined, coloured by the proportions, and subsequently turned into 3D maps with higher areas corresponding to higher proportions to enhance the differences even more.

You can play with the 3D maps by following the links below. Please note that the maps can take some time to load.

Mapping the census – connections between language ability and health

Rabia Butt uses mapping to explore possible connections between health conditions and fluency in English.

From the UK census of 2011, I decided to compare people whose first language isn’t English, but they can speak very well, or they cannot speak at all. I was trying to discover how their proficiency in English would have influence on their general health.

I got my data from the UK Data Service Infuse website and compared the results at England wards level.

My first 3D map showed results of people health who have said that their health is good.

The results were what I had expected them to be: people who can speak English had claimed that their health is good, by a significant amount compared with people who cannot speak English.

Whereas, when I was comparing the result of people who have said their health is not good showed that people who can people speak English claimed that their health is not good more than of people who cannot speak English.

I had expected the results to be other way around, however there may be many other reasons or factors that had an influence on the results. The 3D maps with my data were able to show me which places had the highest peaks and where it was the lowest.

This 3D map is of people in England whose health isn’t good comparing with people who can speak English and cannot. The orange represents people whose health is not good, but they can speak English and the colour green is for people whose health isn’t good and they can’t speak English. The lighter the colour is the less people there whose health isn’t good. The darker the colour the more people there are with health isn’t good.

 

This 3D map is of people with good health and can speak English.

 

This map is of people whose health is good and cannot speak English.

You can play with the 3D map by following the link below. Please note that the map can take some time to load.

Mapping gender in Pakistan

Rabia Butt explores mapping data from her home country.

I created my first 3D maps from using the census data that interested me, so I chose to use the Pakistani census data of 2017 and 1998 to look at the difference in the gender population of Pakistan in 3D maps.

I got my data from the Pakistani census website. I created a map which showed the different gender population in Pakistan in 2017 which had male, female and transgender. The transgender population was extremely low and the there was a difference in the male and female population as well as male was higher than female.

Therefore, I decided to compare the 2017 result the previous census of Pakistan which had a 19 year gap since the latest census. The previous census did not include transgender people and there was still a gap between the male and female population as male population was still higher than female.

This map shows the population of Pakistan from the census of 1998. The blue represents male and pink female.

 

This map shows the population of Pakistan from the census of 2017. The blue represents male and pink female.

 

You can play with the 3D maps by following the links below. Please note that the maps can take some time to load.

Mapping annual net income in the UK

Annual net income in the UK in 2016 for Middle Super Output Areas (MSOA) – Before and after housing costs

Klara Valentova has been exploring mapping of data.

Note: In the following maps, darker colour and higher layer signify higher income for the specific area.

Map 1 shows the annual net income before housing costs in the UK in 2016. The highest income is distributed in the South East, notably around London with peaks in central London such as Westminster or Chelsea. However, income in nearly all areas in Wales is lower than in most areas in England.

Map 1: Annual Net Income Before Housing Costs in the UK for MSOA, 2016

 

Nonetheless, when looking at Map 2, displaying annual net income after housing costs, suddenly the huge differences between the areas have vanished.

The highest incomes are still distributed in the South East, but we can see that in big cities in the North of England, the incomes are almost as high as down south. The peaks in the London area persist but there are more of them now, and they are mostly around London rather than in the city centre as it used to be before accounting for housing costs. This can be explained by the incredibly expensive living costs inside London.

Map 2: Annual Net Income After Housing Costs in the UK for MSOA, 2016

 

The data for both of the maps are available at: https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/smallareaincomeestimatesformiddlelayersuperoutputareasenglandandwales.

The files were uploaded to QGIS, together with boundary data for MSOA, available from: https://borders.ukdataservice.ac.uk/. These two layers were then joined, and the map coloured by the income level.

The map was subsequently turned into 3D with the height of the areas corresponding to the income level to enhance the differences even more.

You can play with the 3D maps by following the links below. Please note that the maps can take some time to load.

Exploring Kepler.gl

Shows the home page of the Kepler.gl site

Kepler.gl is an open source mapping tool that claims to work for large scale datasets.

It has been developed by Uber, where they have developed an in-house solution based on open source components which they use to analyse their data. Luckily for us, they decided to make their solution open source and available to us.

Kepler.gl works within your browser, which is a nice feature as it means you retain control of your data, which could be important if you wanted to map data which could contain sensitive data.

To try the system out I downloaded our 2011 Census Headcounts, in particular the file called UK postcode data and supporting metadata for 2011 frozen postcodes, which is a zip file.

I unzipped this, ready for me to load into Kepler.gl. I chose this dataset as I know it contains latitude and longitude information, as well as population and deprivation data.

Uploading data was pretty straight forward. There’s an option to browse for your data file or drag and drop the file into the browser.

A slightly annoying bit for me was that map opens focused on San Francisco, when I know the data I added was for the UK. But it was easy to refocus the map on the UK using the standard grab-and-pull functionality.

To map the data, I needed to add a layer and choose the type of data.

For this data I knew it was point data. I also entered a name of the layer. I called it 2011 Census Postcodes. It’s possible with Kepler.gl to add more than one layer so giving your new layer an meaning full name is useful.

It next asked for the fields that contain the Lat(latitude) and Lng(longitude).

In our data I discovered that we mislabelled them, so the field names were the opposite of what they should be (I’ll get this corrected).


You’ll notice that there is the option to add a field to represent the Altitude. For this initial visualisation, I left that blank.

This now created a map showing UK postcodes, but (to be honest) it was a bit boring.

Kepler.gl has the option to colour the postcode points based on the value of a field.

In this data, were the UK Townsend Deprivation scores as quintiles calculated at the output area level, so I used this field to colour-code the points. I also sized the points based on the number of people living in that postcode.

The finished map of the UK shows a very mixed view, but if you zoom into a town and city you can then see the differences between postcodes.


For example, here’s a map of Belfast showing differences in deprivation between postcodes. Dark red is less deprived and yellow is most deprived.

Overall I found this web app easy to use, but it may give some issues for people unfamiliar with mapping.

However, as a free tool to map data without sending it back to a server it presents an option to map more personal data without the worry of having this data hosted some where you don’t know.


Rob Dymond-Green is a Senior Technical Co-ordinator for the UK Data Service, working with aggregate census and international data.