blocksnet.method.weighted_connectivity
Classes
|
Provides methods for block connectivity assessment taking into account population and services within urban blocks. |
- class blocksnet.method.weighted_connectivity.WeightedConnectivity(*, city_model: City, verbose: bool = True)[source]
Bases:
BaseMethod
Provides methods for block connectivity assessment taking into account population and services within urban blocks.
- 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 weighted 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