Skip to main content

Python tools for the CoCliCo workbench

Project description

coclico-workbench

Welcome to the CoCliCo workbench! This is a prototype repository containing tutorials and exploratory tools for Coastal Climate Core Services. It enables expert users to conduct in-depth analyses using data available in the platform, either online or offline.

Coding online in Google Colab or Binder

Notebooks can be opened in Google Colab Open in Colab or in Binder Open in Binder. The latter uses the environment.yml file in the main directory.

Coding offline (locally) in the Workbench Environment

Please follow the instructions below to install the CoCliCo Workbench environment:

  1. Install GitHub Desktop for your OS: https://desktop.github.com/

  2. Install the Mamba Package Manager (miniforge3) for your OS: https://github.com/conda-forge/miniforge#mambaforge

  3. Open a miniforge prompt (by searching "miniforge" in the task bar) and run mamba –-version to check if the installation was complete.

  4. Clone the coclico-workbench repo by adding ("Add" --> "clone repository" --> "URL") the URL in GitHub Desktop, you can find the URL under the green "code" button in this coclico-workbench repo. Please change the local path to something like: C:\Users\***\Documents\GitHub (where you create the GitHub folder yourself). The repo will be cloned here.

  5. In the miniforge prompt, change the directory to the cloned repo by running cd C:\Users\***\Documents\GitHub\coclico-workbench\coclicodata_env, where *** needs to be replaced to your system variables.

  6. This directory contains an environment.yml file with all the necessary packages describing the software dependencies. Create the software environment (called coclico) by running the following command in the miniforge prompt (note, this will take about 10-15 minutes to run):

    mamba env create -f environment.yml
    
  7. Now you can activate the environment we just created, in your miniforge prompt please run the following:

    mamba activate coclico
    
  8. You can look which environments you have installed by running: mamba env list. It places a star to indicate in which environment you are situated now (also indicated in front of your command line).

  9. In principle, mamba should have installed the pip dependencies as well. If it fails to install these, you can install the ones requiring pip in the environment.yml file manually by running (note list might not be complete, check against the environment.yml file):

    pip install stactools-geoparquet-items odc-ui odc-stac odc-stats odc-algo odc-io odc-cloud[ASYNC] mapbox mapboxcli xstac
    
  10. To check if all went well you can run mamba list to list all installed packages and search for, for instance mapbox. If it is present, you can continue.

  11. For running jupyter notebooks and / or python scripts, we recommend to install VS Code editor: https://code.visualstudio.com/ as it offers flexibility in selecting environments, directories and python interpreters as well as offers various useful extensions all in one user interface.

  12. Open VS Code and select the cloned coclico-workbench folder as your working directory. As a test, you can open IPCC_AR5_AR6_comparison.ipynb in notebooks. Select your kernel (the coclico env) in the top right corner and run cells by pressing shift-enter. You should be able to progress through the notebook without any errors.

  13. Might you run into trouble with these installation guidelines, please reach out to @EtienneKras, @mathvansoest or @FlorisCalkoen for help.

Repository structure

  • exploratory_tools: Various notebooks that dive deep into user stories with very specific needs too detailed for the CoCliCo web platform; i.e. comparisons to High-Resolution data, aggregating information on different levels, etc.

  • tutorials: Short example notebooks describing how to configure and use the CoCliCo Data repository (STAC) for different data types (CoG, Zarr, Parquet).

  • src/coclico: Various scripts with basic functionalities that can be used for the tutorials & exploratory tools.

  • docs: MkDocs documentation for the CoCliCo Handbook.

  • coclicodata_env: Full .yml file for the offline (local) workbench environment, the other .yml file in the main directory will be used by Binder or Colab in the online environment.

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

coclico is licensed under the terms of the GNU general public license.

Credits

coclico template was created with cookiecutter and and the py-pkgs-cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coclico-1.0.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coclico-1.0.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file coclico-1.0.0.tar.gz.

File metadata

  • Download URL: coclico-1.0.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coclico-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ff1b6458b83f486f30f03d8a572947d798fc2c40a9dfd36d7a901349e5d983da
MD5 1ed96a2946a325c2cce3e807e4e8e616
BLAKE2b-256 0bb0bc52c64db07773e495450292cdfd2824c56604e68a91cb925ff24151d770

See more details on using hashes here.

File details

Details for the file coclico-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: coclico-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coclico-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46fd6bf85e607fb223656e8f775717c435f75751887dd0c588bc5a3ebe1fcca3
MD5 7196f574e4827856f90615ac1a6a1569
BLAKE2b-256 66cc6c7bf1afbd0f0cbf66895b56741a51ad64289ae1c7ce85d04479dc653c90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page