MEOS.js

June 22, 2026 · View on GitHub

These notebooks use MEOS.js (the WebAssembly bindings for MEOS / MobilityDB) as a JavaScript analysis library. Unlike the in-browser JupyterLite site, they are executed ahead of time with their outputs committed, so they render directly on GitHub — click a notebook and read the results, no install or run needed. This mirrors how PyMEOS-Examples is laid out, but for the JavaScript bindings.

Notebooks

FileShows
01-getting-started.ipynbLoad MEOS.js, build a TGeomPoint, then length / tpoint_speed / shiftScaleTime / atGeom, with static SVG plots (speed-coloured path; clip to a polygon).

How it works

GitHub's notebook viewer does not execute notebooks — it only shows the outputs saved in the file. So two things matter:

  1. A kernel that runs JavaScript headlessly. We use the Deno Jupyter kernel. Deno can load MEOS.js straight from npm with the npm:meos.js@1.0.2 specifier (wasm included), and its V8 has the WebAssembly Memory64 support MEOS needs — so there is no install step for the library itself.

    The CDN/ESM entry that the deck.gl demos use does not work under Deno: its Emscripten loader takes the Node path and tries to require() the wasm by URL. The npm: specifier resolves the wasm to a real file, which works.

  2. Outputs GitHub will render — i.e. static ones. GitHub strips JavaScript from notebook HTML for security, so interactive deck.gl maps would not show. These notebooks therefore emit JSON and SVG (via Deno.jupyter.display(..., { raw: true })). For interactive maps, use the deck.gl demos (trips.html, compare.html) or the JupyterLite site.

    Note: the Deno kernel does not auto-print a cell's last value under nbconvert, so each notebook displays results explicitly with small show() / plot() helpers.

Re-running them

# 1. Install Deno (once): https://deno.com/
curl -fsSL https://deno.land/install.sh | sh

# 2. Execute every notebook and bake outputs back into the .ipynb files
npm run build:notebooks

build:notebooks runs scripts/run-notebooks.sh: it registers the Deno kernel (deno jupyter --install) and runs jupyter nbconvert --execute (reusing the JupyterLite venv for nbconvert).