A Python Code of Geofencing Statistical Areas for Retail Catchment Analysis

PropTech@ecyY
3 min readJan 26, 2024

What is geofencing?

Geofencing is the use of GPS or other technologies to create a virtual geographic boundary. The shape of the boundary is usually defined by a circular isochrone. However, since many governments demarcated their cities’ communities by irregular census tracts or statistical areas (SAs), a circular geofence may not be able to use aggregate data at SA levels.

Geofencing Statistical Areas

Figure below shows that a 5km circular isochrone geofence does not match the irregular shapes of the SAs from a shopping mall. In retail studies, for example, demographics such as household incomes and population sizes at each SA are of utmost importance for catchment analysis.

In this study, we develop a Python programme to geofence these SA units based on an adjustable isochrone radius to identify Catchment Statistical Areas (CSAs) for a shopping mall, using Australia data.

Fig. 1. SA1s within the Airport West’s 5-km isochrone area are identified by the geofencing programme and coloured in blue. Source: created by the authors.

The full paper (Open Access) is available at Yiu. C.Y., Truong, Q,L., Kou, J., Cheung, K.S. (2024) Retail rings of influence: Rethinking retail catchment analysis in the light of purchasing power. Journal of Retail and Consumer Services, 76, January, 103591. https://doi.org/10.1016/j.jretconser.2023.103591

The Python geospatial packages for geofencing statistical areas are also available on GitHub at

https://github.com/AURIN-OFFICE/shopping_centre_buffer.

Benefits of Geofencing Statistical Areas

Many previous studies concerning catchment areas of shopping malls have utilised rigidly defined parameters, such as a 30-min driving isochrone. However, these specifications can be somewhat arbitrary, and their validity is difficult to verify. This research project aimed to deepen our understanding of catchment areas for a national set of retail malls by conducting a sensitivity analysis of purchasing power within various catchment sizes.

Thus, we have to consider proxies of purchasing power of potential shoppers within the catchment areas, such as the total number of households, the mean of the weekly median total household incomes, and the total household incomes. All these data can only be available at SA levels collected by the census and statistics department of the governments.

Our Python code enables an automated identification of the catchment statistical areas of a shopping mall based on the intersected statistical areas with an user-defined isochrone. It therefore enables sensitivity analysis of different isochrone sizes. For example, in this study, we have examined five different catchment statistical areas based on isochrones of 1-km, 5-km, 10-km, 20-km and 30-km from a shopping mall.

Documentations

In the Github, the code is titled AURIN-OFFICE\shopping_centre_buffer. We provide the following ReadMe and data files for easy reference:

File ‘shops_geo.csv’ contains the collected Australian and New Zealand’s shopping centres spatial information.

File ‘SA1_2021_census_income_dataset_wrangling.ipynb’ preprocesses the 2021 income census data to be used for generating the shopping centre buffer.

File ‘catchment_area_GitV.ipynb’ investigates the 5km buffer zone for one shopping centre.

File ‘Catch_pipe_GitV5.0.ipynb’ processes all shopping centres’ 1km, 5km, 10km, 20km, towards 50km buffer zones.

File ‘Shopping_malls_2016_2021_update_16.06.2023.xlsx’ provides the final results of the household income level at different buffer zones, such as 1km, 5km, 10km, … 50km, which is calculated by the geofencing python code ‘Catch_pipe_GitV5.0.ipynb’.

More information can be found in the Github notebooks.

--

--