Lifemap.layer_heatmap

Lifemap.layer_heatmap(
    radius=30,
    intensity=5,
    threshold=0.05,
    opacity=0.5,
    color_range=None,
)

Add a heatmap layer.

This layer is used to display observations distribution.

Parameters

Name Type Description Default
radius float Heatmap radius, by default 30 30
intensity float Heatmap intensity, by default 5 5
threshold float Heatmap threshold, by default 0.05 0.05
opacity float Heatmap opacity as a floating number between 0 and 1, by default 0.5 0.5

Returns

Name Type Description
Lifemap A Lifemap visualization object.

Examples

>>> import polars as pl
>>> from pylifemap import Lifemap
>>> d = pl.DataFrame({
...     "taxid": [9685, 9615, 9994, 2467430, 2514524, 2038938, 1021470, 1415565, 1928562, 1397240, 230741],
... })
>>> (
...     Lifemap(d)
...     .layer_heatmap()
...     .show()
... )