Lifemap
Lifemap(self, data, *, taxid_col='taxid', width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT, zoom=5, legend_width=None)
Build visualization.
Parameters
Name | Type | Description | Default |
---|---|---|---|
data |
pl .DataFrame | pd .DataFrame |
Visualization data. | required |
taxid_col |
str | Name of the data column with taxonomy ids, by default "taxid" |
'taxid' |
width |
int | str | Lifemap visualization width, in pixels or CSS units, by default DEFAULT_WIDTH |
DEFAULT_WIDTH |
height |
int | str | Lifemap visualization height, in pixels or CSS units, by default DEFAULT_HEIGHT |
DEFAULT_HEIGHT |
zoom |
int | Default Lifemap zoom level, by default 5 | 5 |
legend_width |
int | None | Legend width in pixels, by default None | None |
Examples
>>> import polars as pl
>>> from pylifemap import Lifemap
>>> d = pl.DataFrame({"taxid": [9685, 9615, 9994]})
>>> (
="100%", height="100vh")
... Lifemap(d, width
... .layer_points()
... .show()>>> )
Methods
Name | Description |
---|---|
pylifemap.Lifemap.layer_points |
Add a points layer. |
pylifemap.Lifemap.layer_lines |
Add a lines layer. |
pylifemap.Lifemap.layer_donuts |
Add a donuts layer. |
pylifemap.Lifemap.layer_heatmap |
Add a heatmap layer. |
pylifemap.Lifemap.layer_screengrid |
Add a screengrid layer. |
pylifemap.Lifemap.show |
Display the Jupyter widget for this instance. |
pylifemap.Lifemap.save |
Save the Jupyter widget for this instance to an HTML file. |