Calculating Varying Scales of Clustering Among Locations

Author/Creator ORCID





Citation of Original Publication

Wilson, Ron; Din, Alexander; Calculating Varying Scales of Clustering Among Locations; A Journal of Policy Development and Research, Volume 20, Number 1, 2018;


This item is likely protected under Title 17 of the U.S. Copyright Law. Unless on a Creative Commons license, for uses protected by Copyright Law, contact the copyright holder or the author.
Public Domain Mark 1.0
This is a work of the United States Government. In accordance with 17 U.S.C. 105, no copyright protection is available for such works under U.S. Law.



The Nearest Neighbor Index (NNI) is a spatial statistic that detects geographical patterns of clustered or dispersed event locations. Unless the locations are randomly distributed, the distances of either clustered or dispersed nearest neighbors form a skewed distribution that biases the average nearest neighbor distance used in calculating the NNI. If the clustering or dispersion of locations is moderate to extreme, the NNI can be inaccurate if the skew is substantial. Using Housing Choice Voucher program residential locations, we demonstrate in this article the method to derive an NNI based on a median and two quartiles that more accurately represents the midpoint of a set of nearest neighbor distances. We also demonstrate how to use these alternative point estimates to gauge multiple scales of clustering from different positions across the nearest neighbor distance distribution. Finally, we discuss how to use the average and standard deviation distances from the calculation of each NNI to more comprehensively gauge the scale of the geographic patterns. We also include a Python program that creates a randomized set of locations to calculate statistical significance for the median and quartile NNIs.