Skip to content

geohierarchy.maps.general_map

Interactive folium map of an area, points of interest and any GeoDataFrame / H3 / WKB table (one implementation for every package).

general_map(m=None, aoi=None, pois=None, gdfs=None, poi_column=None, poi_color=None, poi_cmap=None, poi_vmin=None, poi_vmax=None, poi_icon_column=None, column=None, color='black', cmap=None, vmin=None, vmax=None, opacity=0.4, size_column=None, zoom_start=11, cluster_pois=True)

One Folium map with an area of interest, points of interest and any number of layers, each coloured by a column or a fixed colour.

Parameters:

Name Type Description Default
m Optional[Map]

Existing map to draw on; None creates one.

None
aoi Optional[GeoDataFrame]

Area of interest, drawn as an outline.

None
pois Optional[Union[GeoDataFrame, List[GeoDataFrame]]]

Point layer(s) of interest.

None
gdfs Optional[Union[GeoDataFrame, DataFrame, List[Union[GeoDataFrame, DataFrame]]]]

Other layers: GeoDataFrames, Polars frames with h3_cell or WKB geometry.

None
poi_column Optional[str]

POI column used for colour.

None
poi_color Optional[str]

Fixed POI colour.

None
poi_cmap Optional[str]

Colour map for poi_column.

None
poi_vmin Optional[float]

Lower end of the POI colour scale.

None
poi_vmax Optional[float]

Upper end of the POI colour scale.

None
poi_icon_column Optional[str]

Column with an emoji drawn on each POI.

None
column Optional[str]

Layer column used for colour.

None
color str

Fixed layer colour.

'black'
cmap Optional[str]

Colour map for column.

None
vmin Optional[float]

Lower end of the layer colour scale.

None
vmax Optional[float]

Upper end of the layer colour scale.

None
opacity float

Fill opacity of the layers.

0.4
size_column Optional[str]

Column scaling the size of point features.

None
zoom_start int

Initial zoom.

11
cluster_pois bool

Cluster nearby POIs into one marker.

True

Returns:

Type Description
Map

The Folium map.