ObjectNat 0.2.2__py3-none-any.whl → 0.2.3__py3-none-any.whl
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.
Potentially problematic release.
This version of ObjectNat might be problematic. Click here for more details.
- objectnat/_config.py +4 -0
- objectnat/_version.py +1 -1
- objectnat/methods/provision/provision.py +2 -2
- objectnat/methods/provision/{city_provision.py → provision_model.py} +4 -3
- {objectnat-0.2.2.dist-info → objectnat-0.2.3.dist-info}/METADATA +2 -1
- {objectnat-0.2.2.dist-info → objectnat-0.2.3.dist-info}/RECORD +8 -8
- {objectnat-0.2.2.dist-info → objectnat-0.2.3.dist-info}/LICENSE.txt +0 -0
- {objectnat-0.2.2.dist-info → objectnat-0.2.3.dist-info}/WHEEL +0 -0
objectnat/_config.py
CHANGED
|
@@ -44,6 +44,7 @@ class Config:
|
|
|
44
44
|
self.enable_tqdm_bar = enable_tqdm_bar
|
|
45
45
|
self.logger = logger
|
|
46
46
|
self.iduedu_config = iduedu_config
|
|
47
|
+
self.pandarallel_use_file_system = False
|
|
47
48
|
|
|
48
49
|
def change_logger_lvl(self, lvl: Literal["TRACE", "DEBUG", "INFO", "WARN", "ERROR"]):
|
|
49
50
|
self.logger.remove()
|
|
@@ -62,6 +63,9 @@ class Config:
|
|
|
62
63
|
self.enable_tqdm_bar = enable
|
|
63
64
|
self.iduedu_config.set_enable_tqdm(enable)
|
|
64
65
|
|
|
66
|
+
def set_pandarallel_use_file_system(self, enable: bool):
|
|
67
|
+
self.pandarallel_use_file_system = enable
|
|
68
|
+
|
|
65
69
|
|
|
66
70
|
config = Config()
|
|
67
71
|
config.change_logger_lvl("INFO")
|
objectnat/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "0.2.
|
|
1
|
+
VERSION = "0.2.3"
|
|
@@ -4,7 +4,7 @@ import geopandas as gpd
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
import pandas as pd
|
|
6
6
|
|
|
7
|
-
from .
|
|
7
|
+
from .provision_model import Provision
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def get_service_provision(
|
|
@@ -34,7 +34,7 @@ def get_service_provision(
|
|
|
34
34
|
buildings["demand"] = buildings[buildings_demand_column]
|
|
35
35
|
services["capacity"] = services[services_capacity_column]
|
|
36
36
|
|
|
37
|
-
provision_buildings, provision_services, provision_links =
|
|
37
|
+
provision_buildings, provision_services, provision_links = Provision(
|
|
38
38
|
services=services,
|
|
39
39
|
demanded_buildings=buildings,
|
|
40
40
|
adjacency_matrix=adjacency_matrix,
|
|
@@ -13,7 +13,7 @@ from .provision_exceptions import CapacityKeyError, DemandKeyError
|
|
|
13
13
|
logger = config.logger
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Provision:
|
|
17
17
|
"""
|
|
18
18
|
Represents the logic for city provision calculations using a gravity or linear model.
|
|
19
19
|
|
|
@@ -25,7 +25,7 @@ class CityProvision:
|
|
|
25
25
|
calculation_type (str, optional): Type of calculation ("gravity" or "linear"). Defaults to "gravity".
|
|
26
26
|
|
|
27
27
|
Returns:
|
|
28
|
-
|
|
28
|
+
Provision: The CityProvision object.
|
|
29
29
|
|
|
30
30
|
Raises: KeyError: If the 'demand' column is missing in the provided 'demanded_buildings' GeoDataFrame,
|
|
31
31
|
or if the 'capacity' column is missing in the provided 'services' GeoDataFrame. ValueError: If the 'capacity'
|
|
@@ -46,7 +46,8 @@ class CityProvision:
|
|
|
46
46
|
self.adjacency_matrix = self.delete_useless_matrix_rows_columns(adjacency_matrix, demanded_buildings, services)
|
|
47
47
|
self.threshold = threshold
|
|
48
48
|
self.check_crs(self.demanded_buildings, self.services)
|
|
49
|
-
|
|
49
|
+
print(config.pandarallel_use_file_system)
|
|
50
|
+
pandarallel.initialize(progress_bar=False, verbose=0, use_memory_fs=config.pandarallel_use_file_system)
|
|
50
51
|
|
|
51
52
|
@staticmethod
|
|
52
53
|
def ensure_buildings(v: gpd.GeoDataFrame) -> gpd.GeoDataFrame:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ObjectNat
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: ObjectNat is an open-source library created for geospatial analysis created by IDU team
|
|
5
5
|
License: BSD-3-Clause
|
|
6
6
|
Author: DDonnyy
|
|
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
14
14
|
Requires-Dist: geopandas (>=0.14.3,<0.15.0)
|
|
15
15
|
Requires-Dist: iduedu (>=0.1.4,<0.2.0)
|
|
16
16
|
Requires-Dist: joblib (>=1.4.2,<2.0.0)
|
|
17
|
+
Requires-Dist: jupyter (>=1.1.1,<2.0.0)
|
|
17
18
|
Requires-Dist: networkit (>=11.0,<12.0)
|
|
18
19
|
Requires-Dist: networkx (>=3.2.1,<4.0.0)
|
|
19
20
|
Requires-Dist: numpy (>=1.23.5,<2.0.0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
objectnat/__init__.py,sha256=OnDvrLPLEeYIE_9qOVYgMc-PkRzIqShtGxirguEXiRU,260
|
|
2
2
|
objectnat/_api.py,sha256=oiEO2P-tv6AMDdNoT8d0BWMmgeUJa4bhzGDTU2BWTXI,704
|
|
3
|
-
objectnat/_config.py,sha256=
|
|
4
|
-
objectnat/_version.py,sha256=
|
|
3
|
+
objectnat/_config.py,sha256=sv13J3yMw1cmmkgPMf08zinLwPKYwXHJGfchqmurSg8,2268
|
|
4
|
+
objectnat/_version.py,sha256=b-Z-6_UwMK_FEiFRkdRlWa4UpfELs391bZgkMRRJkm0,18
|
|
5
5
|
objectnat/methods/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
objectnat/methods/balanced_buildings.py,sha256=hLT2QgmGWpROtnL8SJQIujeP6q9ou15yIdHpv66CfMs,2892
|
|
7
7
|
objectnat/methods/cluster_points_in_polygons.py,sha256=ANoPHB89Ih6SYUTs0VoYqW7zi9GVIytSOGySoQ3vby4,5073
|
|
@@ -9,13 +9,13 @@ objectnat/methods/coverage_zones.py,sha256=yMeK1DjneMAxxKv9busEKdAsP25xiJMcPCixl
|
|
|
9
9
|
objectnat/methods/isochrones.py,sha256=CBJprxcyPIYC4RJizqJ1MJL-Zkea4iyr7wHTOOQ7DC8,6146
|
|
10
10
|
objectnat/methods/living_buildings_osm.py,sha256=v0rC8xaqibZq9jZm5HVonmmC9VFXzgZwhqsxHA3sPlc,5904
|
|
11
11
|
objectnat/methods/provision/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
objectnat/methods/provision/
|
|
13
|
-
objectnat/methods/provision/provision.py,sha256=lKgROkj1EmRgk9nLEQ0jGuQcY6BFnkG3oBuhHrRFbno,4619
|
|
12
|
+
objectnat/methods/provision/provision.py,sha256=jYPcqX-_TBFlUQq0bWK2uuvH6AWMXv8E5mjTeHjchS8,4612
|
|
14
13
|
objectnat/methods/provision/provision_exceptions.py,sha256=-TK4A-vacUuzlPJGSt2YyawRwKDLCZFlAbuIvIf1FnY,1723
|
|
14
|
+
objectnat/methods/provision/provision_model.py,sha256=BXRRkeDToeL9MzswGpmlfK7wqHjVDRbpMCEPZGIDup0,13356
|
|
15
15
|
objectnat/methods/visibility_analysis.py,sha256=__S01m4YcIZbUcr6Umzvr4NpaCsajXxKNcfJm3zquVY,20690
|
|
16
16
|
objectnat/utils/__init__.py,sha256=w8R5V_Ws_GUt4hLwpudMgjXvocG4vCxWSzVw_jTReQ4,44
|
|
17
17
|
objectnat/utils/utils.py,sha256=_vbCW-XTHwZOR3yNlzf_vgNwbYwonhGlduSznGufEgs,638
|
|
18
|
-
objectnat-0.2.
|
|
19
|
-
objectnat-0.2.
|
|
20
|
-
objectnat-0.2.
|
|
21
|
-
objectnat-0.2.
|
|
18
|
+
objectnat-0.2.3.dist-info/LICENSE.txt,sha256=yPEioMfTd7JAQgAU6J13inS1BSjwd82HFlRSoIb4My8,1498
|
|
19
|
+
objectnat-0.2.3.dist-info/METADATA,sha256=eoRAOVNi8t_DrCuCTU1qEp6P2Eoee7aA1ODCdsmvJr4,5921
|
|
20
|
+
objectnat-0.2.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
21
|
+
objectnat-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|