Spatial Access for PySAL

Whether you work with data in health, retail, employment or other domains, spatial accessibility measures help identify potential spatial mismatches between the supply and demand of services. They indicate how close demand locations are to supply locations.

_images/compare_access.png _images/euclidean_distance.png _images/gravity_model.png


We built this package for several reasons:

  • to make the new spatial access metric (RAAM) available,

  • to allow for easy comparison between RAAM and classic spatial access models,

  • to support spatial access research at scale by making pre-computed travel time matrices available and sharing code for computing new matrices at scale, and

  • to allow users who prefer a point-and-click interface to obtain spatial access results for their data using our web app (for US).


This PySAL package implements our new measure that simultaneously accounts for travel time and congestion at the destination:

Here is an example of the results of the RAAM model from this article: It shows how spatially accessible each Census tract is to primary care, compared to the national average. Darker blue areas have better spatial access (below-average travel costs) while darker red areas have worse spatial access (above average travel costs).


In addition, the package calculates five classic spatial access models within the same access class as RAAM for easy comparison between models:

  • Floating Catchment Areas (FCA): For each provider, this is the ratio of providers to clients within a given travel time to the provider (Huff 1963, [Huf63], Joseph and Bantock 1982, [JB82] and Luo 2004, [Luo04]).

  • Two-Stage FCAs (2SFCA): Calculated in two steps for a given travel time to the provider: 1) for each provider, the provider-to-client ratio is generated, 2) for each point of origin, these ratios are then summed (Luo and Wang, 2002, [LW03] and Wang and Luo 2005, [WL05]).

  • Enhanced 2SFCA (E2SFCA): 2SFCA but with less weight to providers that are still within the travel threshold but at larger distances from the point of origin (Luo and Qi 2009, [LQ09]).

  • Three-Stage FCA (3SFCA): adds distance-based allocation function to E2SFCA (Wan, Zou, and Sternberg, 2012, [WZS12]).

  • Access Score: This is a weighted sum of access components like distance to provider and relative importance of provider type (Isard 1960, [Isa60]).

These classic models were also recently implemented in the Python package aceso.


Figure 1 shows the workflow that our PySAL package uses to calculate these models, including data inputs, creation of cost (travel time) matrix, and data output:


As shown, all measures depend on travel times or distances between origins and destinations. This is the most computationally expensive part of calculating spatial access measures. The Cost Matrix section outlines how these travel times can be computed or how you can access our pre-computed matrices for the US.

Figure 2 shows the workflow from data input to data output. The most time-consuming and computationally intensive aspect of the workflow is the calculation of travel times (cost matrix).