Analytical Maps with Observable Plot
Observable Plot's geo mark renders GeoJSON geometries. Combined with D3's projection system, it lets you create static or lightly interactive maps that integrate naturally into your document flow - without the overhead of a full mapping library.
Use Plot for analysis and presentation; use Leaflet for interactive exploration.
Plot maps have no basemap tiles - they show only the data geometry. For historical raster backgrounds, use Leaflet (see Historical Maps).
World Context Map
A minimal world map using TopoJSON from a CDN:
Plotting GeoJSON Points
Render the Lausanne 1888 cadastre points directly with Plot - no Leaflet needed:
Density Map (Hexbin)
Aggregate many points into hexagonal density bins using Plot.hexbin:
Combining Plot Map with Inputs
React to user inputs to show a subset of the data. Here a slider controls how many points are highlighted:
When to Use Plot vs Leaflet
| Criterion | Observable Plot | Leaflet |
|---|---|---|
| Base map tiles | No | Yes |
| Pan & zoom | No | Yes |
| Document flow integration | Natural | Requires fixed-height div |
| Reactive inputs | Natural | Requires manual layer management |
| Static/publication maps | Ideal | Overkill |
| Choropleth / analysis | Ideal | Possible but verbose |
| Historical raster overlays | No | Yes (WMTS) |