Getting started
Notebooks and export¶
Where maps show, how to share them, and how to compare two side by side.
In a notebook¶
The last expression of a cell displays the map: kh.map(...) or a kh.Map after .add(). Maps work in Jupyter, JupyterLab, VS Code notebooks and Google Colab. Set the height with height=600 or height="80vh".
Export one page¶
The page holds the data, the map, the title and the legend; open it in any browser or attach it to an email. Cards placed above or below the map are laid out around it.
Side by side¶
The maps pan and zoom together while the notebook is running. Pass link=False to move them separately.
Native Lonboard¶
from lonboard import Map
layers = kh.layer(states, "fill-[density] ramp-ylorrd scheme-q5")
Map(layers)
Large data¶
Lonboard sends data to the browser as binary arrays, so hundreds of thousands of features stay smooth. Only the geometry and the columns your style names are sent. Data in any CRS is reprojected; data without one is refused with a hint.