All examples
Visualization

Explore Boulder with offline pan and zoom

Navigate sixteen illustrative Boulder station observations, reveal labels as space opens and compare a point chart with optional Colorado boundaries.

plot_interactive_maps.aner
// Interactive navigation is provided by the compatible Aner VS Code extension.
// The first chart requires no map pack. The second requires only usa.co.
// Locations and values below are invented observations near downtown Boulder.
import aner.plot
import aner.geo

let stationPositions = List(
    geo.position(longitude: -105.2760, latitude: 40.0120),
    geo.position(longitude: -105.2735, latitude: 40.0120),
    geo.position(longitude: -105.2710, latitude: 40.0120),
    geo.position(longitude: -105.2685, latitude: 40.0120),
    geo.position(longitude: -105.2760, latitude: 40.0140),
    geo.position(longitude: -105.2735, latitude: 40.0140),
    geo.position(longitude: -105.2710, latitude: 40.0140),
    geo.position(longitude: -105.2685, latitude: 40.0140),
    geo.position(longitude: -105.2760, latitude: 40.0160),
    geo.position(longitude: -105.2735, latitude: 40.0160),
    geo.position(longitude: -105.2710, latitude: 40.0160),
    geo.position(longitude: -105.2685, latitude: 40.0160),
    geo.position(longitude: -105.2760, latitude: 40.0180),
    geo.position(longitude: -105.2735, latitude: 40.0180),
    geo.position(longitude: -105.2710, latitude: 40.0180),
    geo.position(longitude: -105.2685, latitude: 40.0180))
let stationValues = List(8.0, 12.0, 15.0, 11.0, 18.0, 9.0, 14.0, 17.0,
    10.0, 13.0, 19.0, 16.0, 7.0, 20.0, 21.0, 6.0)
let stationTotals = List(12.0, 18.0, 24.0, 16.0, 30.0, 14.0, 22.0, 28.0,
    15.0, 20.0, 32.0, 26.0, 10.0, 34.0, 36.0, 8.0)
let stationLabels = List("Station 01", "Station 02", "Station 03", "Station 04",
    "Station 05", "Station 06", "Station 07", "Station 08",
    "Station 09", "Station 10", "Station 11", "Station 12",
    "Station 13", "Station 14", "Station 15", "Station 16")

// Pack-free point chart: zoom into the cluster to reveal more station labels.
let stations = plot.geo_scatter(positions: stationPositions,
    values: stationValues, labels: stationLabels)
    .point_sizes(values: stationTotals, max_radius: 7.0)
    .point_labels("avoid")
    .extent(west: -105.34, south: 39.96, east: -105.20, north: 40.09)
    .projection("lambert_azimuthal_equal_area")
    .size(width: 900, height: 620)
    .title("Boulder: zoom into sixteen illustrative stations")
    .caption("Invented observations; color is a synthetic index, circle area is a separate synthetic total. No map pack.")
stations.show()

// Optional usa.co pack: generalized Census 2025 Boulder municipal context.
plot.map("usa.co.places", keys: List("0807850"), values: List(20.0))
    .add_points(positions: stationPositions, values: stationValues, labels: stationLabels)
    .point_sizes(values: stationTotals, max_radius: 7.0)
    .point_labels("avoid")
    .extent(west: -105.34, south: 39.96, east: -105.20, north: 40.09)
    .projection("lambert_azimuthal_equal_area")
    .size(width: 900, height: 620)
    .title("The same stations over Boulder municipal geometry")
    .caption("Invented observations; synthetic index and total. Generalized Census 2025 place geometry; optional usa.co pack.")
    .show()

Run step by step in VS Code.

The notebook separates observations and chart construction into cells. It opens with empty outputs and shared variables. Map cells state which optional local packs they need.

  1. Install a compatible native Aner executable and VS Code extension using the editor guide. Chart construction and interactive geographic navigation require the matching development runtime and editor.
  2. Download the .anernb notebook and open it in your VS Code project. If it appears as JSON, choose Reopen Editor With… → Aner Notebook.
  3. Select the Aner — notebook kernel and keep Shared variables active. Run code cells from top to bottom, or choose Run All. Later cells reuse observations and chart values from earlier cells. Run cells that need no pack before trying the optional geographic map.
  4. Read the figures below their producing cells. In geographic outputs, drag to pan and use the zoom controls to reveal crowded labels. Static SVG exports retain the initial view. Source observations, units and limitations remain in each caption.

After changing an earlier cell, rerun its dependent cells. Use Aner: Restart Notebook Session, then Run All, for a clean experiment. Saved outputs are historical; reopening the file starts without live variables. The notebook guide explains session state, inspection, and runtime controls.

Make it your experiment.

With a compatible development runtime installed, save this program as examples/plot_interactive_maps.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.

Terminal
aner check examples/plot_interactive_maps.aner
aner run examples/plot_interactive_maps.aner

The aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.

Requires a chart enabled native Aner development runtime and a matching VS Code extension for notebook display and interactive geographic navigation. Aner Plot awaits a binary release and is not included in the published research preview. Development packages are not available on this website. Copy the required matching .anermap files to the computer and install them locally. The first point chart needs no map pack; the second map needs only usa.co. All observations are included, and execution requires no network, credentials or external service. The website shows static native SVG figures; pan and zoom run in the compatible local notebook renderer.

Map pack status
aner maps list
aner maps path

Observations are synthetic teaching inputs. Geographic context comes from optional offline boundary packs and does not add street detail or establish observed traffic conditions.

Read the chart and map contracts
Install Aner