Interactive Space Physics Visualization

Explore data with interactive plots

This tutorial demonstrates interactive visualization of space physics data using WebGL-powered plots. Unlike static plots, these visualizations allow you to pan, zoom, and explore your data directly.

Note

We use BonitoBook in Colab, which is a Julia native notebook with many additional features compared to Colab (we mainly use Colab as a computation platform). Using WGLMakie directly in Colab is currently not possible due to this limitation.

Setup: install the required packages
using Pkg
Pkg.add(["CDAWeb", "WGLMakie", "SpacePhysicsMakie"])

Interactive Time Series Plot

This example loads OMNI solar wind data:

Code
using CDAWeb
using WGLMakie, SpacePhysicsMakie

t0 = "2008-09-05T10:00:00"
t1 = "2008-09-05T22:00:00"
# The `cda` string macro provides a convenient way to fetch multiple variables from CDAWeb in a single line.
tvars = cda"OMNI_HRO_1MIN/flow_speed, Pressure"
f, axs = tplot(tvars, t0, t1)
f
Precompiling packages...
   2061.7 msQuartoNotebookWorkerJSON3Ext (serial)
  1 dependency successfully precompiled in 2 seconds
Precompiling packages...
    904.9 msQuartoNotebookWorkerTablesExt (serial)
  1 dependency successfully precompiled in 1 seconds
Precompiling packages...
   1165.8 msQuartoNotebookWorkerJSONExt (serial)
  1 dependency successfully precompiled in 1 seconds
Precompiling packages...
    918.9 msQuartoNotebookWorkerLaTeXStringsExt (serial)
  1 dependency successfully precompiled in 1 seconds
Precompiling packages...
   6524.4 msQuartoNotebookWorkerMakieExt (serial)
  1 dependency successfully precompiled in 7 seconds

Try interacting with the plot:

  • Scroll to zoom in/out
  • Click and drag to pan
  • ctrl+click to reset the view
Note

See SpacePhysicsMakie.jl webpage for an example using Speasy.jl.

Back to top