blocksnet.method.accessibility

Classes

Accessibility(*, city_model[, verbose])

Provides methods for block accessibility assessment.

class blocksnet.method.accessibility.Accessibility(*, city_model: City, verbose: bool = True)[source]

Bases: BaseMethod

Provides methods for block accessibility assessment.

plot(gdf, vmax, figsize=(10, 10))[source]

Plots accessibility data on a map.

calculate(block)[source]

Calculates accessibility to and from a given block.

static plot(gdf: GeoDataFrame, vmax: float = 60, linewidth: float = 0.1, figsize: tuple[int, int] = (10, 10))[source]

Plots accessibility data for blocks on a map.

Parameters:
  • gdf (geopandas.GeoDataFrame) – GeoDataFrame containing block geometries and accessibility data.

  • vmax (float) – Limits the upper value of the legend, by default 60.

  • linewidth (float) – Size of polygons’ borders, by default 0.1.

  • figsize (tuple of int, optional) – Size of the figure to plot, by default (10, 10).

Return type:

None

calculate(block: Block | int) GeoDataFrame[source]

Calculates accessibility to and from a given block.

Parameters:

block (Block or int) – The block for which accessibility is calculated. It can be an instance of Block or an integer representing the block ID.

Returns:

GeoDataFrame containing blocks with calculated accessibility to and from the specified block.

Return type:

geopandas.GeoDataFrame

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.