Skip to content

Aeromagnetic Survey

A raster visualization of the 1955 Great Britain aeromagnetic survey, which measured the Earth’s magnetic field by plane. Each sample recorded the longitude and latitude alongside the strength of the IGRF in nanoteslas. This example demonstrates both raster interpolation and smoothing (blur) options.

Loading Example...

Credit: Adapted from an Observable Plot example.

Specification

js
import * as vg from "@uwdata/vgplot";

await vg.coordinator().exec([
  vg.loadParquet("ca55", "data/ca55-south.parquet")
]);

const $interp = vg.Param.value("random-walk");
const $blur = vg.Param.value(0);

export default vg.vconcat(
  vg.hconcat(
    vg.menu({
      label: "Interpolation Method",
      options: ["none", "nearest", "barycentric", "random-walk"],
      as: $interp
    }),
    vg.hspace("1em"),
    vg.slider({label: "Blur", min: 0, max: 100, as: $blur})
  ),
  vg.vspace("1em"),
  vg.plot(
    vg.raster(
      vg.from("ca55"),
      {
        x: "LONGITUDE",
        y: "LATITUDE",
        fill: vg.max("MAG_IGRF90"),
        interpolate: $interp,
        bandwidth: $blur
      }
    ),
    vg.colorScale("diverging"),
    vg.colorDomain(vg.Fixed)
  )
);
yaml
meta:
  title: Aeromagnetic Survey
  description: >
    A raster visualization of the 1955
    [Great Britain aeromagnetic survey](https://www.bgs.ac.uk/datasets/gb-aeromagnetic-survey/),
    which measured the Earth’s magnetic field by plane.
    Each sample recorded the longitude and latitude alongside the strength of
    the [IGRF](https://www.ncei.noaa.gov/products/international-geomagnetic-reference-field)
    in [nanoteslas](https://en.wikipedia.org/wiki/Tesla_(unit)).
    This example demonstrates both raster interpolation and smoothing (blur) options.
  credit: Adapted from an [Observable Plot example](https://observablehq.com/@observablehq/plot-igfr90-raster).
data:
  ca55:
    file: data/ca55-south.parquet
params:
  interp: random-walk
  blur: 0
vconcat:
- hconcat:
  - input: menu
    label: Interpolation Method
    options: [none, nearest, barycentric, random-walk]
    as: $interp
  - hspace: 1em
  - input: slider
    label: Blur
    min: 0
    max: 100
    as: $blur
- vspace: 1em
- plot:
  - mark: raster
    data: { from: ca55 }
    x: LONGITUDE
    y: LATITUDE
    fill: { max: MAG_IGRF90 }
    interpolate: $interp
    bandwidth: $blur
  colorScale: diverging
  colorDomain: Fixed
json
{
  "meta": {
    "title": "Aeromagnetic Survey",
    "description": "A raster visualization of the 1955 [Great Britain aeromagnetic survey](https://www.bgs.ac.uk/datasets/gb-aeromagnetic-survey/), which measured the Earth’s magnetic field by plane. Each sample recorded the longitude and latitude alongside the strength of the [IGRF](https://www.ncei.noaa.gov/products/international-geomagnetic-reference-field) in [nanoteslas](https://en.wikipedia.org/wiki/Tesla_(unit)). This example demonstrates both raster interpolation and smoothing (blur) options.\n",
    "credit": "Adapted from an [Observable Plot example](https://observablehq.com/@observablehq/plot-igfr90-raster)."
  },
  "data": {
    "ca55": {
      "file": "data/ca55-south.parquet"
    }
  },
  "params": {
    "interp": "random-walk",
    "blur": 0
  },
  "vconcat": [
    {
      "hconcat": [
        {
          "input": "menu",
          "label": "Interpolation Method",
          "options": [
            "none",
            "nearest",
            "barycentric",
            "random-walk"
          ],
          "as": "$interp"
        },
        {
          "hspace": "1em"
        },
        {
          "input": "slider",
          "label": "Blur",
          "min": 0,
          "max": 100,
          "as": "$blur"
        }
      ]
    },
    {
      "vspace": "1em"
    },
    {
      "plot": [
        {
          "mark": "raster",
          "data": {
            "from": "ca55"
          },
          "x": "LONGITUDE",
          "y": "LATITUDE",
          "fill": {
            "max": "MAG_IGRF90"
          },
          "interpolate": "$interp",
          "bandwidth": "$blur"
        }
      ],
      "colorScale": "diverging",
      "colorDomain": "Fixed"
    }
  ]
}