Skip to main content

VizX VizX

databricks.labs.gbx.vizx renders rasters and turns Spark DataFrames into GeoDataFrames for interactive maps. It is tier-agnostic — the raster plotters take tile bytes (use them with pyrx or rasterx tiles), and the vector adapters take any Spark DataFrame.

These are driver-side, single-node helpers for inspecting results in a notebook — not distributed operations. They collect to the driver, so the vector adapters guard the collect with max_rows.

Opt-in extra

gbx.vizx requires geobrix[vizx], which pulls in matplotlib, geopandas, folium, and mapclassify. The package itself imports only matplotlib (raster rendering) and geopandas (the GeoDataFrame adapters); folium + mapclassify are used by plot_interactive / GeoDataFrame.explore() for interactive maps.

Installation

pip install "geobrix[vizx]"

From a Databricks notebook (commonly alongside the lightweight tier):

%pip install --quiet "geobrix[light,vizx] @ file:///Volumes/<catalog>/<schema>/<volume>/geobrix-0.4.0-py3-none-any.whl"

Import

from databricks.labs.gbx.vizx import (
plot_raster,
plot_file,
plot_mask_layers,
plot_static,
plot_interactive,
plot_pmtiles,
plot_cog,
as_gdf,
cells_as_gdf,
grid_as_gdf,
)
from databricks.labs.gbx.pmtiles import pmtiles_info

What's in VizX

Sub-pageWhat it coversWhen to use it
Multi-Layer Compositorplot_static / plot_interactive with multiple layers; embed-size ladder; audit; simplifyOverlaying vector, raster, grid, and PMTiles layers in one map
PMTiles Viewerspmtiles_info, plot_pmtiles, plot_cogInspecting and rendering PMTiles archives and COGs inline
Vectorplot_interactive (single-layer), plot_static (single-layer), as_gdf, cells_as_gdf, grid_as_gdfInteractive and static single-layer maps; converting DataFrames to GeoDataFrames
Rasterplot_raster, plot_file, plot_mask_layers, escape hatchesRendering raster tiles from bytes or disk

Next steps