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
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. |