A browser-based Python environment for UC Carpentries Python workshops. It runs entirely in the browser using JupyterLite: no install, no account, no setup. It exists as a fallback for learners who can't install Python locally (locked-down laptops, install trouble during a workshop, or wanting to start fast).
It covers both Python lessons UC Carpentries teaches:
- Library Carpentry: Introduction to Python (
lc-python-intro) - Software Carpentry: Plotting and Programming in Python (
python-novice-gapminder)
Live site: https://ucla-data-science-center.github.io/uc-carpentries-python-lite/
Both lessons' data and a welcome notebook are bundled in, so file paths like data/2011_circ.csv and data/gapminder_gdp_oceania.csv work exactly as the lesson text writes them.
- Open the live site: https://ucla-data-science-center.github.io/uc-carpentries-python-lite/. It loads JupyterLab in your browser. First load can take a few seconds while the Python kernel downloads.
- The
welcome.ipynbnotebook opens automatically. Run its first code cell to confirm everything works. - To start a fresh notebook: click + at the top of the file browser, then choose Python (XPython).
- Follow your lesson:
- Library Carpentry: https://librarycarpentry.github.io/lc-python-intro/
- Software Carpentry: https://swcarpentry.github.io/python-novice-gapminder/
Both lessons' datasets live together in data/: the 12 Chicago Public Library circulation CSVs (2011-2022) plus all_years.pkl / df_long.pkl for Library Carpentry, and the Gapminder GDP CSVs for Software Carpentry.
- No shell commands. Lines starting with
!(such as!pip installor!ls) don't work in JupyterLite. Everything you need is preinstalled. - Preinstalled packages:
pandas,numpy,matplotlib,seaborn,plotly. If a lesson asks you to install something else, it won't be available here. - Your work lives in the browser. Notebooks you create are saved to your browser's local storage, not to a server. Clearing site data wipes them. Download anything you want to keep (right-click the file → Download).
This repo is a JupyterLite site that GitHub Actions builds and publishes to GitHub Pages on every push to main.
| Path | Purpose |
|---|---|
content/welcome.ipynb |
The notebook that opens on load. |
content/lc-python/data/ |
Library Carpentry datasets. |
content/gapminder/data/ |
Software Carpentry datasets (copied from swcarpentry/python-novice-gapminder). |
environment.yml |
The in-browser kernel and its packages (xeus-python + the scientific stack), resolved from emscripten-forge. |
requirements.txt |
The build-time tools that run in CI (jupyterlite, jupyterlite-xeus, jupyter-server), version-pinned. |
jupyter-lite.json |
JupyterLite config. Sets the notebook that opens on load (welcome.ipynb). |
.github/workflows/deploy.yml |
Build + deploy to Pages. |
The build passes one --contents flag per lesson. Each lesson keeps its data in its own data/ subfolder, and those subfolders merge into a single flat data/ in the built site, so lesson-hardcoded paths work without a prefix.
pip install -r requirements.txt
jupyter lite build \
--contents content/welcome.ipynb \
--contents content/lc-python \
--contents content/gapminder
# serve the result
python -m http.server -d _output 8000 # then open http://localhost:8000_output/ is git-ignored; it's a build artifact.
See MAINTAINING.md for how to update the data, add a lesson, change packages, edit the welcome notebook, and troubleshoot the deploy.