KeplerGL.jl

Geospatial Visualization in Julia via Kepler.gl
Author jmboehm
Popularity
3 Stars
Updated Last
5 Months Ago
Started In
December 2023

KeplerGL.jl

Stable Dev Build Status License: MIT Downloads

Kepler.gl Demo

Julia package to create, render, and export geospatial maps, using Kepler.gl, via Blink.jl.

Currently uses version 2.5.5 of Kepler.gl.

Example

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")

Kepler.gl Demo

Layers

At this point the following layers are implemented:

Installation

To install the package, type in the Julia command prompt

] add KeplerGL

Used By Packages

No packages found.