<jupyter_start><jupyter_text>SENTINEL Hub / xcube Integration SetupTo run the Notebooks in this folder, you will need some of your [SENTINEL Hub credentials](https://docs.sentinel-hub.com/api/latest//API/authentication) and a Python environmentwith [`xcube`](https://github.com/dcs4cop/xcube) and the `xcube` plugin [`xcube_sh`](https://github.com/dcs4cop/xcube-sh) installed. InstallationFor creating an `xcube` Python environment and installing `xcube` follow the instructions given in the [xcube's README](https://github.com/dcs4cop/xcube/blob/master/README.md).For installing the `xcube_sh` plugin follow the instructions given in the [xcube-sh's README](https://github.com/dcs4cop/xcube-sh/blob/master/README.md).Before using Jupyter Lab for the first time install the `jupyterlab` package and make sure the [Jupyter GeoJSON extension](https://www.npmjs.com/package/@jupyterlab/geojson-extension) is installed too:```bash(xcube) conda install -c conda-forge jupyterlab(xcube) jupyter labextension install @jupyterlab/geojson-extension``` Authentication / AuthorisationYour SENTINEL Hub (SH) API credentials may be passed by environment variables: ```bash(xcube) $ export SH_CLIENT_ID=(xcube) $ export SH_CLIENT_SECRET=(xcube) $ export SH_INSTANCE_ID=```The latter `SH_INSTANCE_ID` is your SH OGC instance ID and is required to allow submitting SH WFS requests which again are used to determine time stamps with valid observations for the given region.You can also pass the SH credentials to the `xcube_sh.cube.open_cube()` function as keyword arguments:```pythonsh_credentials = dict(client_id='',                      client_secret='',                      instance_id='')cube = open_cube(cube_config, **sh_credentials)``` Running Juypter-LabStart Jupyter Lab:```bash(xcube) $ jupyter-lab``` Test SetupTest whether setup was successfull by importing some important `xcube_sh` exports:<jupyter_code># Configure data cubes using CubeConfig
from xcube_sh.config import CubeConfig
# Open data cubes from SH with given CubeConfig
from xcube_sh.cube import open_cube
# Observe SH requests made open_cube()
from xcube_sh.observers import Observers
# View stored cubes
from xcube_sh.viewer import ViewerServer
from xcube_sh.version import version
version<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09246275197195443, 'fraction_numerical': 0.0017528483786152498, 'mean_word_length': 5.714705882352941, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '664120', 'license': 'MIT', 'n_tokens_mistral': 714, 'n_tokens_neox': 689, 'n_words': 219, 'path': 'examples/notebooks/Ex0-DCFS-Setup.ipynb', 'repo_name': 'mocnik/xcube-sh', 'size': '2282'}