Points layer

The points layer displays observations as points on the lifemap tree.

The fill and radius arguments allow to modify the size and color of the points. They can either be fixed values (numerical for radius, an hexadecimal color code for fill) or data column names. In this case, size or color will depend on the column values.

import polars as pl
from pylifemap import Lifemap, aggregate_count

# Load iucn dataset
iucn = pl.read_parquet(
    "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.parquet"
)

# Aggregate observations count along branches
iucn_agg = aggregate_count(iucn)

(
    Lifemap(iucn_agg)
    .layer_points(fill="n", radius="n", opacity=0.7, popup=True)
    .show()
)
Warning: 777 taxids have not been found in Lifemap database.

For a detailed list of layer_points arguments you can take a look at its documentation.