You need to sign in or sign up before continuing.
huff 1.3.5__tar.gz → 1.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- huff-1.4.1/MANIFEST.in +3 -0
- {huff-1.3.5 → huff-1.4.1}/PKG-INFO +9 -3
- {huff-1.3.5 → huff-1.4.1}/README.md +8 -2
- {huff-1.3.5 → huff-1.4.1}/huff/gistools.py +8 -3
- {huff-1.3.5 → huff-1.4.1}/huff/models.py +622 -75
- {huff-1.3.5 → huff-1.4.1}/huff/ors.py +2 -2
- {huff-1.3.5 → huff-1.4.1}/huff/osm.py +59 -42
- huff-1.4.1/huff/tests/data/Haslach_new_supermarket.dbf +0 -0
- huff-1.4.1/huff/tests/data/Haslach_new_supermarket.qmd +26 -0
- huff-1.4.1/huff/tests/data/Haslach_new_supermarket.shp +0 -0
- huff-1.4.1/huff/tests/data/Haslach_new_supermarket.shx +0 -0
- huff-1.4.1/huff/tests/data/Haslach_supermarkets.cpg +1 -0
- huff-1.4.1/huff/tests/data/Haslach_supermarkets.prj +1 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/tests_huff.py +84 -32
- {huff-1.3.5 → huff-1.4.1}/huff.egg-info/PKG-INFO +9 -3
- {huff-1.3.5 → huff-1.4.1}/huff.egg-info/SOURCES.txt +6 -0
- {huff-1.3.5 → huff-1.4.1}/setup.py +1 -1
- huff-1.3.5/MANIFEST.in +0 -3
- {huff-1.3.5 → huff-1.4.1}/huff/__init__.py +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/__init__.py +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach.cpg +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach.dbf +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach.prj +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach.qmd +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach.shp +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach.shx +0 -0
- /huff-1.3.5/huff/tests/data/Haslach_supermarkets.cpg → /huff-1.4.1/huff/tests/data/Haslach_new_supermarket.cpg +0 -0
- /huff-1.3.5/huff/tests/data/Haslach_supermarkets.prj → /huff-1.4.1/huff/tests/data/Haslach_new_supermarket.prj +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach_supermarkets.dbf +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach_supermarkets.qmd +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach_supermarkets.shp +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Haslach_supermarkets.shx +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff/tests/data/Wieland2015.xlsx +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff.egg-info/dependency_links.txt +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff.egg-info/requires.txt +0 -0
- {huff-1.3.5 → huff-1.4.1}/huff.egg-info/top_level.txt +0 -0
- {huff-1.3.5 → huff-1.4.1}/setup.cfg +0 -0
huff-1.4.1/MANIFEST.in
ADDED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: huff
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.4.1
|
4
4
|
Summary: huff: Huff Model Market Area Analysis
|
5
5
|
Author: Thomas Wieland
|
6
6
|
Author-email: geowieland@googlemail.com
|
@@ -24,6 +24,8 @@ See the /tests directory for usage examples of most of the included functions.
|
|
24
24
|
- Defining origins and destinations with weightings
|
25
25
|
- Creating interaction matrix from origins and destinations
|
26
26
|
- Market simulation with basic Huff Model
|
27
|
+
- Different function types: power, exponential, logistic
|
28
|
+
- Huff model parameter estimation via Maximum Likelihood (ML)
|
27
29
|
- **Multiplicative Competitive Interaction Model**:
|
28
30
|
- Log-centering transformation of interaction matrix
|
29
31
|
- Fitting MCI model with >= 2 independent variables
|
@@ -50,12 +52,16 @@ See the /tests directory for usage examples of most of the included functions.
|
|
50
52
|
|
51
53
|
|
52
54
|
## Literature
|
53
|
-
-
|
55
|
+
- 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](https://doi.org/10.1016/j.apgeog.2013.09.026)
|
56
|
+
- 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](https://doi.org/10.2307/3149948)
|
57
|
+
- Huff DL (1962) *Determination of Intra-Urban Retail Trade Areas*. Real Estate Research Program, Graduate Schools of Business Administration, University of California.
|
58
|
+
- Huff DL (1963) A Probabilistic Analysis of Shopping Center Trade Areas. *Land Economics* 39(1): 81-90. [10.2307/3144521](https://doi.org/10.2307/3144521)
|
54
59
|
- Huff DL (1964) Defining and estimating a trading area. *Journal of Marketing* 28(4): 34–38. [10.2307/1249154](https://doi.org/10.2307/1249154)
|
55
60
|
- 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.
|
56
|
-
- 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](https://doi.org/10.1016/j.apgeog.2013.09.026)
|
57
61
|
- 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](https://doi.org/10.2307/3151146).
|
58
62
|
- 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](https://doi.org/10.1287/mksc.1.3.314)
|
63
|
+
- 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](https://doi.org/10.1111/1467-9787.00301)
|
64
|
+
- 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.
|
59
65
|
- Wieland T (2017) Market Area Analysis for Retail and Service Locations with MCI. *R Journal* 9(1): 298-323. [10.32614/RJ-2017-020](https://doi.org/10.32614/RJ-2017-020)
|
60
66
|
- 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](https://doi.org/10.1080/23754931.2018.1519458)
|
61
67
|
- 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](https://doi.org/10.1007/s10109-023-00408-x)
|
@@ -16,6 +16,8 @@ See the /tests directory for usage examples of most of the included functions.
|
|
16
16
|
- Defining origins and destinations with weightings
|
17
17
|
- Creating interaction matrix from origins and destinations
|
18
18
|
- Market simulation with basic Huff Model
|
19
|
+
- Different function types: power, exponential, logistic
|
20
|
+
- Huff model parameter estimation via Maximum Likelihood (ML)
|
19
21
|
- **Multiplicative Competitive Interaction Model**:
|
20
22
|
- Log-centering transformation of interaction matrix
|
21
23
|
- Fitting MCI model with >= 2 independent variables
|
@@ -42,12 +44,16 @@ See the /tests directory for usage examples of most of the included functions.
|
|
42
44
|
|
43
45
|
|
44
46
|
## Literature
|
45
|
-
-
|
47
|
+
- 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](https://doi.org/10.1016/j.apgeog.2013.09.026)
|
48
|
+
- 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](https://doi.org/10.2307/3149948)
|
49
|
+
- Huff DL (1962) *Determination of Intra-Urban Retail Trade Areas*. Real Estate Research Program, Graduate Schools of Business Administration, University of California.
|
50
|
+
- Huff DL (1963) A Probabilistic Analysis of Shopping Center Trade Areas. *Land Economics* 39(1): 81-90. [10.2307/3144521](https://doi.org/10.2307/3144521)
|
46
51
|
- Huff DL (1964) Defining and estimating a trading area. *Journal of Marketing* 28(4): 34–38. [10.2307/1249154](https://doi.org/10.2307/1249154)
|
47
52
|
- 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.
|
48
|
-
- 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](https://doi.org/10.1016/j.apgeog.2013.09.026)
|
49
53
|
- 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](https://doi.org/10.2307/3151146).
|
50
54
|
- 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](https://doi.org/10.1287/mksc.1.3.314)
|
55
|
+
- 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](https://doi.org/10.1111/1467-9787.00301)
|
56
|
+
- 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.
|
51
57
|
- Wieland T (2017) Market Area Analysis for Retail and Service Locations with MCI. *R Journal* 9(1): 298-323. [10.32614/RJ-2017-020](https://doi.org/10.32614/RJ-2017-020)
|
52
58
|
- 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](https://doi.org/10.1080/23754931.2018.1519458)
|
53
59
|
- 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](https://doi.org/10.1007/s10109-023-00408-x)
|
@@ -4,8 +4,8 @@
|
|
4
4
|
# Author: Thomas Wieland
|
5
5
|
# ORCID: 0000-0001-5168-9846
|
6
6
|
# mail: geowieland@googlemail.com
|
7
|
-
# Version: 1.
|
8
|
-
# Last update: 2025-06-
|
7
|
+
# Version: 1.4.1
|
8
|
+
# Last update: 2025-06-16 17:44
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
10
10
|
#-----------------------------------------------------------------------
|
11
11
|
|
@@ -168,8 +168,13 @@ def point_spatial_join(
|
|
168
168
|
point_stat_col: str = None
|
169
169
|
):
|
170
170
|
|
171
|
+
if polygon_gdf is None:
|
172
|
+
raise ValueError("Parameter 'polygon_gdf' is None")
|
173
|
+
if point_gdf is None:
|
174
|
+
raise ValueError("Parameter 'point_gdf' is None")
|
175
|
+
|
171
176
|
if polygon_gdf.crs != point_gdf.crs:
|
172
|
-
raise ValueError
|
177
|
+
raise ValueError(f"Coordinate reference systems of polygon and point data do not match. Polygons: {str(polygon_gdf.crs)}, points: {str(point_gdf.crs)}")
|
173
178
|
|
174
179
|
if polygon_ref_cols != []:
|
175
180
|
for polygon_ref_col in polygon_ref_cols:
|