faculty_extras.geoplot.choropleth

faculty_extras.geoplot.choropleth(folium_map, feature_collection, feature_index, feature_data, feature_index_property='id', bins=5, colourmap='viridis', ignore_missing_features=False, **kwargs)

Plot a choropleth on a folium map.

Parameters
folium_mapfolium.Map

The folium map object to plot on

feature_collectiondict

A GeoJSON FeatureCollection

feature_indexarray-like

A sequence of feature identifiers corresponding to the feature_data column

feature_dataarray-like

Scalar values to plot on the map for each feature in feature_index

feature_index_propertystr, optional

The property of features in feature_collection containing the feature_index (default: ‘id’)

binsint or array-like, optional

The number of bins, or, the edges of the bins (default: 5)

colourmapstr, optional

The matplotlib colourmap to use (http://matplotlib.org/users/colormaps.html, default: ‘viridis’)

ignore_missing_featuresbool, optional

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

ignore_missing_featuresbool, optional

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

**kwargs

Additional keyword arguments to pass to the folium choropleth method