cecil 0.0.27__tar.gz → 0.0.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cecil-0.0.27 → cecil-0.0.28}/PKG-INFO +1 -1
- {cecil-0.0.27 → cecil-0.0.28}/src/cecil/client.py +7 -18
- {cecil-0.0.27 → cecil-0.0.28}/src/cecil/models.py +5 -0
- cecil-0.0.28/src/cecil/version.py +1 -0
- cecil-0.0.27/src/cecil/version.py +0 -1
- {cecil-0.0.27 → cecil-0.0.28}/.editorconfig +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/.gitignore +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/CONTRIBUTING.md +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/LICENSE.txt +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/Makefile +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/README.md +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/pyproject.toml +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/src/cecil/__init__.py +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/src/cecil/errors.py +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/src/cecil/xarray.py +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/tests/__init__.py +0 -0
- {cecil-0.0.27 → cecil-0.0.28}/tests/test_client.py +0 -0
|
@@ -36,6 +36,7 @@ from .models import (
|
|
|
36
36
|
User,
|
|
37
37
|
UserCreate,
|
|
38
38
|
DataRequestMetadata,
|
|
39
|
+
DataRequestParquetFiles,
|
|
39
40
|
)
|
|
40
41
|
from .version import __version__
|
|
41
42
|
from .xarray import load_xarray
|
|
@@ -90,24 +91,12 @@ class Client:
|
|
|
90
91
|
return load_xarray(metadata)
|
|
91
92
|
|
|
92
93
|
def load_dataframe(self, data_request_id: str) -> pd.DataFrame:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"f30f2125-c472-43c7-85c8-52f0d4b1d160": "data_request_db.ibat.redlist",
|
|
100
|
-
"c1ee0d62-95ef-49b1-adf1-6a5a933d726d": "data_request_db.ibat.wdpa",
|
|
101
|
-
}[data_request.dataset_id]
|
|
102
|
-
except KeyError:
|
|
103
|
-
raise Error(
|
|
104
|
-
"method not allowed",
|
|
105
|
-
{"message": "load_dataframe() is not supported for raster datasets."},
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
return self._query(
|
|
109
|
-
f"select * from {secure_view} where data_request_id = '{data_request_id}'"
|
|
110
|
-
)
|
|
94
|
+
res = self._get(url=f"/v0/data-requests/{data_request_id}/parquet-files")
|
|
95
|
+
metadata = DataRequestParquetFiles(**res)
|
|
96
|
+
df = pd.concat((pd.read_parquet(f) for f in metadata.files))
|
|
97
|
+
return df[
|
|
98
|
+
[col for col in df.columns if col not in ("organisation_id", "created_at")]
|
|
99
|
+
]
|
|
111
100
|
|
|
112
101
|
def create_transformation(
|
|
113
102
|
self, data_request_id: str, crs: str, spatial_resolution: float
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.28"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.27"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|