Leverages the high-performance 'GeoArrow' memory layout to render potentially very large 'Deck.gl' data layers on a 'maplibregl'/'mapboxgl' map created with R package 'mapgl'. The heavy lifting is done on the 'JavaScript' side in the browser using 'deck.gl-geoarrow' (< https://github.com/geoarrow/deck.gl-geoarrow/>). Currently provides functions for adding Scatterplot (points), Path (lines) and Polygon (polygons) layers. Has support for data classes from R packages 'wk' and 'sf'. In addition, convenience functions for styling data, tooltips and popups, as well as layer management are provided. Furthermore, remotely hosted 'GeoParquet' and 'GeoArrow' files can be visualised directly in the browser, without the need to first read them into R memory. Only the styling instructions are prepared by the user in R and are then transferred to and applied in the browser as the data arrives.
Easy and efficient rendering of very large geospatial data in the browser.
deckglgeoarrow provides functionality to efficiently visualise
potentially very large geospatial data as Deck.gl
layers on top of a
maplibre/mapbox
map created with package mapgl.
For very quick and efficient data transfer from R memory to the browser,
geoarrowWidget is used.
Layer creation is done in ‘JavaScript’ using
geoarrow/deck.gl-geoarrow
(see Features
section for details on how and why layer creation is efficient).
Currently, (MULTI)POINT, (MULTI)LINESTRING and (MULTI)POLYGON
features are supported by the following layer functions:
addGeoarrowScatterplotLayer
for point dataaddGeoarrowPathLayer
for linestring dataaddGeoarrowPolygonLayer
for polygon dataSupport for other layers, such as discrete global grid layers (S2,
A5, H3), origin-destination layers (Arc, trips) and
point-cloud layers, among others, will follow.
Spatial classes from the following R packages are supported (via data
argument):
The following local or remotely hosted files types are supported (via
file/url argument):
Note, that due to a
restriction
in the upstream JavaScript dependency, only files with native GeoArrow
geometry encoding are supported. WKB encoded geometries will not
render!
In addition, nanoarrow
array_streams (as files) are supported.
The development version of deckglgeoarrow can be installed from GitHub with:
# install.packages("pak")
pak::pak("r-spatial/deckglgeoarrow")
To showcase what the package can do, consider this example.
Here, we visualise
in one map.
Here’s how quickly this renders:

More examples can be found here
This project has been realized with financial support from the