blocksnet.method.connectivity
Classes
|
Provides methods for block connectivity assessment. |
- class blocksnet.method.connectivity.Connectivity(*, city_model: City, verbose: bool = True)[source]
Bases:
BaseMethod
Provides methods for block connectivity assessment.
- static plot(gdf: GeoDataFrame, linewidth: float = 0.1, figsize: tuple[int, int] = (10, 10))[source]
Plots connectivity data for blocks on a map.
- Parameters:
gdf (geopandas.GeoDataFrame) – GeoDataFrame containing block geometries and connectivity data.
linewidth (float, optional) – Line width for plotting the geometries, by default 0.1.
figsize (tuple of int, optional) – Size of the figure to plot, by default (10, 10).
- Return type:
None
- calculate() GeoDataFrame [source]
Calculates connectivity for all blocks in the city model.
Connectivity is determined by the median value of the accessibility matrix row for each block.
- Returns:
GeoDataFrame containing blocks with calculated connectivity.
- Return type:
geopandas.GeoDataFrame
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.