How do I …

access data

How do I ... Use API Comments
get a data store instance new_data_store(store_id, **data_store_params) Supported store_id can be found in the section Available data store;
data_store_params can be extracted for a specific store_id, shown in the next row.
get the data store parameters get_data_store_params_schema(store_id)
list available data stores list_data_store_ids() This function lists all data stores available in the environment;
note that xcube data store plugins will be automatically recognized when installed.
get a data store for local filesystem new_data_store("file", **data_store_params) Further documentation; example notebook 1_getting_started.ipynb
get a data store for S3 filesystem new_data_store("s3", **data_store_params) Further documentation; example notebook 1_getting_started.ipynb
list the datasets in a data store store.list_data_ids()
open a dataset from a data store store.open_data(data_id, **open_params) open_params can be extracted from the store, shown in the next row.
get the parameters for
opening a dataset
store.get_open_data_params_schema()

get a data store xcube plug-in

How do I ... Use API Comments
get a data store for Sentinel Hub new_data_store("sentinelhub", **data_store_params) Further documentation; example notebook 2_sentinel_hub.ipynb
get a data store for ESA Climate Data Centre new_data_store("cciodp", **data_store_params) Further documentation; example notebook 3_esa_climate_change_initiative.ipynb
get a data store for ESA Climate Data Centre (Zarr format) new_data_store("ccizarr", **data_store_params) Further documentation; example notebook 3_esa_climate_change_initiative.ipynb
get a data store for ESA SMOS new_data_store("smos", **data_store_params) Further documentation; example notebook demo-store.ipynb
get a data store for Copernicus Climate Data Store new_data_store("cds", **data_store_params) Further documentation; example notebook 4_c3s_climate_data_store.ipynb
get a data store for Copernicus Marine Service new_data_store("cmems", **data_store_params) Further documentation; example notebook 7_cmems_data_store.ipynb
get a data store for data organized by
a SpatioTemporal Asset Catalog (STAC) (under development)
new_data_store("stac", **data_store_params)

process data

How do I ... Use API Comments
spatially resample a datacube resample_in_space(ds, ref_ds=ref_ds, ...) Example notebook resample_in_space.ipynb
temporarily resample a datacube resample_in_time(ds, frequency, method, ...) Example notebook nns_chl_analysis.ipynb
rectify a dataset in satellite projection rectify_dataset(ds, ref_ds=ref_ds, ...) Example notebook rectify_dataset.ipynb
spatially subset a dataset for a given geometry clip_dataset_by_geometry(ds, geometry, ...) Example notebook make_subset_cube.ipynb
spatially mask a dataset for a given geometry mask_dataset_by_geometry(ds, geometry, ...) Example notebook rasterize_features.ipynb

publish and visualize xcube datasets

How do I ... Use CLI/API Comments
run the xcube server from the CLI xcube serve --verbose -c config.yml An example can be found in the xcube github;
a detailed documentation on xcube serve can be found here and here.
open the xcube viewer web-application xcube serve --open-viewer Detailed documentation on xcube Viewer can be found here.
start the xcube viewer via Python API
in Jupyter Notebooks
viewer = Viewer()
viewer.add_dataset(ds)
viewer.show()
An example can be found in the notebook xcube-viewer-in-jl.ipynb;
detailed documentation on xcube Viewer can be found here.