This repository contains marimo notebooks used in a bachelor-level Operations Management lecture, with a focus on forecasting and inventory management. The notebooks are exported to WebAssembly and can be deployed to GitHub Pages for interactive teaching materials.
apps/demand_management.py- Forecasting lecture notebook.apps/demand_management_live.py- Lecture notebook of the live session.apps/inventory_management.py- Inventory management lecture notebook.
- Fork this repository.
- Add your marimo files to the
notebooks/orapps/directory:notebooks/notebooks are exported with--mode edit(lecture / interactive notebooks).apps/notebooks are exported with--mode run(standalone web apps/demos).
- Push to the
mainbranch. - Go to repository Settings > Pages and change the "Source" dropdown to "GitHub Actions".
- GitHub Actions will automatically build and deploy the site to GitHub Pages.
To include data or assets in your notebooks, add them to the public/ directory.
For example, load an image from the public/ directory in a notebook:
<img src="public/logo.png" width="200" />Load a CSV dataset from public/ (example for a marimo notebook using polars):
import polars as pl
df = pl.read_csv(mo.notebook_location() / "public" / "demand_history.csv")To test the export process locally, run scripts/build.py from the root directory:
python scripts/build.pyThis will export all notebooks into a folder called _site/ in the repository root. To serve the exported site locally:
python -m http.server -d _siteThen open http://localhost:8000 in your browser.
- Use
notebooks/for interactive lecture material that students can edit. - Use
apps/for immutable demos or assignments where you want a fixed run environment. - Include datasets and static assets in
public/so they are bundled with the exported site.