Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Add operations compute_dataset() and compute_data_frame() #703

Closed
forman opened this issue Jul 12, 2018 · 0 comments · Fixed by #711
Closed

Add operations compute_dataset() and compute_data_frame() #703

forman opened this issue Jul 12, 2018 · 0 comments · Fixed by #711

Comments

@forman
Copy link
Member

forman commented Jul 12, 2018

Expected behavior

Cate uses two basic data models, Xarray's Dataset and Pandas' DataFrame (with its GeoPandas extension GeoDataFrame).

Both Xarray and Pandas provide extremely powerful APIs. Cate should provide two operations that would offer using these APIs in a generic way:

  1. compute_dataset(ds: Optional[xr.Dataset], script: str) -> xr.Dataset for gridded data
  2. compute_data_frame(df: Optional[pd.DataFrame], script: str) -> xr.DataFrame for feature attribute tables / vector data originating from CSV, Excel, Shapefiles, GeoJSON...

In both cases we execute a Python script where either a given ds: xr.Dataset or df: xr.DataFrame provides the namespace to be used in the script. In addition all current workspace resources are included in the namespace. The script is then used to compute new variables of type xr.DataArray or pd.DataSeries using the Xarray API and Pandas API which will be collected to compile a new xr.Dataset or xr.DataFrame respectively.

Actual behavior

We have a prototype computeop which will be renamed to compute_dataset. There is no compute_data_frame yet.

Specifications

Cate 1.0 - 2.0.dev15

@forman forman self-assigned this Jul 12, 2018
@forman forman changed the title Add generic compute_dataset and compute_data_frame operations Add operations compute_dataset() and compute_data_frame() Jul 12, 2018
forman added a commit that referenced this issue Jul 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant