1 of 25

Accessibility mapping

Making travel time maps to points of interest

Dan Weiss, Harry Gibson, and Allie Lieber

Thursday, June 14

2 of 25

Agenda

  • Project background and motivation

  • Overview and component parts

  • Accessibility mapping in Earth Engine

  • Accessibility mapping in R

  • Accessibility mapping in our online tool

3 of 25

Project background and motivation

Nelson, A. Travel time to major cities: a global map of accessibility. http://forobs.jrc.ec.europa.eu/products/gam/ (Global Environment Monitoring Unit, Joint Research Centre of the European Commission, 2008)

  • In 2008 Andy Nelson at the JRC produced a global map (circa 2000) of travel time to cities
    • This map proved to be a very useful covariate for mapping/modeling infectious diseases
  • Geospatial datasets and processing capabilities have advanced considerably since then
    • Open Street Map and Google Roads
    • Google Earth Engine
  • The timing (and collaborative partners) seemed right for making an updated map
  • Built with an eye towards the future
    • Encourage continuity, simple to update, and support custom, user-created accessibility maps

4 of 25

Project background and motivation

  • How are accessibility maps useful?
    • The travel time it takes people to reach a site affects how readily they can access its available goods and services
    • Basic assumption is that increasing travel time will decrease the likelihood of people visiting a site
  • We used cities for our destinations dataset as they are epicenters for many human activities and resources
    • Cities proved to be a useful proxy for economic, education, and health metrics
    • Alternatively we could healthcare facilities, places of employment, markets, etc.
    • By making all of the code and data public users can easily make their own maps

5 of 25

Project results - 2015 Global Accessibility Map

Weiss, D. J., et al. (2018). "A global map of travel time to cities to assess inequalities in accessibility in 2015." Nature 553: 333.

6 of 25

Project results - 2015 Global Accessibility Map

Weiss, D. J., et al. (2018). "A global map of travel time to cities to assess inequalities in accessibility in 2015." Nature 553: 333.

7 of 25

How does one make a travel time map?

Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem

8 of 25

Accessibility mapping overview and component parts

  • Start with a raster representation of the earth where every pixel has a cost or ‘friction’ for traversing it
    • Friction is a function of the Type and quality of transportation infrastructure or the landscape itself
  • Obtain a set of point features with geographic coordinates
  • Apply a least-cost-path algorithm*
    • Predicated on calculating the shortest path through a graph
    • Available in Earth Engine, R, etc.
  • Result is a raster of travel time to the most accessible point (not necessarily the closest geographically)

Dijkstra, E. W. A note on two problems in connexion with graphs. Numer. Math. 1, 269–271 (1959).

9 of 25

Component parts - the friction surface

  • Constructed in Earth Engine from
    • Roads (OSM and Google)
    • Railroads
    • Water features (rivers, lakes, and oceans)
    • International borders
    • Landcover
    • Topographic conditions (slope and elevation)
  • This is the surface we will use (and is publicly available)

Weiss, D. J., et al. (2018). "A global map of travel time to cities to assess inequalities in accessibility in 2015." Nature 553: 333.

10 of 25

Component parts - the feature points

  • Any points with know X,Y coords will suffice
    • Either a table or shapefile will work
  • We used the GHSL-HDC data
    • “Contiguous area with 1,500 or more inhabitants per square kilometer or a majority of built-up land cover coincident with a population center of at least 50,000 inhabitants”

Pesaresi, M. & Freire, S. GHS Settlement grid following the REGIO model 2014 in application to GHSL Landsat and CIESIN GPW v4-multitemporal (1975- 1990-2000-2015) data sets. European Commission, Joint Research Centre. http://data.europa.eu/89h/jrc-ghsl-ghs_smod_pop_globe_r2016a (2016).

11 of 25

Step-by-step instructions for making a travel time map

Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem

12 of 25

Accessibility mapping in Earth Engine

  • Where to find the code:
  • How to find (and import) the friction surface:
    • Results are available in Earth Engine by searching for “Global Friction Surface 2015”
    • Rename the imported raster ‘frictionSurface’
  • WARNING!!
    • If you’re someone who likes to work ahead, be aware that this script cannot run globally (memory limit error)

13 of 25

Accessibility mapping in Earth Engine

  • Get a sample set of points (we will use national capitals) and save on your computer
  • Make a fusion table
    • https://support.google.com/fusiontables/answer/2571232?hl=en
    • Click “Create a Fusion Table”
    • “Choose File” - select the capitals .csv you just saved and click next several times (accepting defaults)
    • Change the Country and Capital columns to type text and lat and long to location uncheck “two column location” (this is a quirk of GEE)
    • This table will be stored in your Google Drive (https://www.google.com/drive/)

14 of 25

Accessibility mapping in Earth Engine

  • How to get points into the script (we will use a .csv file as an example)
  • Paste the following line into the script (replacing the red text with your own fusion table ID):
    • var inputPoints = ee.FeatureCollection('ft:1VZv6gbCNleM4EeS-OI5734bkcb2P110_IS4LwYpQ');
  • Optional - comment out the export code (unless you want to save the raster)
  • To display your map, add the following line:
    • Map.addLayer(distance,{min:0, max:1000, opacity:0.7, palette:['FFFACD', 'CD8500', '8A360F','68228B']});

15 of 25

Accessibility mapping in Earth Engine

  • Important notes on the script:
    • The maxDistance threshold is very important
      • Too high and you will hit memory limits
      • Too low and you will get inaccurate results
      • Default of the script on the MAP page is 1,500,000 (in meters, so 1,500 km)
      • For the demo we use a smaller value (500 km)
    • What’s up with the ‘927.662423820733’ value in the export function?
    • This script is not suitable for global output (must be done in tiles) or high-latitude processing

16 of 25

An alternative approach for making a travel time map

Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem

17 of 25

Accessibility mapping in R

  • Requires having R installed along with the gdistance package (plus its dependencies)
  • Obtain the R script here:

https://map.ox.ac.uk/wp-content/uploads/accessibility/R_generic_accessibilty_mapping_script.r

  • Download the friction surface here:

https://map.ox.ac.uk/wp-content/uploads/accessibility/friction_surface_2015_v1.0.zip

18 of 25

Accessibility mapping in R

  • Why might we want to use R instead of Earth Engine
    • It won’t time out
    • It will work more reliably in high latitudes (be careful on tiling!)
    • Can be used to fix the +/- 180 degrees issue (with an alternate friction surface)
    • Doesn’t have a maxDistance and can thus be used in very remote areas
  • If R is so great, why use Earth Engine?
    • GEE can process much larger geographic blocks (and do so very quickly)
    • The hardware requirements to run the R code on even moderately sized areas are substantial
  • The optimal solution (at present) for global work is to use both and mosaic tiles

19 of 25

Accessibility mapping made easy

Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem

20 of 25

Accessibility mapping in our online tool

  • What if we don’t have access to Earth Engine or want an easier process?
  • The friction surface is safely stored in Earth Engine… We don’t need to worry about it to make more maps from it
  • To make more accessibility maps based on our friction surface, all we really need is a way of providing our points
  • Why not just click on a map
  • We set this up in AppEngine https://access-mapper.appspot.com/

21 of 25

Accessibility mapping in our online tool

22 of 25

Accessibility mapping in our online tool

How does it work?

  • Standard Google Maps runs in Javascript in the browser and allows creation of markers by clicking the map or reading a CSV file locally
  • Python script, running in AppEngine, provides a URL endpoint that the Javascript can call and send the marker point locations to Earth Engine
  • The Python script has access to Earth Engine via a service account login (user login not required). It adds the points sent from the browser to an ee.FeatureCollection, then it’s just the same code as we’ve already seen

23 of 25

Accessibility mapping in our online tool

Limitations?

  • The online tool interface lends itself to “interactive” creation of maps
  • However the Cost Distance process returns tiles quite slowly sometimes (depends on time of day!)
  • Like all Earth Engine processing what we see on the map is calculated “on demand” according to the zoom level we’re looking at
  • For cost distance mapping, the actual value is only “correct” at the native friction surface resolution. So to query values in the map we create we have to do that at the correct resolution regardless of zoom, which is sloooooow!

24 of 25

Accessibility mapping in our online tool

Limitations?

  • Likewise for exporting the map to a file, this can only meaningfully be done at the native resolution (as mentioned previously)
  • When we hit Export, the Python script calls the Export.image.toCloudStorage() equivalent function so is subject to the same limits on latitude, area etc that we mentioned previously
  • We can’t really make use of the normal techniques for speeding up AppEngine-based EE apps - because the user is making a brand new dataset each time, we can’t cache it etc.

25 of 25

Thanks!

  • MAP would like to acknowledge:
    • JRC Team (past and present): Andy Nelson, Steve Peedell, and Will Temperley
    • Google Team: Allie Lieber, Matt Hancher, and Eduardo Poyart
    • Vizzuality team: Simao Belchior, Juan Carlos Alonso, Gerardo Pacheco, Edward Brett, Alicia Arenzana, and Benjamin A. Laken
  • Contact information