Best practices for building reproducible, well-structured data analysis notebooks in Python. These guidelines target analysis and calibration work in Jupyter — geospatial analysis, statistical calibration, impact assessment — where the deliverable is insight (plots, reports, calibrated parameters), not a deployed service.
Copy copilot-instructions.md into your repo at .github/copilot-instructions.md. It consolidates the most important rules from this guide (and the shared standards) into a single concise file that GitHub Copilot reads automatically.
| File | Topic |
|---|---|
| Project Structure | Directory layout, notebooks/ vs src/, data folders |
| Notebook Structure | Sections, cell ordering, markdown narrative, cell size |
| Environment and Dependencies | conda/mamba, environment.yml, pinning, kernel setup |
| Configuration and Reproducibility | Config cells, paths, parameters, system detection, validation |
| Data Loading and I/O | Lazy loading, caching, file formats (NetCDF, Parquet, GeoJSON) |
| Data Processing and Memory | Chunked processing, xarray/dask, intermediate saves, large datasets |
| Visualization | matplotlib, folium, publication-quality plots, interactive maps |
| Code Reuse and Packaging | Extracting functions to src/, editable installs, notebook imports |
| Documentation and Communication | Markdown cells, section summaries, stakeholder outputs |
| Code Quality and Testing | Linting notebooks, CI for notebooks, nbstripout, pre-commit |