Datasets:
docs: prominent download instructions
Browse files
README.md
CHANGED
|
@@ -72,9 +72,28 @@ negative = discharge.
|
|
| 72 |
Join keys: `cells.cell_id = tests.cell_id`, `tests.test_id = timeseries.test_id`,
|
| 73 |
`(tests.test_id, cycle_number) = cycle_summary.(test_id, cycle_number)`.
|
| 74 |
|
| 75 |
-
##
|
| 76 |
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
```sql
|
| 80 |
INSTALL httpfs; LOAD httpfs;
|
|
@@ -90,23 +109,20 @@ GROUP BY 1,2,3,4,5
|
|
| 90 |
ORDER BY t.test_id;
|
| 91 |
```
|
| 92 |
|
| 93 |
-
### pandas — predicate-pushdown read of one test
|
| 94 |
|
| 95 |
```python
|
| 96 |
import pandas as pd
|
| 97 |
-
|
| 98 |
df = pd.read_parquet(
|
| 99 |
"https://huggingface.co/datasets/mihnathul/celljar/resolve/main/timeseries.parquet",
|
| 100 |
filters=[("test_id", "==", "ORNL_LEAF_2013_HPPC_25C")],
|
| 101 |
)
|
| 102 |
-
print(df.head())
|
| 103 |
```
|
| 104 |
|
| 105 |
### `datasets` library — streaming
|
| 106 |
|
| 107 |
```python
|
| 108 |
from datasets import load_dataset
|
| 109 |
-
|
| 110 |
ds = load_dataset(
|
| 111 |
"parquet",
|
| 112 |
data_files="https://huggingface.co/datasets/mihnathul/celljar/resolve/main/timeseries.parquet",
|
|
@@ -117,15 +133,6 @@ for row in ds.take(5):
|
|
| 117 |
print(row)
|
| 118 |
```
|
| 119 |
|
| 120 |
-
### `huggingface_hub` — pull the whole bundle locally
|
| 121 |
-
|
| 122 |
-
```python
|
| 123 |
-
from huggingface_hub import snapshot_download
|
| 124 |
-
|
| 125 |
-
local = snapshot_download(repo_id="mihnathul/celljar", repo_type="dataset")
|
| 126 |
-
print(local) # contains cells/, tests/, timeseries.parquet
|
| 127 |
-
```
|
| 128 |
-
|
| 129 |
## License & citation
|
| 130 |
|
| 131 |
The science here belongs to the original authors; celljar simply puts their
|
|
|
|
| 72 |
Join keys: `cells.cell_id = tests.cell_id`, `tests.test_id = timeseries.test_id`,
|
| 73 |
`(tests.test_id, cycle_number) = cycle_summary.(test_id, cycle_number)`.
|
| 74 |
|
| 75 |
+
## Download the whole bundle
|
| 76 |
|
| 77 |
+
```bash
|
| 78 |
+
# CLI — pulls everything (cells/*.json, tests/*.json, timeseries.parquet, cycle_summary.parquet)
|
| 79 |
+
pip install huggingface_hub
|
| 80 |
+
huggingface-cli download mihnathul/celljar --repo-type dataset --local-dir ./celljar-bundle
|
| 81 |
+
|
| 82 |
+
# Pin a tagged release for reproducibility
|
| 83 |
+
huggingface-cli download mihnathul/celljar --repo-type dataset --revision v0.2.0 --local-dir ./celljar-bundle
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
Or in Python:
|
| 87 |
+
|
| 88 |
+
```python
|
| 89 |
+
from huggingface_hub import snapshot_download
|
| 90 |
+
local = snapshot_download(repo_id="mihnathul/celljar", repo_type="dataset", revision="v0.2.0")
|
| 91 |
+
print(local) # local path containing cells/, tests/, timeseries.parquet, cycle_summary.parquet
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## Query in place — no download needed
|
| 95 |
+
|
| 96 |
+
### DuckDB — full SQL across all entities over HTTPS
|
| 97 |
|
| 98 |
```sql
|
| 99 |
INSTALL httpfs; LOAD httpfs;
|
|
|
|
| 109 |
ORDER BY t.test_id;
|
| 110 |
```
|
| 111 |
|
| 112 |
+
### pandas / Polars — predicate-pushdown read of one test
|
| 113 |
|
| 114 |
```python
|
| 115 |
import pandas as pd
|
|
|
|
| 116 |
df = pd.read_parquet(
|
| 117 |
"https://huggingface.co/datasets/mihnathul/celljar/resolve/main/timeseries.parquet",
|
| 118 |
filters=[("test_id", "==", "ORNL_LEAF_2013_HPPC_25C")],
|
| 119 |
)
|
|
|
|
| 120 |
```
|
| 121 |
|
| 122 |
### `datasets` library — streaming
|
| 123 |
|
| 124 |
```python
|
| 125 |
from datasets import load_dataset
|
|
|
|
| 126 |
ds = load_dataset(
|
| 127 |
"parquet",
|
| 128 |
data_files="https://huggingface.co/datasets/mihnathul/celljar/resolve/main/timeseries.parquet",
|
|
|
|
| 133 |
print(row)
|
| 134 |
```
|
| 135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
## License & citation
|
| 137 |
|
| 138 |
The science here belongs to the original authors; celljar simply puts their
|