viz¶
The top-level namespace accessible after import lonboard.
Layers are also accessible in the top-level namespace, but are documented in the layers/ folder.
lonboard.viz ¶
viz(
data: Union[VizDataInput, List[VizDataInput], Tuple[VizDataInput, ...]],
*,
scatterplot_kwargs: Optional[ScatterplotLayerKwargs] = None,
path_kwargs: Optional[PathLayerKwargs] = None,
polygon_kwargs: Optional[PolygonLayerKwargs] = None,
map_kwargs: Optional[MapKwargs] = None
) -> Map
A high-level function to plot your data easily.
The goal of this function is to make it simple to get something showing on a map.
For more control over rendering, construct Map and Layer objects directly.
This function accepts a variety of geospatial inputs:
- geopandas
GeoDataFrame - geopandas
GeoSeries - numpy array of Shapely objects
- Single Shapely object
- Any Python class with a
__geo_interface__property conforming to the Geo Interface protocol. dictholding GeoJSON-like data.- pyarrow
Tablewith a geometry column marked with a GeoArrow extension type - pyarrow
Arraymarked with a GeoArrow extension type defined by geoarrow-pyarrow
Alternatively, you can pass a list or tuple of any of the above inputs.
Parameters:
-
data(Union[VizDataInput, List[VizDataInput], Tuple[VizDataInput, ...]]) –a data object of any supported type.
Other Parameters:
-
scatterplot_kwargs(Optional[ScatterplotLayerKwargs]) –a
dictof parameters to pass down to all generatedScatterplotLayers. -
path_kwargs(Optional[PathLayerKwargs]) –a
dictof parameters to pass down to all generatedPathLayers. -
polygon_kwargs(Optional[PolygonLayerKwargs]) –a
dictof parameters to pass down to all generatedPolygonLayers. -
map_kwargs(Optional[MapKwargs]) –a
dictof parameters to pass down to the generatedMap.
For more control over rendering, construct Map and Layer objects directly.
Returns:
-
Map–widget visualizing the provided data.
VizDataInput
module-attribute
¶
VizDataInput = Union[
GeoDataFrame,
GeoSeries,
Table,
NDArray[object_],
BaseGeometry,
ArrowArrayExportable,
ArrowStreamExportable,
GeoInterfaceProtocol,
Dict[str, Any],
]
A type definition for allowed data inputs to the viz function.