{"id":14985615,"url":"https://github.com/sodascience/cbs_python","last_synced_at":"2025-07-13T17:36:05.053Z","repository":{"id":237476867,"uuid":"654118669","full_name":"sodascience/cbs_python","owner":"sodascience","description":"An example python environment to use in CBS","archived":false,"fork":false,"pushed_at":"2025-03-24T10:52:36.000Z","size":173,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T17:53:31.939Z","etag":null,"topics":["cbs","conda","environment","python","statistics-netherlands","yml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sodascience.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-15T12:28:26.000Z","updated_at":"2025-03-24T10:52:40.000Z","dependencies_parsed_at":"2024-05-06T10:46:52.377Z","dependency_job_id":"187419f0-ac76-41db-8ab0-14258f665d8f","html_url":"https://github.com/sodascience/cbs_python","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":0.12,"last_synced_commit":"3c7c0a21e6b1c0eaf903e7b6d4e7e114537340da"},"previous_names":["sodascience/cbs_python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodascience%2Fcbs_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodascience%2Fcbs_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodascience%2Fcbs_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sodascience%2Fcbs_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sodascience","download_url":"https://codeload.github.com/sodascience/cbs_python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487710,"owners_count":21112188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cbs","conda","environment","python","statistics-netherlands","yml"],"created_at":"2024-09-24T14:11:22.094Z","updated_at":"2025-04-11T22:02:30.023Z","avatar_url":"https://github.com/sodascience.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Configuring Python in CBS Remote Access (RA)\n\n**Python is not installed by default at CBS RA (yet).** To activate Python, contact the CBS microdata team at [`microdata@cbs.nl`](mailto:microdata@cbs.nl).\n\n### Default Python Packages\n\nBy default, some packages are available in Python at CBS RA, such as `pandas`, `pyreadstat` or `matplotlib`\n\nIf you require additional packages or specific versions, follow the steps below to create and submit your own Python environment.\n\n---\n\n### Creating a Custom Python Environment\n\nFollow these instructions to set up and submit a customized Python environment. You need to use a **Windows** computer.\n\n#### Step 1: Check Existing Environment\n\n- Check if `environment0000.txt` (replace `0000` with your actual project number) already contains the required packages and suitable versions.\n- **If yes:** Send this file directly to CBS.\n- **If no:** Continue to Step 2.\n\n#### Step 2: Create the Environment (Windows + Conda)\n\nInstall conda locally (only needed if you do not already have Conda installed):\n- Follow the official Conda installation instructions [here](https://conda.io/projects/conda/en/latest/user-guide/install/index.html#regular-installation).\n- If you're unfamiliar with command-line tools, consider installing [Anaconda](https://www.anaconda.com/products/individual) instead.\n\nOn your local Windows machine:\n\n```sh\nconda create -n 0000 python\nconda activate 0000\nconda install pip\npip install package_name\n```\n\nReplace `package_name` with the packages you need (e.g., `pip install numpy`). If you want to install all the packages in the requirements.txt file in this repository, use `pip install -r requirements.txt`\n\n**Note:** If using Jupyter Notebook or Spyder, install these explicitly, e.g.:\n\n```sh\npip install jupyter spyder\n```\n\n#### Step 3: Export the Environment\n\nExport the environment into a requirements file:\n\n```sh\npip freeze \u003e C:\\temp\\environment0000.txt\n```\n\nCheck `environment0000.txt` for local paths (`file://`). If found, regenerate using:\n\n```sh\npip list --format=freeze \u003e C:\\temp\\environment0000.txt\n```\n\n#### Step 4: Verify Environment\n\nValidate your environment by removing and recreating it:\n\n```sh\nconda remove -n 0000 --all\nconda create -n 0000 \nconda activate 0000\nconda install pip\npip install -r C:\\temp\\environment0000.txt\n```\n\nTest thoroughly before submission by running python and importing your packages one by one.\n\n#### Step 5: Submit Your Environment\n\nSend your verified `environment0000.txt`  (replace 0000 by your project number) to CBS via email.\n\n\n\n---\n\n## Using Python at CBS RA\n\nWe recommend to use Python through Visual Studio Code (VS Code), installed by default:\n\n- In VS Code, select the Python interpreter in the bottom-right corner of the editor.\n\nYou could also use Python through Jupyter in RA, for that, open an Anaconda terminal in the RA and run:\n\n```sh\nconda activate 0000\njupyter notebook --notebook-dir=H:\n```\n\nThis opens Jupyter in your shared directory (`H:`).\n\n---\n\n## Contact\n\nThis documentation is maintained by the [ODISSEI Social Data Science (SoDa)](https://odissei-data.nl/nl/soda/) team.\n\nFor technical questions or suggestions:\n\n- File an issue in the project's issue tracker, or\n- Contact [Javier Garcia-Bernardo](https://github.com/jgarciab).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsodascience%2Fcbs_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsodascience%2Fcbs_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsodascience%2Fcbs_python/lists"}