faculty_extras.geoplot.centred_map

faculty_extras.geoplot.centred_map(feature_collection, feature_selection=None, feature_index_property='id', ignore_missing_features=False, **kwargs)

Create a folium map centred on a GeoJSON FeatureCollection.

Parameters
feature_collectiondict

A GeoJSON FeatureCollection

feature_selectionarray-like, optional

A set of keys to select a slice from feature_collection (default: use whole feature_collection)

feature_index_propertystr, optional

The property of features in feature_collection to use when extracting a selection (default: ‘id’)

ignore_missing_featuresbool, optional

When True, quitely ignore features in feature_selection missing from feature_collection (default: False)

**kwargs

Additional keyword arguments to pass to folium.Map

Returns
folium.Map

A map centred on feature_collection