The heatmap layer displays observations distribution as a heatmap overlay.
The radius, blur and opacity arguments can be used to customize the heatmap appearance.
import polars as pl
from pylifemap import Lifemap
# Load iucn dataset
iucn = pl.read_parquet(
"https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.parquet"
)
(
Lifemap(iucn)
.layer_heatmap(radius=2, blur=10, opacity=0.9)
.show()
)
Warning: 777 taxids have not been found in Lifemap database.
Warning: 152 duplicated taxids have been found in the data.
For a detailed list of layer_heatmap arguments you can take a look at its documentation.
For an alternative heatmap visualization, see layer_heatmap_deck.