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, ...]],
**kwargs
) -> 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
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.
Named args
Any other keyword arguments will be passed onto the relevant layer, either a
ScatterplotLayer, PathLayer, or SolidPolygonLayer.
If you pass a list or tuple of data objects, kwargs will be passed to
all layers. For more control over rendering, construct Map and Layer
objects directly.
Returns:
-
Map–widget visualizing the provided data.
VizDataInput
module-attribute
¶
VizDataInput = Union[
gpd.GeoDataFrame,
gpd.GeoSeries,
pa.Table,
NDArray[np.object_],
shapely.geometry.base.BaseGeometry,
GeoInterfaceProtocol,
Dict[str, Any],
]
A type definition for allowed data inputs to the viz function.