The points layer displays observations as points on the lifemap tree.
It is possible to make the fill color and the radius of the points depending on a data variable.
import polars as pl
from pylifemap import Lifemap, aggregate_count
# Load iucn dataset
iucn = pl.read_csv(
"https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv"
)
# Aggregate observations count along branches
iucn_agg = aggregate_count(iucn)
(
Lifemap(iucn_agg)
.layer_points(fill_col="n", radius_col="n", opacity=0.7, popup=True)
.show()
)
Warning: 706 taxids have not been found in Lifemap database
For a detailed list of layer_points
arguments you can take a look at its documentation.