VOOZH about

URL: https://towardsdatascience.com/how-to-create-and-use-isolines-to-understand-catchment-profiles-e8847bbdff68/

⇱ How to create and use Isolines to understand catchment profiles | Towards Data Science


How to create and use Isolines to understand catchment profiles

This post shares how to create, use and understand isolines – an incredibly powerful tool for data scientists!

9 min read

Introducing isolines – catchments based on transport networks and journey times.

👁 Isolines created in CARTO - keep reading to find out how to create these! Source: CARTO
Isolines created in CARTO – keep reading to find out how to create these! Source: CARTO

Isolines are an incredibly powerful tool for Data Scientists, showing the areas that can easily access a given location. You may have also heard these referred to as isochrones, trade areas or journey time catchments. No matter their name, the concept is the same – they measure the areas which a site is accessible from based on a set distance or time, such as 1 mile or 20 minutes. These calculations are based on travelling along the actual transport network, including highways and – where appropriate – cycleways and footpaths.

In this guide, we’ll explain the difference between isolines and fixed-distance buffers, share how you can easily compute isolines, and finally share how you can derive insights from these.

This post is by Helen McKenzie, a Geospatial Advocate at CARTO.

Fixed-distance buffers vs isolines

👁 Illustrating the difference between isolines and fixed-distance buffers. Source: CARTO.
Illustrating the difference between isolines and fixed-distance buffers. Source: CARTO.

A fixed-distance buffer is exactly what it sounds like. These compute the catchment of a location based on a fixed distance in every direction from that location. It doesn’t take into account whether travel in all these directions is possible.

You can see this concept illustrated in the visualization above – the blue circle is a fixed-distance buffer. It doesn’t consider the transport network, and indicates that travel is possible across water.

A fixed-distance buffer has the advantage of being quicker to compute and cheaper to store than the more geometrically complex isolines. However, fixed-distance buffers can be misrepresentative as they assume that all areas within that distance can be easily accessed by individuals. That may not be the case for multiple reasons, such as:

  • Natural barriers such as coastline, rivers or lakes may obstruct travel.
  • Man-made barriers, such as private land, could prevent people from accessing certain areas.
  • The network of streets and – if looking at active travel modes – footpaths which comprise an area may not allow for unimpinged travel around a catchment. For example, streets may be one way or dead-ends.

With that in mind, are there ever any circumstances where you should use fixed-distance buffers rather than isolines? Absolutely!

One such instance is if you are looking at creating a catchment for a location where you know the transport infrastructure around that location will undergo a major transformation. An example of this would be computing the catchment of a store at a new shopping mall (a common use case for Data Scientists in Retail / Real Estate). It is likely that the highway network around that new mall would be completely reconfigured, and assessments based on the current network would be completely misrepresentative. In this case, a more "indicative" fixed-distance catchment is more appropriate.

Secondly, as we mentioned earlier, isolines are more expensive to compute and store than fixed-distance buffers. Additionally, isoline calculations also take advantage of Location Data Services.

Creating catchments: what you need to know first

Before diving into creating a catchment (in this case using CARTO), there are a few parameters you’ll need to decide on.

Mode of travel

The Analytics Toolbox allows you to select one of two modes of transportation; car or pedestrian.

When selecting "car," your analysis will be limited only to parts of the transport network which allow vehicles. The catchment will also be subject to traffic conditions and restrictions (such as one-way streets) for each street in order to best mimic actual driving conditions.

Conversely, when creating a pedestrian catchment more of the transport network will be opened up such as footpaths, cycleways and paths. This analysis also won’t be affected by road speeds or restrictions, but will avoid major highways like interstates and motorways deemed unusable for pedestrians.

As pedestrians and cyclists generally use the same infrastructure, you can translate this into analysis for cyclists. Cyclists typically travel 3.75 times faster than a pedestrian, and this figure can be used to scale isolines appropriately e.g. a 30-minute cycle isochrone could be calculated based as an approximate 2-hour pedestrian walk.

You can see the difference between car and pedestrian catchments in the example below, originating at the south east corner of Central Park, NYC (the white disk). The green 5-minute walking catchment travels about the same distance in all directions, including through Central Park. Contrasting this is the purple 3-minute walking isochrone, which can neither traverse the park nor drive against one-way restrictions, such as along the southbound Fifth Avenue.

👁 Drive time vs walk time isochrones. Source: CARTO
Drive time vs walk time isochrones. Source: CARTO

Isochrones vs isolines

When creating catchments, there are two main types to choose from; isochrones (catchments based on journey times e.g. how far can I travel in 10 minutes?) or isolines (based on journey distances e.g. how far along the transport network can I travel in 1km?).

When analyzing active travel modes (i.e. walking and cycling), it doesn’t hugely matter which you choose as travelers will typically move at a fairly constant speed. However, if you are looking at a vehicular mode this will matter, as isochrones will be affected by road speeds and traffic conditions whereas isolines will not.

Creating isolines: a guide

Now we are ready to isochrone! These functions are currently available when connected to either a Google BigQuery or Snowflake data warehouse and we’ll run this analysis from a SQL console.

Isolines with SQL

To start, make sure you are using a point table; ST_CENTROID() can be used to create a central point from lines and polygons if necessary.

For BigQuery users, the basic syntax is below. Users should select whether the mode is car or walk and if they want to measure their trade area in terms of time or distance. For time, the number (in integer format) used should be in seconds and for distance it should be in meters. You’ll need to reference the Location Data Services (LDS) API URL and token. These can both be found in the CARTO Workspace in the Developer tab.

CALL 'carto-un'.carto.CREATE_ISOLINES(
 'input-query',
 'my-schema.my-output-table',
 'my_geom_column',
 'car/walk', number, 'time/distance',
 'my_lds_api_url', 'my_lds_token'
);

If you’re a Snowflake user you can check out our guide to running isolines from your data warehouse here.

Make sure you replace ‘carto-un’ with the appropriate prefix if your data warehouse is not in the United States region.

Check out our example! The map below illustrates areas within a 15 and 30-minute walk from McDonald’s across Orlando, Florida. The locations for this were obtained via our data partner Safegraph’s Places dataset.

👁 15-minute and 30-minute walk isochrones, originating at McDonald's stores across Orlando. Source: CARTO.
15-minute and 30-minute walk isochrones, originating at McDonald’s stores across Orlando. Source: CARTO.

Isolines and spatial insights

There may be times when producing a trade area is the end goal of your analysis. However, in general, this is just a crucial step to unlock further insights from your analysis.

Below are three examples of the types of insights you can gain from creating isolines.

Insight 1: Trade area demographics

Being able to understand the number and characteristics of people living or working within a trade area is invaluable. For instance, a retail analyst would be able to assess the size of the potential market of each store based on who could actually travel to their store. They could take this further and work out how many people are likely to walk, cycle or drive to their store and use this to plan parking facilities or focus marketing campaign investments.

A great way to understand this is using Enrichment Tools. These tools allow users to quickly and easily calculate characteristics of an area based on attributes from another dataset – either one of their own or from third party data sources.

Extending our McDonald’s in Orlando example above, we’ve enriched our 30-minute walking isolines with the total population (freely available via the American Community Survey here) as well as a "fast casual affinity" index. This index is available through Spatial.ai’s Geosocial Segments dataset. It scores people against 72 indexes based on their experiences, personalities, feelings shared over social media platforms.

👁 Using isochrones to understand demographic profiles of store catchments. Source: CARTO.
Using isochrones to understand demographic profiles of store catchments. Source: CARTO.

Insight 2: Reverse trade area demographics

In many cases, it’s not actually the people who have access to a service that you will be most interested in; it’s the people who don’t. Being able to work out where people don’t have easy access to a store or service is fundamental to strategizing future expansion. In these cases, it’s the areas outside each catchment that is of most interest.

For instance, in the map below the light blue area highlights all of the places in our study area (consisting of the Orange, Osceola and Seminole counties, Florida) which are beyond a 30-minute walk from a McDonald’s. Using our enrichment tools again, we can calculate that 1,783,500 residents live in this area – approximately 84% of the population!

This figure help strategists decide whether this study area is a strong candidate for adding additional locations as it has such a large untapped market. The next step would be then to further explore where within the study area would be the optimal location for new locations.

👁 Reverse catchments - using isochrones to understand areas which don't have access to a facility. Source: CARTO.
Reverse catchments – using isochrones to understand areas which don’t have access to a facility. Source: CARTO.

Insight 3: Accessible service assessments

Our final insight example is using isolines to assess nearby supporting – or competitive facilities. Planners behind a new housing development may be required to understand how many relevant services – such as schools, bus stops and health clinics – are accessible within a travel time threshold from their development. Logistics companies may wish to base fleet management decisions or distribution center location on actual proximity to elements of their supply chain.

Building on our example use case, the map below shows the number of other quick service restaurants (QSRs) in the 30-minute walking catchment area of each restaurant to help assess the local competition. Explore the interactive version here!

👁 Using isolines to understand competitor distribution. Source (CARTO).
Using isolines to understand competitor distribution. Source (CARTO).

Using a Spatial Join (more details about this here) we can assess competitor brands in each 30-minute walk catchment, and also establish which location has the most competitors. This information is invaluable for driving strategies such as marketing and recruitment.


Thanks for reading our post about isolines! We hope that we’ve shown you not only how powerful they can be to help you understand the geographic context of a site, but also how easy they are to create.


Written By

Helen McKenzie

Towards Data Science is a community publication. Submit your insights to reach our global audience and earn through the TDS Author Payment Program.

Write for TDS

Related Articles