GeoFacetMakie.jl β
Create geographically faceted visualizations with Julia and Makie.jl
Overview β
GeoFacetMakie.jl brings the power of geofaceting to Julia's Makie.jl ecosystem. Inspired by the R geofacet package, it allows you to arrange plots in geographical layouts that preserve spatial relationships while enabling detailed comparisons across regions.
What is Geofaceting? β
Geofaceting is a visualization technique that arranges small multiples (facets) of plots according to their geographic positions. This approach:
Preserves spatial context - Viewers can easily understand geographic relationships
Enables detailed comparison - Each region gets its own dedicated plot space
Scales effectively - Works well with many regions without overcrowding
Maintains familiarity - Uses recognizable geographic layouts
Key Features β
πΊοΈ Geographic layouts - Arrange plots to match real-world geography
π Flexible plotting - Support for any Makie.jl plot type
π Axis linking - Link axes across facets for easy comparison
π¨ Full customization - Complete control over styling and appearance
β‘ High performance - Efficient rendering of complex multi-panel plots
π§© Extensible grids - Built-in grids plus support for custom layouts
Quick Start β
using GeoFacetMakie, DataFrames, CairoMakie
# Sample data
data = DataFrame(
state = ["CA", "TX", "NY", "FL"],
population = [39.5, 29.1, 19.8, 21.5],
year = [2023, 2023, 2023, 2023]
)
# Define plotting function
function plot_bars!(gl, data; kwargs...)
ax = Axis(gl[1, 1]; kwargs...)
barplot!(ax, [1], data.population, color = :steelblue)
ax.title = data.state[1]
end
# Load a grid and create geofaceted plot
grid = load_grid_from_csv("us_state_grid1")
geofacet(data, :state, plot_bars!;
grid = grid,
figure_kwargs = (size = (800, 600),),
common_axis_kwargs = (ylabel = "Population (M)",))Installation β
using Pkg
Pkg.add("GeoFacetMakie")Makie Backend Required
GeoFacetMakie.jl requires a Makie backend. Install one of:
CairoMakie.jlfor static plotsGLMakie.jlfor interactive plotsWGLMakie.jlfor web-based plots
Getting Started β
Examples Gallery β
Basic tutorial Advanced multi-axis tutorial
Package Ecosystem β
GeoFacetMakie.jl integrates seamlessly with the Julia data science ecosystem:
Makie.jl - High-performance plotting backend
DataFrames.jl - Data manipulation and grouping
CSV.jl - Data loading from files
Contributing β
TODO
Citation β
If you use GeoFacetMakie.jl in your research, please cite:
@software{geofacetmakie2025,
author = {Arnold, Callum},
title = {GeoFacetMakie.jl: Geographic Faceting for Julia},
url = {https://github.com/arnold-c/GeoFacetMakie.jl},
year = {2025}
}License β
GeoFacetMakie.jl is licensed under the MIT License.