Visualization

The framework provides powerful visualization recipes for geospatial data science via the Makie.jl project. These recipes were carefully designed to maximize productivity and to protect users from GIS jargon. The main entry point is the viz function:

Meshes.vizFunction
viz(object; [options])

Visualize Meshes.jl object with various options.

Available options

  • color - color of geometries
  • alpha - transparency in [0,1]
  • colormap - color scheme/map from ColorSchemes.jl
  • colorrange - minimum and maximum color values
  • showsegments - visualize segments
  • segmentcolor - color of segments
  • segmentsize - width of segments
  • showpoints - visualize points
  • pointcolor - color of points
  • pointsize - size of points

The option color can be a single scalar or a vector of scalars. For Mesh subtypes, the length of the vector of colors determines if the colors should be assigned to vertices or to elements.

Examples

Different coloring methods (vertex vs. element):

# vertex coloring (i.e. linear interpolation)
viz(mesh, color = 1:nvertices(mesh))

# element coloring (i.e. discrete colors)
viz(mesh, color = 1:nelements(mesh))

Different strategies to show the boundary of geometries (showsegments vs. boundary):

# visualize boundary with showsegments
viz(polygon, showsegments = true)

# visualize boundary with separate call
viz(polygon)
viz!(boundary(polygon))

Notes

  • This function will only work in the presence of a Makie.jl backend via package extensions in Julia v1.9 or later versions of the language.
Meshes.viz!Function
viz!(object; [options])

Visualize Meshes.jl object in an existing scene with options forwarded to viz.

This function takes a geospatial domain as input and provides a set of aesthetic options to style the elements (i.e. geometries) of the domain.

Note

Notice that the geometry column of our geospatial data type is a domain (i.e. data.geometry isa Domain), and that this design enables several optimizations in the visualization itself.

Users can also call Makie's plot function in the geometry column as in

Mke.plot(data.geometry)

and this is equivalent to calling the viz recipe above. The plot function also works with various other objects such as EmpiricalHistogram and EmpiricalVariogram. That is convenient if you don't remember the name of the recipe.

Additionaly, we provide a basic scientific viewer to visualize all viewable variables in the data:

GeoTables.viewerFunction
viewer(geotable; kwargs...)

Basic scientific viewer for geospatial table geotable.

Aesthetic options are forwarded via kwargs to the Meshes.viz recipe.

Other plots are listed below that can be useful for geostatistical analysis.

Built-in

A hscatter plot between two variables var1 and var2 (possibly with var2 = var1) is a simple scatter plot in which the dots represent all ordered pairs of values of var1 and var2 at a given lag h.

𝒟 = georef((Z=[10sin(i/10) + j for i in 1:100, j in 1:200],))

𝒮 = sample(𝒟, UniformSampling(500))

fig = Mke.Figure(size = (800, 400))
hscatter(fig[1,1], 𝒮, :Z, :Z, lag=0)
hscatter(fig[1,2], 𝒮, :Z, :Z, lag=20)
hscatter(fig[2,1], 𝒮, :Z, :Z, lag=40)
hscatter(fig[2,2], 𝒮, :Z, :Z, lag=60)
fig

PairPlots.jl

The PairPlots.jl package provides the pairplot function that can be used with any table, including tables of attributes obtained with the values function.

Biplots.jl

The Biplot.jl package provides 2D and 3D statistical biplots.