Tuesday, 31 December 2019

postgis - Open-source GIS implementation of the Huff model


This might be a stretch, but I was wondering if anyone implemented gravity modeling tools or scripts for Retail Market Analysis (like the Huff Model), to analyze spatial data for customer-store relationships?


There are a couple ESRI sources (including Business Analyst extension), but I have not seen any for the open-source world. It seems like a place where PostGIS could really be leveraged for its database qualities.



Reference docs (outdated, but relevant articles explaining the concept):




Answer



As scw says in his comment the code itself seems to make use of some basic processing and loops so could probably be rewritten quite quickly in Python and Shapely.


However if you are looking for a script take a look at the following written in R..and German: http://www.reymann.eu/wp-content/uploads/2010/06/GravitationsgesetzHuff.R


Google Translate seems to indicate it provides the "Calculation of the purchase probability Huff's law of gravitation"



Linked to from http://www.reymann.eu/wettbewerbsanalysen/einzugsgebiet


It does have a copyright notice on it so maybe contact the author for further details. If you take out all the lines that print to the screen it seems R can implement it very concisely.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...