Screengrid layer

The screengrid layer displays observations distribution as a colored grid with fixed-size cells.

Note

This visualization is highly sensitive to the current zoom level and extent. Small modifications of the view can lead to very different visual representations.

import polars as pl
from pylifemap import Lifemap

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

(
    Lifemap(iucn)
    .layer_screengrid(opacity=0.5)
    .show()
)
Warning: 706 taxids have not been found in Lifemap database
Warning: 152 duplicated taxids have been found in the data

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