Julia package to create, render, and export geospatial maps, using Kepler.gl, via Blink.jl.
Currently uses version 2.5.5 of Kepler.gl.
The following code produces a simple point map:
using KeplerGL, Colors, ColorBrewer, CSV, DataFrames
token = "<INSERT MAPBOX TOKEN HERE>"
m = KeplerGL.KeplerGLMap(token, center_map=false)
df = CSV.read(joinpath(pathof(KeplerGL.KeplerGLBase), "..", "..", "assets", "example_data", "data.csv"), DataFrame)
KeplerGL.add_point_layer!(m, df, :Latitude, :Longitude,
color = colorant"rgb(23,184,190)", color_field = :Magnitude, color_scale = "quantize",
color_range = ColorBrewer.palette("PRGn", 6),
radius_field = :Magnitude, radius_scale = "sqrt", radius_range = [4.2, 96.2], radius_fixed = false,
filled = true, opacity = 0.39, outline = false);
m.config[:config][:mapState][:latitude] = 38.32068477880718
m.config[:config][:mapState][:longitude]= -120.42806781055732
m.config[:config][:mapState][:zoom] = 4.886825331541375
m.window[:map_legend_show] = false
m.window[:map_legend_active] = false
m.window[:visible_layers_show] = false
m.window[:visible_layers_active] = false
win = KeplerGL.render(m);
# Exporting an image
KeplerGL.export_image(win, "assets/img/earthquakes.png")
At this point the following layers are implemented:
- Point Layers
- Polygon Layers
- Hexbin Layers
- Line Layers
- Arc Layers
- Grid Layers
- Heatmap Layers
- Cluster Layers
- Icon Layers
- H3 Layers
- Trip Layers
To install the package, type in the Julia command prompt
] add KeplerGL