Can I have a postcode to postcode drive time and distance lookup table?

With online mapping data increasingly accessible to the public, journey planning seems easier than ever. However, once you move beyond individual journeys to look at onward travel, planning for a fleet of vehicles, or a network of locations, things quickly get complicated. One question new clients often put to us is “Can we have a simple table of travel times between each postcode?” Unfortunately, this seemingly simple question comes with some significant challenges.

Get in touch
Call  01904 701020, complete   or 

When do you need it?

There are around 1.77 million live postcodes in the UK (1,766,067 active postcodes as at June 2020 according to the National Statistics Postcode Directory/NSPD plus 874,449 terminated postcodes). However, the exact figure changes on a monthly basis as new postcodes are created and old ones terminated. This means to do a postcode to postcode lookup you would need that many results squared, that’s about 3.1 trillion variations! How long would it take to produce the drive time and distance lookup tables for this? Well, if we assume it averages just one second to calculate the best time and distance between each postcode we can calculate the compute time needed to generate our data. 3.1 trillion rows will take 3.1 trillion seconds at one second per postcode to postcode pair. A year is just under 32 million seconds (31,536,000).

This means that the pure compute time is almost 100,000 years (98,902 years to be exact)!

To allow for variations in travel time for peak, off-peak, HGV, and shortest distance driven (irrespective of road or traffic conditions), we’d need 4 calculations, so we are looking at a compute time of 400,000 years for a single end to end process. Using more computers can speed it up:

  • If we have 4 computers, one for each task, we would have needed to start processing when the first buildings were constructed in Egypt.
  • If we can speed the process up to 10 per second by using better code, we could have started processing 10,000 years ago during the last ice age as the final megafauna, like the woolly mammoth and sabre tooth tiger went extinct.
  • 10 computers per task (not forgetting there are 4 results to calculate) and we could have started processing 1,000 years ago when King Canute was on the throne in England, Denmark and Norway.
  • 100 computers per task; we could have started the processing whilst worrying about Spanish influenza, the Russian Revolution and World War 1.
  • 1,000 computers per task and we could have been listening to Dizzie Rascal or Lady Gaga topping the charts.
  • Would 20,000 computers be enough? No. It would still take 6 months! To get a real time process we would need 200,000 computers and it would still take 18 days to process all 4 sets of data.

A subset of the links from one postcode

Postcode sector to sector look up table example

What’s your budget?

Now we have an idea about how long it would take to produce postcode to postcode drive time and distance tables, how much storage space do you think we will need?

The sector to sector table is about 7.5Gb and has 65 million rows. Our postcode to postcode table is 27,000 times as big. This means our new data table in an unindexed form would be 387,297 terabytes or 378 petabytes (406,109,876,742 Mb).

Up to 2014 Google had indexed about 200 terabytes of data. Our one data table is 200 times as much data as Google has handled in 16 years.

There is a 60 terabyte disk available. We would need 6,500 of them, they are expected to retail between $30,000 and $40,000 each, so let us be optimistic and say $195 million in total. They would draw power at 1 watt per terabyte so we would need a power station producing 385 Mw to keep just the disks running (about an eighth of the output of a new nuclear power station, that retail at around £20 billion each).

A realistic yet accurate alternative

So it would seem that postcode to postcode data tables are a non-starter. Fortunately, we have an alternative solution that can return time and distance for any 2 postcodes in less than 2 seconds. Our TimeTravel product offers postcode sector to postcode sector drive times and distances for all of the UK without the massive amounts of infrastructure or forward planning we’ve previously described. We also update the system as new postcodes and road networks alter the calculations to keep it accurate.

The TimeTravel data table has distance and time values for peak, off-peak, HGV and shortest distance driven (irrespective of traffic conditions or time of day). It even accounts for Ferry crossing times, where travel to that part of the UK goes over water. To process all combinations takes days, rather than thousands of years, and we provide regular updates to our clients so that their customers and fleet drivers have the most accurate drive times available within seconds.  

Our other blogs

British Population Survey (BPS)

The British Population Survey (BPS) is a survey of household income and shopping habits collected by face-to-face interviews. We take a look at the BPS in detail, what exactly it is made from and how its data can be usefully applied by businesses and public organisations.

What is geodemographic profiling?

More than 64 million people live in the UK, each with their own outlook, priorities, needs and way of life. Geodemographic profiling offers a way to group these individuals to try and identify the right audience for your product or service.

The census helps you to understand your customers

The UK Census 2021: what it is, how is it made, and how can it be used to help your organisation with demographic analysis.

Using geographic intelligence to grow the UK’s broadband network

Using geographic intelligence to sustainably grow the UK’s broadband network.

Mapping efficient sales territories

We've worked with mapping, demographic, and travel data for a long time, and have become specialists in territory mapping. So we'd like to share a few tips on how best to define sales catchments for your team, or embark on territory review.

TimeTravel: the latest update

We look at the latest update to TimeTravel, our dataset of drive times and distances between any postcode sector or district. What has changed in the UK road and geographic network, plus new features to make it even more accurate.

How to create a postcode map

Turning a list or spreadsheet of postcode data into a series of points on a map isn't as simple as using an Excel wizard to do it for you, but it isn't rocket science. We look at the best way to create a postcode point/pin map.

Living Costs and Food Survey

The Living Costs and Food survey (LCF) is compiled every year and is used by the UK and European governments, Department for Transport (DfT), and Her Majesty’s Revenue and the Customs (HMRC). But what is it, and why should we care?

Cycle to work day

Each year for #cycletoworkday we take a look at cycling statistics across the country and try to map that data and find interesting trends. This is mainly because we at Beacon Dodsworth are either a little bit obsessed about cycling, or we tend to worry about the environment.

Mapping for local projects

Recently, we were contacted by a company responsible for organising charity door knockers. They needed more than 9,000 postcode sectors mapped at A4 size to use at a local level to plan fundraising routes and clearly define territories for each agent.

Social change over 10 years

With the next census due to take place this year, we thought it was a good time to take stock of some of the changes and trends we noticed between the 2001 and the 2011 census. What difference does 10 years make to our society and the people that live within it?

Beacon Dodsworth New Office

Now we are back in the office, we continue to support hybrid working. So, we’ve taken the opportunity to downsize our office to make us more resilient to future lockdowns, staff self-isolation, and any other uncertainty the modern world might throw our way.

Postcode to postcode drive time and distance

What happens if we want a postcode to postcode drive time lookup table?

Administrative Geography

Administrative geography is a way of dividing the country into smaller sub-divisions or areas that correspond with the area of responsibility of local authorities and government bodies. We take a look at administrative geography, what it is and how to use it.

Who spends most on Fruit and Veg

National Vegetarian Week (#NationalVegetarianWeek) this year ran from 10th to 16th May. It gave us the opportunity to highlight how GIS mapping can be used to create marketing campaigns and raise awareness of the benefits of eating more fruit and veg.

Data visualisation and colour blindness

John, our director talks about living and working with colour blindness in the mapping industry where colours are pivotal in adding dimensions to people's understanding.

How far is it to the beach

We use Beacon Dodsworth's scripting technology to answer that most important of questions when the sun finally does threaten an appearance.

All you need to know about postcodes but were afraid to ask

The humble postcode has been around for years. We look at how postcodes are used and what led to their introduction.

Yorkshire Day

As a Yorkshire-based company, we wanted to help celebrate Yorkshire Day, which takes place on 1st August. Naturally, we wanted to put a geographic spin on the celebration, so we took a look at drinking preferences within God’s own county.

The foundations of geographical analysis

Displaying data on maps makes it easier to understand as well as giving a new perspective on a problem. Using a GIS to prepare and present data has become increasingly popular over the last 20 years, but graphical displays of data on maps were around long before computers came along.

How to back up your Prospex data

Keep your GIS projects safe by using the in-built Prospex back up process. Here is how.

The power of postcode sectors

Postcode sectors are aggregations of individual postcodes and they provide meaningful geographical reporting areas in any GIS. However, they aren't as easy to map as you might think. Here is how we do it.

The new normal for the GIS world

Toby, our Account Manager, looks at the changes to working style and client needs in the geodata industry following the COVID-19 outbreak.

Where is the North

We've used the territory manager tool in Prospex GIS to split the UK into north, south and east and west with equal population counts.

What is GIS software?

A Geographical Information System (GIS), is a tool for analysing, visualising, managing and presenting data that is related to a physical, geographical location. That link to geography is the key difference between GIS and other data visualisation techniques.

Mapping GP prescription data

An article by Allan Brimicombe (Head of Centre for Geo-Information Studies at the University of East London) & Pat Mungroo on using GP prescription data to understand health needs.

Geodemographics and the University of East London

The University of East London explain how they have been using our P² People & Places geodemographic classification.

Google Fusion Tables

After almost 10 years of service, Google retired their Fusion Tables product at the end of 2019. This tool was very useful at visualising and sharing large amounts of tabular data - particularly amongst small and mid-sized businesses. So what can we do to fill the gap left by this tool?

Get in touch
Call  01904 701020, complete   or