API

Convenience functions (scatter, arcs, lines, paths, polygons, text, hexbin, heatmap, geojson) are public but not exported, because their names collide with Plots.jl and Makie.jl. Call them qualified, e.g. DeckGL.scatter(...).

Types

A5Layer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ArcLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

BitmapLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ColumnLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

CompassWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

ContextMenuWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

ContourLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

Deck

Deck(layers; initial_view_state, map_style, controller, widgets, views, props...)

A deck.gl visualization: the layers to draw, the camera to draw them from, and the page furniture around them.

Arguments

  • layers: one Layer or an iterable of them, drawn in order

Keyword Arguments

  • initial_view_state::ViewState: starting camera. With no explicit views, deck.gl renders through a MapView, which needs a longitude and latitude; those two are filled in at the origin if left out. Default: world view at zoom 1
  • map_style: URL of a MapLibre style to draw a basemap beneath the layers, or nothing for no basemap. A basemap always requires network access at view time, for both MapLibre itself and the map tiles
  • controller: enable pan/zoom/rotate. Default: true
  • widgets: Widgets to overlay
  • views: Views to render through. Default: deck.gl’s own MapView
  • props...: any other deck.gl Deck prop, e.g. on_click=JS("info => ...")

Examples

deck = Deck(
    ScatterplotLayer(data=df, get_position=[:lng, :lat], get_radius=100),
    initial_view_state = ViewState(longitude=-122.4, latitude=37.8, zoom=11),
    widgets = [ZoomWidget(), CompassWidget()],
)

FirstPersonView

View{name}

A deck.gl view: the camera model the layers are rendered through. MapView is the geospatial default; OrthographicView and OrbitView render non-geographic data in Cartesian coordinates. Concrete views are const aliases, e.g. MapView === View{:MapView}.

FullscreenWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

GeoJsonLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

GeohashLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

GimbalWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

GreatCircleLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

GridCellLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

GridLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

H3ClusterLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

H3HexagonLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

HeatmapLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

HexagonLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

IconLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

IconWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

InfoWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

JS

JS(code::AbstractString)

Raw JavaScript, emitted verbatim into the generated page. Escape hatch to provide functions (typical for deck.gl properties).

Examples

# A prop deck.gl expects to be a function
ScatterplotLayer(data=df, get_position=[:lng, :lat], get_radius=JS("d => 10"))

# A callback
Deck(layer, on_click=JS("info => console.log(info.index)"))

Layer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

LineLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

LoadingWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

MVTLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

MapView

View{name}

A deck.gl view: the camera model the layers are rendered through. MapView is the geospatial default; OrthographicView and OrbitView render non-geographic data in Cartesian coordinates. Concrete views are const aliases, e.g. MapView === View{:MapView}.

OrbitView

View{name}

A deck.gl view: the camera model the layers are rendered through. MapView is the geospatial default; OrthographicView and OrbitView render non-geographic data in Cartesian coordinates. Concrete views are const aliases, e.g. MapView === View{:MapView}.

OrthographicView

View{name}

A deck.gl view: the camera model the layers are rendered through. MapView is the geospatial default; OrthographicView and OrbitView render non-geographic data in Cartesian coordinates. Concrete views are const aliases, e.g. MapView === View{:MapView}.

PathLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

PointCloudLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

PolygonLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

PopupWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

QuadkeyLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ResetViewWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

S2Layer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ScatterplotLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ScenegraphLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ScreenGridLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ScreenshotWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

ScrollbarWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

SelectorWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

SimpleMeshLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

SolidPolygonLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

TerrainLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

TextLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ThemeWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

Tile3DLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

TileLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

ToggleWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

TripsLayer

Layer{name}

A deck.gl layer: a name and a bag of props, serialized into a new deck.<name>(...) call. The concrete layers are const aliases of this type, so ScatterplotLayer is exactly Layer{:ScatterplotLayer} and layer isa ScatterplotLayer works as expected.

There is deliberately no Julia-side struct field per deck.gl prop. deck.gl’s own defaultProps tables are the source of truth for which props exist (see src/metadata.jl), and any prop left unset here is left unset in the output so that deck.gl applies its own default rather than one copied into Julia and left to drift.

View

View{name}

A deck.gl view: the camera model the layers are rendered through. MapView is the geospatial default; OrthographicView and OrbitView render non-geographic data in Cartesian coordinates. Concrete views are const aliases, e.g. MapView === View{:MapView}.

ViewState

ViewState(; props...)

The camera position layers are rendered from.

The meaningful props depend on the view: longitude, latitude, zoom, pitch and bearing for the geospatial MapView; target and zoom for OrthographicView and OrbitView. Nothing is defaulted here, so anything omitted is omitted from the output.

Examples

ViewState(longitude=-122.4, latitude=37.8, zoom=11, pitch=45)
ViewState(target=[0, 0, 0], zoom=3)          # OrthographicView / OrbitView

Widget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

ZoomWidget

Widget{name}

A deck.gl UI widget (zoom buttons, compass, fullscreen toggle, …). Concrete widgets are const aliases, e.g. ZoomWidget === Widget{:ZoomWidget}.

Functions

arcs

arcs(data, source, target; width=1, source_color=[0, 128, 255], target_color=[255, 0, 128], kwargs...)

Create an arc diagram visualization.

Arguments

  • data: Tables.jl-compatible data source
  • source: Source position as [lng_col, lat_col] or single column Symbol
  • target: Target position as [lng_col, lat_col] or single column Symbol

Keyword Arguments

  • width: Arc width (number or column Symbol). Default: 1
  • source_color: Source end color. Default: [0, 128, 255]
  • target_color: Target end color. Default: [255, 0, 128]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 3
  • kwargs...: Additional keyword arguments passed to ArcLayer

Example

trips = (src_lng=[-122.4], src_lat=[37.8], dst_lng=[-73.9], dst_lat=[40.7])
arcs(trips, [:src_lng, :src_lat], [:dst_lng, :dst_lat])

geojson

geojson(data; fill_color=[0, 0, 0, 100], line_color=[0, 0, 0], kwargs...)

Create a GeoJSON visualization.

Arguments

  • data: GeoJSON data as Dict, JSON string, or URL

Keyword Arguments

  • fill_color: Fill color for polygons. Default: [0, 0, 0, 100]
  • line_color: Line/stroke color. Default: [0, 0, 0]
  • line_width: Line width. Default: 1
  • point_radius: Point radius. Default: 1
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 4
  • kwargs...: Additional keyword arguments passed to GeoJsonLayer

heatmap

heatmap(data, lng, lat; radius=30, intensity=1, weight=1, kwargs...)

Create a heatmap visualization.

Arguments

  • data: Tables.jl-compatible data source
  • lng: Column name for longitude
  • lat: Column name for latitude

Keyword Arguments

  • radius: Radius of influence in pixels. Default: 30
  • intensity: Intensity multiplier. Default: 1
  • weight: Column for point weighting or constant. Default: 1
  • threshold: Minimum density threshold. Default: 0.05
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to HeatmapLayer

hexbin

hexbin(data, lng, lat; radius=1000, elevation_weight=1, kwargs...)

Create a hexagonal binning visualization.

Arguments

  • data: Tables.jl-compatible data source
  • lng: Column name for longitude
  • lat: Column name for latitude

Keyword Arguments

  • radius: Hexagon radius in meters. Default: 1000
  • elevation_weight: Column for elevation weighting or constant. Default: 1
  • color_weight: Column for color weighting or constant. Default: 1
  • elevation_scale: Elevation multiplier. Default: 1
  • extruded: Render as 3D hexagons. Default: true
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to HexagonLayer

lines

lines(data, source, target; width=1, color=[0, 0, 0], kwargs...)

Create a line visualization connecting points.

Arguments

  • data: Tables.jl-compatible data source
  • source: Source position as [lng_col, lat_col]
  • target: Target position as [lng_col, lat_col]

Keyword Arguments

  • width: Line width. Default: 1
  • color: Line color. Default: [0, 0, 0]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to LineLayer

open_html

open_html(deck::Deck; kwargs...) -> path

Write deck to a temporary file and open it in the default browser. Takes the same keyword arguments as to_html.

paths

paths(data, path_col; width=1, color=[0, 0, 0], kwargs...)

Create a path visualization.

Arguments

  • data: Tables.jl-compatible data source
  • path_col: Column containing path coordinates (arrays of [lng, lat] pairs)

Keyword Arguments

  • width: Path width. Default: 1
  • color: Path color. Default: [0, 0, 0]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • rounded: Round line caps and joints. Default: false
  • kwargs...: Additional keyword arguments passed to PathLayer

polygons

polygons(data, polygon_col; fill_color=[0, 0, 0, 100], line_color=[0, 0, 0], kwargs...)

Create a polygon visualization.

Arguments

  • data: Tables.jl-compatible data source
  • polygon_col: Column containing polygon coordinates

Keyword Arguments

  • fill_color: Fill color. Default: [0, 0, 0, 100]
  • line_color: Outline color. Default: [0, 0, 0]
  • line_width: Outline width. Default: 1
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to PolygonLayer

save_html

save_html(deck::Deck, path; kwargs...) -> path

Write deck to an HTML file. Takes the same keyword arguments as to_html; pass bundle=:local for a file that renders without network access.

scatter

scatter(data, lng, lat; radius=1, color=[255, 140, 0], opacity=1, zoom=10, kwargs...)

Create a scatterplot visualization.

Arguments

  • data: Tables.jl-compatible data source
  • lng: Column name for longitude (Symbol)
  • lat: Column name for latitude (Symbol)

Keyword Arguments

  • radius: Point radius (number or column Symbol). Default: 1
  • color: Point color as [R,G,B] or [R,G,B,A]. Default: [255, 140, 0]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to ScatterplotLayer

Example

data = (lng = [-122.4, -122.5], lat = [37.8, 37.7], size = [100, 200])
scatter(data, :lng, :lat, radius=:size, color=[0, 128, 255])

text

text(data, lng, lat, text_col; size=16, color=[0, 0, 0], kwargs...)

Create a text label visualization.

Arguments

  • data: Tables.jl-compatible data source
  • lng: Column name for longitude
  • lat: Column name for latitude
  • text_col: Column containing text labels

Keyword Arguments

  • size: Text size. Default: 16
  • color: Text color. Default: [0, 0, 0]
  • opacity: Layer opacity (0-1). Default: 1
  • zoom: Initial zoom level. Default: 10
  • kwargs...: Additional keyword arguments passed to TextLayer

to_html

to_html(deck::Deck; width="100%", height="500px", bundle=:cdn, title="DeckGL", scripts=String[]) -> String
to_html(io::IO, deck::Deck; kwargs...)

Render deck as a complete HTML page. The IO form streams it out rather than building it in memory first.

Keyword Arguments

  • width, height: CSS sizes for the container
  • bundle: where deck.gl itself comes from. :cdn links unpkg, keeping the page small but requiring network access to view. :local inlines the bundle from the deckgl artifact, producing a page that renders offline. A map_style needs the network either way, for MapLibre and for the map tiles, as do the peer libraries described below.
  • title: the page <title>
  • scripts: URLs of extra scripts to load before deck.gl. The library the H3 layers need is added automatically (see DeckGL.peer_scripts); this is for anything else, such as a loader for Tile3DLayer.

to_js

to_js(deck::Deck) -> String
to_js(io::IO, deck::Deck)

The JavaScript that builds and mounts deck.

The page carries no spec language and no interpreter: layers are emitted as the new deck.ScatterplotLayer({...}) calls a hand-written page would contain, which means the output can be read, pasted into a console, and debugged directly.

The IO form streams, encoding attribute buffers straight into the output instead of materializing the page – which at a million rows is mostly base64 – as a string first.