Module 5 - Class 7: Nearest Neighbor Maps

Overview – This class will cover the important points of Nearest Neighbor Maps including the definition, use cases, benefits, best practices and the steps involved in creating them.

Learning Objectives – After completing this class you will have a strong understanding of the benefits, use cases, and best practices of Nearest Neighbor Maps.

What is a Nearest Neighbor Map

The Nearest Neighbor map allows you to identify the nearest set of features in one dataset compared with a starting point. For instance, find the nearest ten customers to my hotel.

Use Cases

The Nearest Neighbor map can have many use cases.

  • The nearest neighbor map is powerful for salespeople or logistics organizations planning routes.
    • For example, it is the end of the quarter, and your sales team needs to close more deals to hit budget. You've identified some high value, late stage opportunities that are more likely to close quickly. You would like to see which potential customers are closest to each salesperson. You upload the location data of the salespeople and the locations of the opportunities and run the nearest neighbor analysis. Now you can assign the right person to the opportunity and assist in route planning.
  • Find the nearest 10 customers to the hotel that a sales rep is staying in.
  • Find a hospital, clinic or retail location nearest to a person's address.
  • Use address search on shared map to search zip code and find nearest advisor within a certain distance.
  • Add address points for customers and using the Nearest from point to find the closest seller or distributer.

Benefits

  • Nearest Neighbors maps ensure time is saved by giving you efficient results when tying to find nearby locations
  • Finding gaps in service where no clinic/store/distributer are nearby

Best practices

  • Limit the number of closest locations to the optimal number/distance that works for you
  • Set a maximum/meaningful distance to search.

Steps to create

Nearest from Point

The first step is to ensure that that the dataset you wish to find the nearest point to is opened in your table. Then, on your map select the point you wish to do a nearest point analysis from. When the info pop - up appears, select the Tools dropdown, and then the Nearest option.

Nearest Pop up

The Filter window will then appear beside the table where you will be able to enter both the:

  • Nearest number of points you would like to filter to, and 
  • The max distance these nearest neighbors can be from your base point.

NN Filter

After setting your max number of points and max distance, press the Enter key on your keyboard to filter the dataset. The dataset table will then automatically filter to display only the nearest number of chosen points, and this will also be reflected on your map.

NN map

Nearest Neighbor Analysis

For the Nearest Neighbor Analysis function to work, you will need at least 2 datasets added to your map. At least one of these Datasets must be a Pin dataset.

To add a Nearest Neighbor Analysis to your map, select Analyze in your Control Panel and click on the Nearest Neighbor option in the Analyze Data window.

NN menu

This will then open the Nearest Neighbor settings window. Here you can select the Find dataset you wish to use from the drop down, and set the number of records you wish to find by typing a number into the text box. You can the select the To Each dataset you wish to use from the drop down. Finally, you can set the Within distance by typing a number into the box and choosing a distance type from the drop down.

NN Settings

Once you have your settings in place, click the Complete button to add your drive time analysis to your map.

The difference between the Nearest Neighbor from a Point and the Nearest Neighbor Analysis functions, is that to perform an analysis you need 2 datasets, and they are automatically filtered once the analysis has been run.

You can use the Control panel to Edit or Clear your analysis by choosing one of the options.

Control Panel analysis-1