fig = Figure() ax1 = Axis(fig[1,1], title="Population Density") ax2 = Axis(fig[1,2], title="Seismic Risk") linkxaxes!(ax1, ax2) linkyaxes!(ax1, ax2) Add scale bar (manual) lines!(ax1, [0, 100], [ymin, ymin], color=:black, linewidth=3) text!(ax1, 50, ymin-5, text="100 km")
using DataFrames, CSV df = CSV.read("earthquakes.csv", DataFrame) julia data kartta
Colorbar(fig[1, 2], plt) fig
using Statistics df.magnitude = coalesce.(df.magnitude, mean(skipmissing(df.magnitude))) This explicitness prevents the “swiss cheese map” phenomenon—where missing values create false gaps in your visualization. Matplotlib is a compass. ggplot2 is a sextant. Makie.jl is a satellite. Cartography’s oldest trap is projection distortion
using GeoArrays, ArchGDAL ga = GeoArray("landsat_band4.tif") roi = ga[100:200, 100:200] Apply a filter (e.g., NDVI calculation) ndvi = (ga.band4 - ga.band3) / (ga.band4 + ga.band3) Write back with preserved georeferencing GeoArrays.write("ndvi_map.tif", ndvi) Julia’s is maturing fast: ArchGDAL
The magic: poly accepts arbitrary polygons and maps a continuous color scale in real time. With GLMakie , you can orbit, zoom, and slice through temporal data at 60 FPS. Cartography’s oldest trap is projection distortion. Julia’s Proj4.jl (bindings to PROJ) gives you full control.
For cartography specifically, Julia’s is maturing fast: ArchGDAL, GeoArrays, and Proj4.jl allow you to reproject, rasterize, and transform coordinate systems at C speed with Julia’s expressiveness. 2. The Base Layers: DataFrames.jl and Typed Mapping Before you draw the map, you need the data model. Unlike pandas’s flexible-but-slow object-dtype columns, DataFrame in Julia is columnar and type-stable.