Jupyter
A Jupyter notebook puts executable code, Markdown explanations, equations, and saved output in one .ipynb document. Use it to change a parameter in a worked example and keep the resulting calculation or plot beside your explanation. JupyterLab adds a file browser, terminals, editors, and multiple notebooks around that format.
Try a calculation from this site
These are public Markdown notes with Python code, not downloadable notebooks. Copy an example into your own notebook and keep its assumptions alongside the cells.
Before running either example, record and pin the Python and package versions outside the notebook. Both examples generate or specify their inputs in code; if you substitute a dataset, record its source and use portable relative paths rather than machine-specific absolute paths. For an R notebook, pin the R environment in the same way.
Run again from a clean start
The kernel is the process that executes code and remembers variables. Cells can appear in one order on the page but have been run in another. Saved output alone therefore does not prove reproducibility.
After changing an example, restart the kernel and run all cells from top to bottom. This reveals missing imports or values left over from earlier executions. Keep the parameters and explanation needed to interpret the new result. Treat large generated output as a build artifact when it does not belong in Git.
Notebooks suit exploration and explanation. When other programs begin to depend on the code, move reusable logic into ordinary source modules with tests, rather than relying on notebook execution order.
Where to go next
- Jupyter Architecture explains clients, servers, kernels, notebook files, and message channels.
- Project Jupyter documentation covers installation and the wider project.
- JupyterLab documentation covers the interface.
- nbconvert documentation covers scripted export to HTML, Markdown, PDF, and other formats.
Try Jupyter provides free demonstrations without a local installation. Create two cells where the second uses a variable from the first, run them out of order, then restart and run all. JupyterLite examples execute in the browser, so their available packages and kernel environment differ from a local Python installation.