Skip to content

Commit d6f93ea

Browse files
authored
Merge pull request #5 from rebase-energy/slim
Make name required; drop labels/location; unexport TimeSeriesTable; add validate_unit
2 parents 8efc534 + ec34efe commit d6f93ea

24 files changed

Lines changed: 1368 additions & 5150 deletions

README.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<br/>
1515

16-
**TimeDataModel** is a metadata-rich container for time series data. It lets you carry your data *and* its context — name, unit, frequency, timezone, location — as a single, self-describing object, fully interoperable with pandas, NumPy, Polars, and PyArrow.
16+
**TimeDataModel** is a metadata-rich container for time series data. It lets you carry your data *and* its context — name, unit, frequency, timezone — as a single, self-describing object, fully interoperable with pandas, NumPy, Polars, and PyArrow.
1717

1818
**⬇️ [Installation](#installation)**
1919
&ensp;|&ensp;
@@ -28,7 +28,7 @@
2828
| Class | Description |
2929
| :---- | :---------- |
3030
| 📈&nbsp;`TimeSeries` | Univariate time series supporting four temporal shapes |
31-
| 📊&nbsp;`TimeSeriesTable` | Multivariate time series — multiple named columns sharing the same `valid_time` index |
31+
| 📋&nbsp;`TimeSeriesDescriptor` | Frozen, data-free metadata descriptor — register a series structure before any data exists |
3232
| 🔷&nbsp;`DataShape` | Enum that selects which timestamp columns are present: `SIMPLE`, `VERSIONED`, `CORRECTED`, or `AUDIT` |
3333
| ⏱️&nbsp;`Frequency` | ISO 8601 duration-based frequencies (`PT1H`, `P1D`, `P1M`, …) |
3434
| 🏷️&nbsp;`DataType` | Hierarchical taxonomy: `ACTUAL``OBSERVATION`, `DERIVED`; `CALCULATED``FORECAST`, `SIMULATION`, … |
@@ -54,7 +54,7 @@ data to fully bi-temporal audit trails:
5454

5555
```python
5656
import pandas as pd
57-
from timedatamodel import TimeSeries, TimeSeriesTable, Frequency
57+
from timedatamodel import TimeSeries, Frequency
5858

5959
# --- Univariate series from a pandas DataFrame ---
6060
df = pd.DataFrame({
@@ -92,21 +92,19 @@ df_pl = ts.to_polars() # pl.DataFrame
9292
cols = ts.to_list() # dict[str, list] — column-oriented
9393
arr = ts.to_numpy() # dict[str, np.ndarray] — column-oriented (requires numpy)
9494
tbl = ts.to_pyarrow() # pa.Table (requires pyarrow)
95-
96-
# --- Multivariate table — see examples/nb_02_timeseriestable.ipynb ---
9795
```
9896

9997
---
10098

10199
## ✨ Key Features
102100

103101
- 🔷 **Four data shapes** — from `SIMPLE` point-in-time to `AUDIT` full bi-temporal history;
104-
- 🏷️ **Rich metadata** — name, unit, frequency, timezone, data type, location, labels, description on every series;
105-
- 📊 **Multivariate tables**`TimeSeriesTable` groups co-indexed series with per-column metadata;
102+
- 🏷️ **Metadata** — name, unit, frequency, timezone, data type, description on every series;
103+
- 📋 **Descriptor**`TimeSeriesDescriptor` carries the same metadata without a DataFrame, for catalog/registration use;
106104
- 🔄 **Format conversions**`to_pandas`, `to_polars`, `to_list`, `to_numpy`, `to_pyarrow` with lazy optional-dependency checks;
107105
- 📊 **Coverage bar**`coverage_bar()` renders null coverage as a binned SVG in Jupyter or Unicode blocks in terminal;
108-
- 🗺️ **Geospatial**attach locations, filter by radius or area, find nearest columns;
109-
- 📏 **Units** — optional [pint](https://pint.readthedocs.io/) integration for dimensional unit conversion;
106+
- 🗺️ **Geospatial primitives**`GeoLocation` and `GeoArea` for use by consumer layers;
107+
- 📏 **Units** — optional [pint](https://pint.readthedocs.io/) integration for dimensional unit conversion and validation;
110108
-**Polars-powered** — backed by the Polars compute engine for high-performance in-memory processing;
111109
- 🐍 **Type-safe** — full type hints with PEP 561 support.
112110

@@ -136,15 +134,6 @@ pip install -e .[dev]
136134

137135
---
138136

139-
## 📓 Examples
140-
141-
| # | Notebook | Topic |
142-
| :--- | :--- | :--- |
143-
| 01 | [TimeSeries](examples/nb_01_timeseries.ipynb) | Creating, inspecting, and operating on univariate time series |
144-
| 02 | [TimeSeriesTable](examples/nb_02_timeseriestable.ipynb) | Multivariate tables with per-column metadata and spatial filtering |
145-
146-
---
147-
148137
## 🤝 Contributing
149138

150139
Contributions are welcome! Here are some ways to contribute to **TimeDataModel**:

docs/api.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
:show-inheritance:
1717
```
1818

19-
## TimeSeriesTable
20-
21-
```{eval-rst}
22-
.. autoclass:: timedatamodel.TimeSeriesTable
23-
:members:
24-
:show-inheritance:
25-
```
26-
2719
## DataShape
2820

2921
```{eval-rst}

docs/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ def setup(app) -> None:
7272
# TimeSeries internals
7373
"_clone",
7474
"_validate_table",
75-
# TimeSeriesTable internals
76-
"_clone_df",
7775
]),
7876
}
7977

docs/examples/index.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# Examples
22

3-
Step-by-step guides that walk you through the features of timedatamodel.
4-
Each example is a Jupyter notebook that you can download and run interactively.
5-
6-
```{toctree}
7-
:maxdepth: 1
8-
9-
timeseries
10-
timeseriestable
11-
```
3+
Notebook examples are being rewritten. In the meantime, see the
4+
[Quick Start](../usage.md) page and the [Overview](../overview.md) for
5+
runnable snippets.

0 commit comments

Comments
 (0)