oneworld.WebMap.add_heatmap

WebMap.add_heatmap(latitude, longitude, intensity, data=None, layer='map', **kwargs)

Add a heatmap to the map. Note that this method is experimental.

Parameters:
  • latitude (list or tuple or str) – Sequence (list or tuple) or name of the column of the dataframe in data containing the longitude coordinate for the center of each area.

  • longitude (list or tuple or str) – Sequence (list or tuple) or name of the column of the dataframe in data containing the latitude coordinate for the center of each area.

  • intensity (list or tuple or str) – Sequence (list or tuple) or name of the column of the dataframe in data containing the numeric value of each area.

  • data (pandas DataFrame) – Dataframe containing one or more columns of values to use. Each row must contain the data for an area, with columns as the data to be used (Default: None).

  • layer (str) – Name of the layer on which the heatmap will be added. (Default: “map”, which will add the choropleth directly to the map object).

  • kwargs (dict) – Extra keyword arguments to pass to the Leaflet.heat plugin.

Notes

Experimental. This method uses the Leaflet.heat plugin (you don’t need to download it). Documentation can be found in: https://github.com/Leaflet/Leaflet.heat