Skip to main content

huff: Huff Model Market Area Analysis

Project description

huff: Huff Model Market Area Analysis

This Python library is designed for performing market area analyses with the Huff Model (Huff 1962, 1964) and/or the Multiplicative Competitive Interaction (MCI) Model (Nakanishi and Cooper 1974, 1982). Users may load point shapefiles (or CSV, XLSX) of customer origins and supply locations and conduct a market area analysis step by step. The package also includes supplementary GIS functions, including clients for OpenRouteService(1) for network analysis (e.g., transport cost matrix) and OpenStreetMap(2) for simple maps. See Huff and McCallum (2008) or Wieland (2017) for a description of the models and their practical application.

Author

Thomas Wieland ORCID EMail

See the /tests directory for usage examples of most of the included functions.

Updates v1.5.2

  • Bugfixes:
    • HuffModel.ml_fit(): Correct values of expected T_j, corrected calculation of model fit metrices when fit_by="totals"
    • HuffModel.ml_fit(): Check if sum of E_ij != sum of T_j

Features

  • Huff Model:
    • Defining origins and destinations with weightings
    • Creating interaction matrix from origins and destinations
    • Different function types: power, exponential, logistic
    • Huff model parameter estimation via Maximum Likelihood (ML) by probalities, customer flows, and total market areas
    • Huff model market simulation
  • Multiplicative Competitive Interaction Model:
    • Log-centering transformation of interaction matrix
    • Fitting MCI model with >= 2 independent variables
    • MCI model market simulation
  • GIS tools:
    • OpenRouteService(1) Client:
      • Creating transport costs matrix from origins and destinations
      • Creating isochrones from origins and destinations
    • OpenStreetMap(2) Client:
      • Creating simple maps with OSM basemap
    • Other GIS tools:
      • Creating buffers from geodata
      • Spatial join with with statistics
      • Creating euclidean distance matrix from origins and destinations
      • Overlay-difference analysis of polygons
      • Hansen accessibility
  • Data management tools:
    • Loading own interaction matrix for analysis
    • Creating origins/destinations objects from point geodata

(1) © openrouteservice.org by HeiGIT | Map data © OpenStreetMap contributors | https://openrouteservice.org/

(2) © OpenStreetMap contributors | available under the Open Database License | https://www.openstreetmap.org/

Literature

  • De Beule M, Van den Poel D, Van de Weghe N (2014) An extended Huff-model for robustly benchmarking and predicting retail network performance. Applied Geography 46(1): 80–89. 10.1016/j.apgeog.2013.09.026
  • Haines Jr GH, Simon LS, Alexis M (1972) Maximum Likelihood Estimation of Central-City Food Trading Areas. Journal of Marketing Research 9(2): 154-159. 10.2307/3149948
  • Huff DL (1962) Determination of Intra-Urban Retail Trade Areas. Real Estate Research Program, Graduate Schools of Business Administration, University of California.
  • Huff DL (1963) A Probabilistic Analysis of Shopping Center Trade Areas. Land Economics 39(1): 81-90. 10.2307/3144521
  • Huff DL (1964) Defining and estimating a trading area. Journal of Marketing 28(4): 34–38. 10.2307/1249154
  • Huff DL, McCallum BM (2008) Calibrating the Huff Model using ArcGIS Business Analyst. ESRI White Paper, September 2008. https://www.esri.com/library/whitepapers/pdfs/calibrating-huff-model.pdf.
  • Nakanishi M, Cooper LG (1974) Parameter estimation for a Multiplicative Competitive Interaction Model: Least squares approach. Journal of Marketing Research 11(3): 303–311. 10.2307/3151146.
  • Nakanishi M, Cooper LG (1982) Technical Note — Simplified Estimation Procedures for MCI Models. Marketing Science 1(3): 314-322. 10.1287/mksc.1.3.314
  • Orpana T, Lampinen J (2003) Building Spatial Choice Models from Aggregate Data. Journal of Regional Science 43(2): 319-348. 10.1111/1467-9787.00301
  • Wieland T (2015) Nahversorgung im Kontext raumökonomischer Entwicklungen im Lebensmitteleinzelhandel: Konzeption und Durchführung einer GIS-gestützten Analyse der Strukturen des Lebensmitteleinzelhandels und der Nahversorgung in Freiburg im Breisgau. Working paper. Göttingen. https://webdoc.sub.gwdg.de/pub/mon/2015/5-wieland.pdf.
  • Wieland T (2017) Market Area Analysis for Retail and Service Locations with MCI. R Journal 9(1): 298-323. 10.32614/RJ-2017-020
  • Wieland T (2018) A Hurdle Model Approach of Store Choice and Market Area Analysis in Grocery Retailing. Papers in Applied Geography 4(4): 370-389. 10.1080/23754931.2018.1519458
  • Wieland T (2023) Spatial shopping behavior during the Corona pandemic: insights from a micro-econometric store choice model for consumer electronics and furniture retailing in Germany. Journal of Geographical Systems 25(2): 291–326. 10.1007/s10109-023-00408-x

Installation

To install the package, use pip:

pip install huff

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

huff-1.5.2.tar.gz (60.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

huff-1.5.2-py3-none-any.whl (62.9 kB view details)

Uploaded Python 3

File details

Details for the file huff-1.5.2.tar.gz.

File metadata

  • Download URL: huff-1.5.2.tar.gz
  • Upload date:
  • Size: 60.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for huff-1.5.2.tar.gz
Algorithm Hash digest
SHA256 2127e0490f66789f2c7b8e69cabed3e0b410224b8eec5bd458303df86d161eaa
MD5 2b5525d8bee99747fc8d2d90f91f5386
BLAKE2b-256 08f4b1853f5d17870fce183bd6e3417376c4b91af2664e36fa2ba9dc99ad5989

See more details on using hashes here.

File details

Details for the file huff-1.5.2-py3-none-any.whl.

File metadata

  • Download URL: huff-1.5.2-py3-none-any.whl
  • Upload date:
  • Size: 62.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for huff-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eda96997caba0aaaaddfc824e052c766da237ae71c00df3ed5bd1933429fd2b5
MD5 56b4f3d85ffd4ea4c96e7d947d44b6ae
BLAKE2b-256 ee5fed29bf0dff414bc382bafd01e2690093db9678a4d7db2f060e189d5548ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page