readabs 0.2.0__tar.gz → 0.2.2__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.
Files changed (51) hide show
  1. {readabs-0.2.0 → readabs-0.2.2}/CHANGELOG.md +23 -0
  2. {readabs-0.2.0 → readabs-0.2.2}/PKG-INFO +28 -12
  3. {readabs-0.2.0 → readabs-0.2.2}/README.md +27 -11
  4. readabs-0.2.2/docs/readabs/splice.html +1283 -0
  5. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs.html +499 -48
  6. readabs-0.2.2/docs/search.js +46 -0
  7. {readabs-0.2.0 → readabs-0.2.2}/pyproject.toml +1 -1
  8. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/splice.py +134 -51
  9. {readabs-0.2.0 → readabs-0.2.2}/uv.lock +1 -1
  10. readabs-0.2.0/docs/search.js +0 -46
  11. {readabs-0.2.0 → readabs-0.2.2}/.gitignore +0 -0
  12. {readabs-0.2.0 → readabs-0.2.2}/.pylintrc +0 -0
  13. {readabs-0.2.0 → readabs-0.2.2}/.python-version +0 -0
  14. {readabs-0.2.0 → readabs-0.2.2}/LICENSE +0 -0
  15. {readabs-0.2.0 → readabs-0.2.2}/build-all.sh +0 -0
  16. {readabs-0.2.0 → readabs-0.2.2}/build-docs.sh +0 -0
  17. {readabs-0.2.0 → readabs-0.2.2}/docs/index.html +0 -0
  18. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/abs_catalogue.html +0 -0
  19. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/grab_abs_url.html +0 -0
  20. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/print_abs_catalogue.html +0 -0
  21. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/rba_catalogue.html +0 -0
  22. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/read_abs_by_desc.html +0 -0
  23. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/read_abs_cat.html +0 -0
  24. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/read_abs_series.html +0 -0
  25. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/read_rba_table.html +0 -0
  26. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/recalibrate.html +0 -0
  27. {readabs-0.2.0 → readabs-0.2.2}/docs/readabs/search_abs_meta.html +0 -0
  28. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/.test-data/Qrtly-CPI-Time-series-spreadsheets-all.zip +0 -0
  29. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/__init__.py +0 -0
  30. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/abs_catalogue.py +0 -0
  31. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/abs_meta_data.py +0 -0
  32. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/datatype.py +0 -0
  33. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/download_cache.py +0 -0
  34. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/get_abs_links.py +0 -0
  35. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/grab_abs_url.py +0 -0
  36. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/lint-all.sh +0 -0
  37. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/print_abs_catalogue.py +0 -0
  38. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/py.typed +0 -0
  39. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/rba_catalogue.py +0 -0
  40. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/rba_meta_data.py +0 -0
  41. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/read_abs_by_desc.py +0 -0
  42. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/read_abs_cat.py +0 -0
  43. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/read_abs_series.py +0 -0
  44. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/read_rba_table.py +0 -0
  45. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/read_support.py +0 -0
  46. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/recalibrate.py +0 -0
  47. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/search_abs_meta.py +0 -0
  48. {readabs-0.2.0 → readabs-0.2.2}/src/readabs/utilities.py +0 -0
  49. {readabs-0.2.0 → readabs-0.2.2}/test/test.py +0 -0
  50. {readabs-0.2.0 → readabs-0.2.2}/test/test_url_retrieval.py +0 -0
  51. {readabs-0.2.0 → readabs-0.2.2}/uv-upgrade.sh +0 -0
@@ -1,3 +1,26 @@
1
+ Version 0.2.2 released 04-Jun-2026 (Canberra Australia)
2
+
3
+ - A *selector* (in `select_one()`, `select()` and `select_and_splice()` sources)
4
+ can now be a bare ABS Series ID string (e.g. `"A2325846C"`) as well as the
5
+ `{search_value: meta_column}` dict form. A string is matched exactly against
6
+ the metadata's Series ID column via the same `find_abs_id` machinery (so the
7
+ cross-table de-duplication and uniqueness guarantees are unchanged), and an
8
+ unknown ID raises. The two forms mix freely across sources.
9
+
10
+ ---
11
+
12
+ Version 0.2.1 released 03-Jun-2026 (Canberra Australia)
13
+
14
+ - `splice()` and `select_and_splice()` now default to `rebase=False` — segments
15
+ coalesce at their raw levels and nothing is rescaled unless you opt in with
16
+ `rebase=True`. Rebasing is only valid for ratio-scale (index-like) series, so
17
+ splicing index series across a reference-period change (e.g. CPI) now needs an
18
+ explicit `rebase=True`.
19
+ - `splice()` now raises on a non-finite or non-positive rebase factor instead of
20
+ producing a sign-flipped or exploded back-history.
21
+
22
+ ---
23
+
1
24
  Version 0.2.0 released 03-Jun-2026 (Canberra Australia)
2
25
 
3
26
  - Added a series-splicing toolkit for joining mixed-frequency and multi-vintage
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: readabs
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Get ABS timeseries data in pandas DataFrames
5
5
  Project-URL: Repository, https://github.com/bpalmer4/readabs
6
6
  Project-URL: Homepage, https://github.com/bpalmer4/readabs
@@ -202,11 +202,14 @@ scaled_data, new_units = ra.recalibrate(data, "Number")
202
202
  Many ABS concepts are spread across frequencies and releases — e.g. a *monthly*
203
203
  CPI that only reaches back to 2017, a *quarterly* one back to 1948, and a
204
204
  discontinued monthly indicator covering the gap between. `splice` joins such
205
- segments into one continuous series, **highest priority first**: it rebases
206
- segments whose levels differ (e.g. an index reference-period change), prefers the
207
- higher-priority value where periods overlap, and leaves honest gaps where no
208
- source has data (no interpolation, nothing invented). A join report records every
209
- rebase factor and overlap so a splice can be audited rather than trusted blindly.
205
+ segments into one continuous series, **highest priority first**: it prefers the
206
+ higher-priority value where periods overlap and leaves honest gaps where no
207
+ source has data (no interpolation, nothing invented). Pass `rebase=True` to
208
+ *multiplicatively* rescale segments whose levels differ (e.g. an index
209
+ reference-period change) onto the running result it is off by default, because
210
+ rebasing transforms your data and is only valid for ratio-scale (index-like)
211
+ series. A join report records every rebase factor and overlap so a splice can be
212
+ audited rather than trusted blindly.
210
213
 
211
214
  Four composable functions:
212
215
 
@@ -217,16 +220,26 @@ Four composable functions:
217
220
  | `splice(segments)` | Splice an iterable of series, highest priority first → `(series, report)` |
218
221
  | `select_and_splice(sources)` | `select` then `splice` for the no-transform case; checks units → `(series, unit, report)` |
219
222
 
220
- A *selector* is the `{search_value: column}` form used by `find_abs_id` (with
221
- `validate_unique=True`, so it de-duplicates on Series ID and raises on genuine
222
- ambiguity rather than guessing).
223
+ A *selector* is either the `{search_value: column}` form used by `find_abs_id`
224
+ (with `validate_unique=True`, so it de-duplicates on Series ID and raises on
225
+ genuine ambiguity rather than guessing), **or a bare ABS Series ID string**
226
+ (e.g. `"A2325846C"`, matched exactly) for when you already know precisely which
227
+ series you want. The two forms mix freely across sources:
228
+
229
+ ```python
230
+ series, unit, report = ra.select_and_splice([
231
+ (cur, cmeta, base | {"Month": mc.freq}), # by description
232
+ (cur, cmeta, "A2325846C"), # by Series ID (quarterly All groups CPI)
233
+ ], rebase=True)
234
+ ```
223
235
 
224
236
  By default `select` **raises if the selected series carry different ABS units** —
225
237
  coherence is required to splice. Pass `require_same_units=False` to select
226
238
  different-unit series on purpose (as the unemployment example below does).
227
239
 
228
- **No transform — splice raw levels** (headline CPI index: new monthly over the
229
- discontinued indicator over the long quarterly):
240
+ **No per-series transform — splice index levels with `rebase=True`** (headline
241
+ CPI index: new monthly over the discontinued indicator over the long quarterly,
242
+ rescaled across reference-period changes):
230
243
 
231
244
  ```python
232
245
  cur, cmeta = ra.read_abs_cat("6401.0") # monthly + long quarterly
@@ -240,11 +253,14 @@ series, unit, report = ra.select_and_splice(
240
253
  (cur, cmeta, base | {"Quarter": mc.freq}), # quarterly back to 1948
241
254
  ],
242
255
  output="M",
256
+ rebase=True, # index reference-period change -> rescale onto the running result
243
257
  )
244
258
  ```
245
259
 
246
260
  The shared `base` selector resolves the same concept in all three sources; only
247
- the frequency override changes.
261
+ the frequency override changes. `rebase=True` is needed because these index
262
+ segments sit on different reference periods — for series that already share a
263
+ level (or aren't ratio-scale), leave it off.
248
264
 
249
265
  **With a transform — select, transform each, then splice** (year-ended inflation:
250
266
  a Y/Y change is base-invariant, so compute it per source and splice the *rates*
@@ -180,11 +180,14 @@ scaled_data, new_units = ra.recalibrate(data, "Number")
180
180
  Many ABS concepts are spread across frequencies and releases — e.g. a *monthly*
181
181
  CPI that only reaches back to 2017, a *quarterly* one back to 1948, and a
182
182
  discontinued monthly indicator covering the gap between. `splice` joins such
183
- segments into one continuous series, **highest priority first**: it rebases
184
- segments whose levels differ (e.g. an index reference-period change), prefers the
185
- higher-priority value where periods overlap, and leaves honest gaps where no
186
- source has data (no interpolation, nothing invented). A join report records every
187
- rebase factor and overlap so a splice can be audited rather than trusted blindly.
183
+ segments into one continuous series, **highest priority first**: it prefers the
184
+ higher-priority value where periods overlap and leaves honest gaps where no
185
+ source has data (no interpolation, nothing invented). Pass `rebase=True` to
186
+ *multiplicatively* rescale segments whose levels differ (e.g. an index
187
+ reference-period change) onto the running result it is off by default, because
188
+ rebasing transforms your data and is only valid for ratio-scale (index-like)
189
+ series. A join report records every rebase factor and overlap so a splice can be
190
+ audited rather than trusted blindly.
188
191
 
189
192
  Four composable functions:
190
193
 
@@ -195,16 +198,26 @@ Four composable functions:
195
198
  | `splice(segments)` | Splice an iterable of series, highest priority first → `(series, report)` |
196
199
  | `select_and_splice(sources)` | `select` then `splice` for the no-transform case; checks units → `(series, unit, report)` |
197
200
 
198
- A *selector* is the `{search_value: column}` form used by `find_abs_id` (with
199
- `validate_unique=True`, so it de-duplicates on Series ID and raises on genuine
200
- ambiguity rather than guessing).
201
+ A *selector* is either the `{search_value: column}` form used by `find_abs_id`
202
+ (with `validate_unique=True`, so it de-duplicates on Series ID and raises on
203
+ genuine ambiguity rather than guessing), **or a bare ABS Series ID string**
204
+ (e.g. `"A2325846C"`, matched exactly) for when you already know precisely which
205
+ series you want. The two forms mix freely across sources:
206
+
207
+ ```python
208
+ series, unit, report = ra.select_and_splice([
209
+ (cur, cmeta, base | {"Month": mc.freq}), # by description
210
+ (cur, cmeta, "A2325846C"), # by Series ID (quarterly All groups CPI)
211
+ ], rebase=True)
212
+ ```
201
213
 
202
214
  By default `select` **raises if the selected series carry different ABS units** —
203
215
  coherence is required to splice. Pass `require_same_units=False` to select
204
216
  different-unit series on purpose (as the unemployment example below does).
205
217
 
206
- **No transform — splice raw levels** (headline CPI index: new monthly over the
207
- discontinued indicator over the long quarterly):
218
+ **No per-series transform — splice index levels with `rebase=True`** (headline
219
+ CPI index: new monthly over the discontinued indicator over the long quarterly,
220
+ rescaled across reference-period changes):
208
221
 
209
222
  ```python
210
223
  cur, cmeta = ra.read_abs_cat("6401.0") # monthly + long quarterly
@@ -218,11 +231,14 @@ series, unit, report = ra.select_and_splice(
218
231
  (cur, cmeta, base | {"Quarter": mc.freq}), # quarterly back to 1948
219
232
  ],
220
233
  output="M",
234
+ rebase=True, # index reference-period change -> rescale onto the running result
221
235
  )
222
236
  ```
223
237
 
224
238
  The shared `base` selector resolves the same concept in all three sources; only
225
- the frequency override changes.
239
+ the frequency override changes. `rebase=True` is needed because these index
240
+ segments sit on different reference periods — for series that already share a
241
+ level (or aren't ratio-scale), leave it off.
226
242
 
227
243
  **With a transform — select, transform each, then splice** (year-ended inflation:
228
244
  a Y/Y change is base-invariant, so compute it per source and splice the *rates*