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.
When do you need it?
There are almost 2.6 million postcodes in the UK (2,586,191). This means to do a postcode to postcode lookup you would need that many results squared, that’s almost 6.7 trillion (6,688,383,888,471) 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. 6.7 trillion rows will take 6.7 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 over 200,000 years (212,087 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 800,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 homo sapiens appeared.
- If we can speed the process up to 10 per second by using better code, we could have started processing 20,000 years ago as the people in China invented pottery.
- 10 computers per task (not forgetting there are 4 results to calculate) and we could have started the processing as the Emperor Tiberius began his rule.
- 100 computers per task; we could have started the processing whilst reading Miss Austen’s new novel Emma, straight off the press.
- 1,000 computers per task and we could have been listening to Firestarter by The Prodigy when it was at number 1 in the charts.
- Would 20,000 computers be enough? No. It would still take a year! To get a real time process we would need 200,000 computers and it would still take 5 weeks to process all 4 sets of data.
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 15Gb and has 123 million rows. Our postcode to postcode table is 54,000 (54,118) times as big. This means our new data table in an unindexed form would be 774,593 terabytes or 756 petabytes (812,219,753,484 Mb).
Up to 2014 Google had indexed about 200 terabytes of data. Our one data table is 400 times as much data as Google has handled in 16 years.
There is a 60 terabyte disk available. We would need 13,000 of them, they are expected to retail between $30,000 and $40,000 each, so lets be optimistic and say $390 million in total. They would draw power at 1 watt per terabyte so we would need a power station producing 770 MW to keep just the disks running (about a quarter 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.
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.
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.
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?
Using geographic intelligence to grow the UK’s broadband network
Using geographic intelligence to sustainably grow the UK’s broadband network.
How far is it to the beach
Using Beacon Dodsworth's scripting technology to showcase demographic and geographic trends.
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.
Social change over 10 years
The next census isn’t due to take place until 2021 so 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?
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.
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.
How to back up your Prospex data
Keep your GIS projects safe by using the in-built Prospex back up process. Here is how.
Meet the team: Toby
Toby, our Sales Executive, gives a retrospective of his time teaching, and learning about Beacon Dodsworth's GIS solutions.
Household spend on fruit and vegetables
Using GIS mapping to visualise, analyse and present data in a geographical context.
What has the census ever done for us?
How Census 2011 can be used to help organisations with demographic analysis.
Geodemographics and the University of East London
The University of East London explain how they have been using our P² People & Places geodemographic classification.
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.
Postcode to postcode drive time and distance
What happens if we want a postcode to postcode drive time lookup table?
Your continued use of this site is taken as implied consent to receive cookies from us and our analytics partners.