From 824e6e24bbe76ed0624365dd5ea77c04ee5392be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Oct 2025 14:14:12 +0000 Subject: [PATCH 1/2] Initial plan From 391241965046158b260ef0b04f41f9fb7e2b3ffc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Oct 2025 14:18:34 +0000 Subject: [PATCH 2/2] Set up Jupyter notebook repository with scaffolding Co-authored-by: saru83 <66915939+saru83@users.noreply.github.com> --- .env.example | 8 +++ .gitignore | 165 ++++++++++++++++++++++++++++++++++++++++++++------- README.md | 126 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 277 insertions(+), 22 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..b1aa143 --- /dev/null +++ b/.env.example @@ -0,0 +1,8 @@ +# Environment Variables Template +# Copy this file to .env and fill in your actual values +# DO NOT commit the .env file with actual credentials + +# OpenAI API Key (if using OpenAI services) +OPENAI_API_KEY= + +# Add other environment variables below as needed diff --git a/.gitignore b/.gitignore index 02eac69..6f17e50 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,145 @@ -### AL ### -#Template for AL projects for Dynamics 365 Business Central -#launch.json folder +# Python/Jupyter optimized .gitignore + +# Environment variables +.env +.env.local + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints +*/.ipynb_checkpoints/* + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +Pipfile.lock + +# PEP 582 +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# macOS +.DS_Store + +# Windows +Thumbs.db +ehthumbs.db +Desktop.ini + +# IDEs .vscode/ -#Cache folder -.alcache/ -#Symbols folder -.alpackages/ -#Snapshots folder -.snapshots/ -#Testing Output folder -.output/ -#Extension App-file -*.app -#Rapid Application Development File -rad.json -#Translation Base-file -*.g.xlf -#License-file -*.flf -#Test results file -TestResults.xml \ No newline at end of file +.idea/ +*.swp +*.swo +*~ \ No newline at end of file diff --git a/README.md b/README.md index 1c6081d..b5d4940 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,126 @@ # UKDS-Modules -This repository contains Jupyter notebooks used as practice materials for various learning modules and hands-on experimentation. + +This repository contains Jupyter notebooks used as practice materials for various learning modules and hands-on experimentation with data science, research methods, and computational techniques. + +## Purpose + +This repository serves as a centralized collection of interactive Jupyter notebooks designed for: +- Educational workshops and training sessions +- Self-paced learning modules +- Practical exercises and demonstrations +- Research methodology tutorials +- Data analysis practice materials + +## Repository Structure + +``` +UKDS-Modules/ +├── README.md # This file - project overview and setup guide +├── .gitignore # Python/Jupyter-optimized ignore rules +├── .env.example # Template for environment variables +└── modules/ # (To be created) Individual module folders + ├── module-01/ # Example module structure + │ ├── notebooks/ # Jupyter notebooks for this module + │ ├── data/ # Sample datasets (if applicable) + │ └── README.md # Module-specific documentation + └── module-02/ + └── ... +``` + +## Environment Setup + +### Prerequisites + +- Python 3.8 or higher +- pip (Python package manager) +- Git + +### Installation + +1. **Clone the repository** + ```bash + git clone https://github.com/UKDataServiceOpen/UKDS-Modules.git + cd UKDS-Modules + ``` + +2. **Create a virtual environment** (recommended) + ```bash + # On Windows + python -m venv env + env\Scripts\activate + + # On macOS/Linux + python3 -m venv env + source env/bin/activate + ``` + +3. **Install Jupyter and dependencies** + ```bash + pip install jupyter notebook jupyterlab + # Additional packages will be specified in individual module directories + ``` + +4. **Set up environment variables** (if required) + ```bash + cp .env.example .env + # Edit .env with your actual API keys and configuration + ``` + +5. **Launch Jupyter** + ```bash + jupyter notebook + # or for JupyterLab + jupyter lab + ``` + +### Environment Variables + +Some modules may require API keys or configuration. Copy `.env.example` to `.env` and populate with your credentials: + +```bash +cp .env.example .env +``` + +**Important:** Never commit your `.env` file with actual credentials. The `.gitignore` file is configured to exclude it. + +## Working with Notebooks + +1. Navigate to the appropriate module folder +2. Open the desired `.ipynb` notebook file +3. Follow the instructions within each notebook +4. Execute cells sequentially using `Shift + Enter` + +## Contributing + +If you're contributing new modules or notebooks: + +1. Create a new folder under the appropriate section +2. Include a module-specific `README.md` with: + - Learning objectives + - Prerequisites + - Required packages (include a `requirements.txt` if needed) + - Expected outcomes +3. Ensure notebooks are well-documented with markdown cells +4. Clear all output before committing: `Cell > All Output > Clear` + +## Best Practices + +- **Version Control:** Clear notebook outputs before committing to keep diffs clean +- **Documentation:** Use markdown cells liberally to explain concepts and code +- **Dependencies:** Document all required packages at the module level +- **Data Privacy:** Never commit sensitive or personal data +- **Code Quality:** Follow PEP 8 style guidelines for Python code + +## Support + +For questions, issues, or contributions, please: +- Open an issue in this repository +- Contact the UK Data Service team + +## License + +Please refer to the repository license file for usage terms and conditions. + +--- + +**UK Data Service** - Providing access to social and economic data for research and teaching.