Skip to content

GeoFacetMakie.jl ​

Create geographically faceted visualizations with Julia and Makie.jl

Lifecycle Build Status Documentation Documentation

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 ​

julia
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 ​

julia
using Pkg
Pkg.add("GeoFacetMakie")

Makie Backend Required

GeoFacetMakie.jl requires a Makie backend. Install one of:

  • CairoMakie.jl for static plots

  • GLMakie.jl for interactive plots

  • WGLMakie.jl for web-based plots

Getting Started ​

Basic tutorial Advanced multi-axis tutorial

Package Ecosystem ​

GeoFacetMakie.jl integrates seamlessly with the Julia data science ecosystem:

Contributing ​

TODO

Citation ​

If you use GeoFacetMakie.jl in your research, please cite:

bibtex
@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.