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