Gravity Model of Spatial Interaction in QGIS

Purpose and Overview

This collection of QGIS models implements a gravity model of spatial interaction. The models are implemented around a case study of hospital service regions in the northeastern United States, but could be applied to any number of similar spatial interaction processes. Results can be accessed via web map

The core gravity model is adapted from that described in The Geography of Transport Systems (Rodrigue). It accepts as input two sets of vector features, one representing the source features and the other representing the target features, and produces as output a single vector layer representing the likely zone of influence that each target feature occupies. The potential for interaction between any pair of source and target features is calculated based on user-specified weight fields for the source and target features and the distance between the two features.

Preprocessing

I built and tested this model with the aim of simulating hospital service areas in the northeast. Raw data is drawn from a Department of Homeland Security dataset of U.S. hospital locations, and includes hospitals that may be closed, missing important data on the number of beds, or not available for routine public use, such as military or psychiatric hospitals. These hospitals should be excluded from the calculation of service areas since they serve a specific small subset of the people in the surrounding area, and I filter them out of the original dataset using the following model (Fig. 1), which is available for download here.

Hospital Data Preprocessing
Hospital Preprocessing
__Figure 1:__This model is specific to the Homeland Security hospitals data and is not applicable to other data sources.

The filtered hospital locations (the target features) are then aggregated by the town in which they are located (the source features) so that they better match the spatial units of the source layer (Fig. 2). For each town containing at least one hospital, hospital clusters are collapsed into a single point at the center of the cluster containing the sum of the desired target weight field - in this case the number of beds in each hospital - using the following model, which is available for download here.

Target Feature Preprocessing
Target Feature Preprocessing
__Figure 2:__This model can be generalized to any set of source and target features.

Gravity Model Details

The gravity model (Fig. 3) accepts as input two sets of vector features, one representing the source features and the other representing the target features, and produces as output a single vector layer representing the likely zone of influence that each target feature occupies. Each input layer must have at least two fields: one that uniquely identifies each feature and one that contains a weight value for each feature. The potential for interaction between any pair of source and target features is calculated based the following formula: (inputWeight)^λ * (targetWeight)^α / (distance)^β where λ, α, and β are constant parameters used to customize the behavior of the model, as described in The Geography of Transport Systems (Rodrigue).

Each source feature is assigned to the target feature with which it has the most potential interaction, and the final service areas are created by grouping towns that share a target feature, as in the following model, which is available for download here.

Gravity Model
Gravity Model
Figure 3: This model can be generalized to any set of source and target features.

Results

We can loosely assess the quality of the model by comparing the hospital service areas produced by the gravity model (Fig. 4) to those provided by the Dartmouth Healthcare Atlas, which are compiled based on real-world billing reports for each hospital. Using parameters λ=1, α=1, and β=2, the service areas produced by my model are comparable to Dartmouth service areas in certain places where there are relatively few hospitals, but are largely inconsistent with the actual service areas. This could be improved by experimenting with different parameters for the potential interaction calculation, but is also partly the result of spatial interaction simply being more complex than this model accounts for.

Predicted Hospital Catchments
Map of predicted hospital catchments
Figure 4: Hospital catchments predicted by the gravity model. An interactive version of this map is available here

Data Sources

References

Rodrigue, J-P (2020), The Geography of Transport Systems, Fifth Edition, New York: Routledge. https://transportgeography.org/contents/methods/spatial-interactions-gravity-model/

Acknowledgements

Maddie Tango’s draft report served as inspiration for the layout and formatting of this report. Thanks to Professor Joseph Holler for providing source materials, tutorials, and guidance for this project.

Main Page

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.