Straight-Line Distance as an Estimate for Driving Routes

CDXZipStream and CDXGeoData provide options for calculating either the straight-line ("as the crow flies") distance or driving (road) distance between locations. When selecting the distance function that best meets the need of an application, calculation time is also a factor; driving distance calculations are much more complex and take significantly longer, and may not be practical for very large data sets. Is straight-line distance a reasonable alternative? We know that straight-line distance always underestimates the actual length of a route (with the exception of routes along a perfectly straight road), but by how much?

To find out we performed an analysis using the functions in CDXGeoData. These functions are CDXGeoDistance for calculating straight-line distance, and CDXGeoRoute, which calculates travel distance and time using Bing Maps as the routing data source. We developed data sets where travel was within large regions in the contiguous U.S., as well as within specific counties. For each county, the start point for each route was at a single ZIP Code and the end point covered every other ZIP Code in the county. Here are the results:

Average straight-line underestimation is surprisingly consistent within regional and county areas, ranging about 11 to 18% and 18 to 23% less than the shortest route calculation, respectively.

Underestimation of route distance is greater when compared to the quickest route calculation, along with more standard deviation as well. Straight-line distance versus quickest route is a bit of an apple-to-oranges comparison, but is included here since quickest is usually the preferred travel route. For U.S. regions, straight-line distance versus quickest route is about 15 to 25% less, and excluding Los Angeles County (a probable outlier), county area straight-line distance compared to quickest route ranges about 26 to 30% less.

So for ball-park calculations, such as estimation of shipping costs, it would be realistic to assume straight-line distance plus up to about 30% additional mileage, depending on the route coverage area.  Straight-line distance is more accurate for longer routes probably because both local road and geographic restrictions – such rivers, lakes, parks, and other obstacles – are less important over longer distances. CDXGeodata uses a free Microsoft Excel template which completely automates straight-line distance calculation between ZIP Codes. Here is a short tutorial showing how it works:

For straight-line distance calculations using specific address locations, we offer an Excel template that works with CDXZipStream to generate reports of locations within a specific radius area.  Please watch the video below for a short tutorial:

When working with large data sets that require highly accurate routing analysis, we recommend a two-step process using straight-line distance calculations to first narrow down the list of candidate locations within a radius, then calculating the actual route distances from this smaller list.  Please refer to our post CDXZipStream Straight-line and Driving Distance Calculations for further discussion.

New CDX Technologies Apps for the Microsoft Windows Store

CDX Technologies is pleased to release a suite of apps that can be downloaded for free in the online Microsoft Store.  The tools will work on Microsoft Windows 8 and 10 operating systems where the Windows Store is available. Three apps have been released including Postal Address and Zip+4 lookup, Zip Code Report, and Demographic Report tools.  These apps match the applications that are also available on our web site under the “Tools” menu.  There is no charge to use these services.

The Postal Address app will let you enter a single or multi-line address to verify if the address is valid.  If valid the entered address will be corrected for spelling and formatting errors to be consistent with USPS standards.   Additional information will be included such as the county name, county FIPs, state FIPS, congressional district, timezone and more.

Our Zip Code Report app will generate a report that includes city, state, county and more for any zip code. Just enter your zip code and press the “Generate Report” button.  The report contains over 20 key zip code data items including latitude, longitude, area code and elevation. Use the "Print" button to save a copy of your data.

 

The Demographic Report app provides population, race, gender and location data based on zip code. Just select a report, enter your zip code and press the “Generate Report” button.  The reports contain over 50 key demographic statistics including household income, population, median age and business employment. Most the data is derived from the 2010 US Census. Click on the “Data Definitions” dropdown for an explanation of any item.

 

Feel free to try these applications and let us know if you have any suggestions.

 

Free ZIP Code Demographics, Address Correction and ZIP+4 Lookup Tools on CDXTech.com

We now have three tools on our website that complement the capabilities of our software, Excel add-ins CDXZipStream and CDXStreamer, and the web service CDXGeoData.  In addition to the ZIP Code lookup facility discussed in our previous post, you can also access the following free new tools:

1.  Address Correction and ZIP+4 Lookup

Need to find the ZIP or ZIP+4 Code for an address, or need to check an address for accuracy?  You can use the USPS postal service website, but our tool will not only provide the full address using standard abbreviations and formatting (like the USPs), but will also provide additional information like time zone and congressional district, and break the address into its separate components (like street, state, ZIP) for easy copying and pasting.  You can also enter the address in either single or multi-line format.  Here's a short tutorial showing how it works:

   

The website tool is convenient for looking up single addresses, but for cases where you have a long list of addresses that need correction and/or ZIP and ZIP+4 lookup, consider using our CDXStreamer Excel add-in or CDXGeoData web service.  We also provide free templates in both cases that completely automate the lookup prcess for you; please refer to the following postings for more information:

    CDXStreamer - A New Template to Verify and Parse Address Lists

    CDXGeoData  - Free Address Correction and ZIP+4 Lookup Template

2.  Demographic Data

Demographic data by ZIP Code is an invaluable resource for business planning and marketing.  The U.S. Census Bureau provides an exhaustive range of data from the decennial census as well as the annual American Community Survey.  We've compiled much of the key data into an easy-to-use tool where you can simply select the type of report desired, enter the ZIP Code of interest, and generate a report covering topics such as population, age, gender, income, race, housing value, educational attainment, and more.  This short video demonstrates how to use it:

   

For cases where you need demographics for a list of ZIP Codes, either our Excel add-in CDXZipStream or the CDXGeoData web service can provide bulk data quickly and easily.  CDXZipStream has up to fourteen data feeds for geographies ranging from census tract to state, while CDXGeoData focuses on ZIP Code demographics.  For more information on these options, please see the posts below:

    CDXZipStream - ZIP Code Demographics from the 2010 Census

    CDXGeoData    - Apps and Web Service for Location Analysis

 For your convenience, consider bookmarking all our website tools using the following links:

- Address Correction and ZIP+4 Lookup

- Demographic Data

- ZIP Code Lookup

 

Radius Demographic Analysis with CDXGeodata

Successful marketing of your business requires understanding the customer base being targeted.  Information such as income, age and population is necessary to be able to effectively tailor marketing campaigns.  The ability to specify customers by location is also key.

CDX Technologies now offers a free template that uses our CDXGeodata service to calculate zip codes by radius and add matching demographic data for each zip code.  The template can be downloaded here.  The template will work on Windows and Mac versions of Excel.

CDXGeodata is a set of spreadsheets apps and web service APIs that work with a variety of software platforms including Windows, the Apple Mac and Linux.  It was developed for use by standard business professionals as well as programmers to develop custom desktop or web based applications.  A free account which renews each month is available that allows 1000 demographics requests.  Additional requests that are good for up to one year are also available for purchase.

To use the template, you will first need to get a free CDXGeodata API key from CDX Technologies.  This key will need to be entered into the CDXGeodata template by pressing the “Settings” button on the first spreadsheet tab.

 

Then just specify your target zip code and radius distance and press “Calculate Radius”.  All zip codes within the specified zip code will be retrieved.   Each zip code will have a corresponding latitude, longitude and distance displayed as shown below.

 

Before each call to the CDXGeodata service you will be notified how many tokens you have in your account and how many tokens are expected to be used in this operation.

After calculating the radius report then press the “Get Demographics” button.

This will import the demographic data associated with each zip code in the right most 4 column headings.  You can change the each headings using columns dropdown dialog.  The default is to include city, state, population and income per household.  Additional demographic parameters include delivery statistics, age, household and CBSA information.  For a given radius report, you can request different demographic information without incurring additional token charges.

CDXGeodata is not licensed on a per user basis like CDXZipStream.   Any number of users can access the CDXGeodata service with a single API key.  Tokens are used to access CDXGeoData with different levels for each service request.  Simple requests like zip code lookups only require 1 token while more complex analysis address verification will require 5 tokens per request. Each free CDXGeodata account comes with 1000 tokens per month. Additional tokens can be purchased on an as needed basis with the following pricing.  The tokens are good for up to one year.   It’s easy and risk free to get started with our free account.

Free Address Correction and Zip+4 Lookup Template

CDX Technologies now offers a free template that uses our CDXGeodata service to correct and parse address lists and perform Zip+4 lookup.  The template can be downloaded here and will work on Windows and Mac versions of Excel.

CDXGeodata is a set of spreadsheets apps and web service APIs that work with a variety of software platforms including Windows, the Apple Mac and Linux.  It was developed for use by standard business professionals as well as programmers to develop custom desktop or web based applications.  A free account which renews each month is available that allows 200 address requests.  Additional requests that are good for up to one year are also available for purchase.

To use the template, you will first need to get a free CDXGeodata API key from CDX Technologies.  This key will need to be entered into the CDXGeodata template by pressing the “Settings” button on the first spreadsheet tab.

 

Then just paste your address list into the template, and press the “Verify Addresses” button as shown below.

Note how the input data fields contain mixed instances of single line and multi line addresses.  Instances with and without zip codes are also supported.

The template automatically compares each address to the US Postal Service databases on CDXStreamer servers.  Addresses are returned to the template with correct spellings, abbreviations, and formatting.  ZIP+4 codes are also returned.  Here is an example of the returned output.

Inputted address can be in either single-line or parsed formats.  Input should include as much information as possible, but incomplete address information (e.g. with missing ZIP codes) can also be used.  Secondary addresses such as “Suite” or “Apartment” can be included in the address such as “2 W Hanover Ave Ste 212”.  Do not use a comma or other delimeter between the primary and secondary address.  For single line entries the recommended format should be address, city and state separated by a comma and followed by a space and a zip if available.

The verification process will correct misspellings, add omitted data (such as ZIP+4 codes) and use standardized formatting defined by the postal service.  The verified addresses are displayed in both single line format, as well as parsed into separate columns for street, city, state, and ZIP+4 codes.  If an address cannot be found in the postal database, or if not enough data was provided, an error message is returned.

Additional data items are returned which included the county name, state FIPS, county FIPS and timezone and DPBC (Data Processing Bar Code).

The template also allows the user to restart the verification process from the last verified address if the process was interrupted.

As with most address verification systems, CDXGeodata verifies whether the address is valid, not whether the location or residence physically exists.  For example, if a street number for a house is potentially valid based on the allowed range and numbering system of the specified street, the address is considered valid as a whole.

CDXGeodata is not licensed on a per user basis like CDXZipStream.   Any number of users can access the CDXGeodata service with a single API key.  Tokens are used to access CDXGeoData with different levels for each service request.  Simple requests like zip code lookups only require 1 token while more complex analysis address verification will require 5 tokens per request. Each free CDXGeodata account comes with 1000 tokens per month. Additional tokens can be purchased on an as needed basis with the following pricing.  The tokens are good for up to one year. 

Please feel free to take advantage of this service.  It’s easy and risk free to get started with our free account.