Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelog.d/nz-census-2023-weekly-rent.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Add Stats NZ 2023 Census weekly-rent packages for New Zealand, 16 regional
councils and Area Outside Region: 144 published household rent-band counts
and 18 published medians, each from its own guarded CSV row. Reuse the 18
unchanged, already published Place summaries artifacts and manifests; label
every dimension and value, retain confidentiality/status lineage, and pin
the table median rather than its duplicate quick statistic. Preserve other
years, percentages and Māori-ethnic-group sections without emitting them;
record unstated rent-population and regional-boundary definitions. The 18 members join the curated NZ bundle suite (`--suite nz`), which now has 66 packages.
18 changes: 18 additions & 0 deletions chronicle/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,24 @@
"stats-nz-census-2023-households-by-region-rc-17",
"stats-nz-census-2023-households-by-region-rc-18",
"stats-nz-census-2023-households-by-region-rc-99",
"stats-nz-census-2023-weekly-rent",
"stats-nz-census-2023-weekly-rent-rc-01",
"stats-nz-census-2023-weekly-rent-rc-02",
"stats-nz-census-2023-weekly-rent-rc-03",
"stats-nz-census-2023-weekly-rent-rc-04",
"stats-nz-census-2023-weekly-rent-rc-05",
"stats-nz-census-2023-weekly-rent-rc-06",
"stats-nz-census-2023-weekly-rent-rc-07",
"stats-nz-census-2023-weekly-rent-rc-08",
"stats-nz-census-2023-weekly-rent-rc-09",
"stats-nz-census-2023-weekly-rent-rc-12",
"stats-nz-census-2023-weekly-rent-rc-13",
"stats-nz-census-2023-weekly-rent-rc-14",
"stats-nz-census-2023-weekly-rent-rc-15",
"stats-nz-census-2023-weekly-rent-rc-16",
"stats-nz-census-2023-weekly-rent-rc-17",
"stats-nz-census-2023-weekly-rent-rc-18",
"stats-nz-census-2023-weekly-rent-rc-99",
"stats-nz-household-net-worth-2024",
"stats-nz-subnational-population-estimates-2025",
"treasury-an24-01-fiscal-totals",
Expand Down
54 changes: 54 additions & 0 deletions chronicle/source_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,60 @@
SOURCE_PACKAGE_RESOURCE_PACKAGE = "packages"
SOURCE_PACKAGE_SCHEMA_VERSION = schema_id("source_package")
SOURCE_PACKAGE_ALIASES = {
"stats-nz-census-2023-weekly-rent": Path(
"stats_nz/census_2023_weekly_rent"
),
"stats-nz-census-2023-weekly-rent-rc-01": Path(
"stats_nz/census_2023_weekly_rent/rc_01"
),
"stats-nz-census-2023-weekly-rent-rc-02": Path(
"stats_nz/census_2023_weekly_rent/rc_02"
),
"stats-nz-census-2023-weekly-rent-rc-03": Path(
"stats_nz/census_2023_weekly_rent/rc_03"
),
"stats-nz-census-2023-weekly-rent-rc-04": Path(
"stats_nz/census_2023_weekly_rent/rc_04"
),
"stats-nz-census-2023-weekly-rent-rc-05": Path(
"stats_nz/census_2023_weekly_rent/rc_05"
),
"stats-nz-census-2023-weekly-rent-rc-06": Path(
"stats_nz/census_2023_weekly_rent/rc_06"
),
"stats-nz-census-2023-weekly-rent-rc-07": Path(
"stats_nz/census_2023_weekly_rent/rc_07"
),
"stats-nz-census-2023-weekly-rent-rc-08": Path(
"stats_nz/census_2023_weekly_rent/rc_08"
),
"stats-nz-census-2023-weekly-rent-rc-09": Path(
"stats_nz/census_2023_weekly_rent/rc_09"
),
"stats-nz-census-2023-weekly-rent-rc-12": Path(
"stats_nz/census_2023_weekly_rent/rc_12"
),
"stats-nz-census-2023-weekly-rent-rc-13": Path(
"stats_nz/census_2023_weekly_rent/rc_13"
),
"stats-nz-census-2023-weekly-rent-rc-14": Path(
"stats_nz/census_2023_weekly_rent/rc_14"
),
"stats-nz-census-2023-weekly-rent-rc-15": Path(
"stats_nz/census_2023_weekly_rent/rc_15"
),
"stats-nz-census-2023-weekly-rent-rc-16": Path(
"stats_nz/census_2023_weekly_rent/rc_16"
),
"stats-nz-census-2023-weekly-rent-rc-17": Path(
"stats_nz/census_2023_weekly_rent/rc_17"
),
"stats-nz-census-2023-weekly-rent-rc-18": Path(
"stats_nz/census_2023_weekly_rent/rc_18"
),
"stats-nz-census-2023-weekly-rent-rc-99": Path(
"stats_nz/census_2023_weekly_rent/rc_99"
),
"stats-nz-household-net-worth-2024": Path("stats_nz/household_net_worth_2024"),
"stats-nz-census-2023-family-type": Path("stats_nz/census_2023_family_type"),
"stats-nz-census-2023-family-type-rc-01": Path(
Expand Down
1 change: 1 addition & 0 deletions docs/pe-nz-source-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ tests, and record a verified `raw/nz/...` R2 URI.
| `stats_nz/national_population_estimates_2025` | [ ] | [ ] | [ ] | **Blocked:** no original-vintage single-year-age artifact acquired. The 19 August 2025 release points to Infoshare, not an XLSX. Landing-page evidence only is hash-pinned in `raw/nz`; it emits zero facts. [Evidence and access notes](pe-nz-population-source-notes.md). |
| `stats_nz/census_2023_households_by_region` | [x] | [ ] | [x] | **Partial:** B5: 216 published 2023 Census counts, 12 per place (NZ, 16 regional councils and separate Area Outside Region): households, three tenure categories and eight usual-resident household sizes. Requested household composition and social-renting split are absent from this product. #176 named the S2 ArcGIS hub regional-council layer as the source; the published ArcGIS household and family layers are SA1/SA2 only, so regional household composition needs the Aotearoa Data Explorer (`CEN23_FHH_038`, API key or manual export) and stays open. Package-completion box stays unchecked until then. National root plus per-place members share the 18 unchanged receipt-pinned CSVs with the family package; the hub published the 18 objects to their `raw/nz/stats_nz/...` keys and verified each by SHA-256 on 2026-10-10. [Scope and evidence](../packages/stats_nz/census_2023_households_by_region/README.md). |
| `stats_nz/census_2023_family_type` | [x] | [x] | [x] | B5: 72 published 2023 Census counts, four per place for the same 18 places: families and the three exact family-type labels. Two requested package IDs retained as family roots with per-place members; shared artifacts committed once. Other years, percentages and Māori sections preserved but not emitted; the hub published the 18 objects to their `raw/nz/stats_nz/...` keys and verified each by SHA-256 on 2026-10-10. [Scope](../packages/stats_nz/census_2023_family_type/README.md) and [evidence](../packages/stats_nz/census_2023_households_by_region/evidence.md). |
| `stats_nz/census_2023_weekly_rent` | [x] | [x] | [x] [18 existing objects](../packages/stats_nz/census_2023_weekly_rent/evidence.md#existing-published-objects) | G8-d1: 162 published 2023 Census facts, nine per place for NZ, 16 regional councils and separate Area Outside Region: eight exact household weekly-rent bands and one directly published median in NZD per week. National root and 17 per-place members reuse the same unchanged CSVs and manifests as B5; table median selected by row identity, duplicate quick statistic excluded. Other years, percentages and Māori sections preserved but not emitted; rent population definition and regional boundary vintage unstated. The hub published and SHA-256 verified these existing objects on 2026-10-10. [Scope and evidence](../packages/stats_nz/census_2023_weekly_rent/README.md). |
| `stats_nz/census_2023_ethnicity_age_region` | [ ] | [ ] | [ ] | |
| `ird/taxable_income_distribution_2025` | [x] | [x] | [x] | I1, TY2024 (September 2025 release): 3,522 administrative facts; full national income bands, age marginals, and Tab 4 age × band counts. Raw workbook published to its `raw/nz/ird/...` key and verified by SHA-256 on 2026-10-07. |
| `ird/wage_salary_distribution_2026` | [x] | [x] | [x] | I2, TY2026 (2026 release): 510 administrative facts; national wage/salary bands and decile/percentile income and upper-boundary cut-points. Raw workbook published to its `raw/nz/ird/...` key and verified by SHA-256 on 2026-10-10. [Cell evidence](../packages/ird/wage_salary_distribution_2026/evidence.md). |
Expand Down
96 changes: 96 additions & 0 deletions packages/stats_nz/census_2023_weekly_rent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Stats NZ 2023 Census weekly rent by regional council

This package family emits 162 published facts from Stats NZ's
[Place summaries tool](https://tools.summaries.stats.govt.nz/): eight household
rent-band counts and one published median for New Zealand, each of the 16
regional councils, and the separately published `Area Outside Region`
(code `99`). Every fact reads one CSV row. No rent-band total is emitted.

The national root is `stats_nz/census_2023_weekly_rent`, with alias
`stats-nz-census-2023-weekly-rent`; its 17 `rc_XX/source_package.yaml` children
use aliases ending in `-rc-XX`. They reference the same 18 unchanged files
and per-place manifests as the
[household](../census_2023_households_by_region/README.md) and
[family-type](../census_2023_family_type/README.md) families in
`db/data/stats_nz/census_2023_place_summaries/`. No CSV or manifest is copied,
renamed, rewritten, or added. Their binary Git attributes preserve the exact
publisher CRLF bytes.

## Scope and source semantics

Each selection requires `period = 2023`, `duration = Census`, the place's
published code and descriptor, and the exact section and row identity:

| Section | Published categories | Value type | Facts per place |
| --- | --- | --- | ---: |
| Weekly rent paid by households | Under $200; $200 - $299; $300 - $399; $400 - $499; $500 - $599; $600 - $699; $700 - $799; $800 and over | Count | 8 |
| Median weekly rent paid by households | The table row with empty `section_type` | Median | 1 |

Band facts use a household count measure, unit `count`, and scale 1. The
median has its own `median` measure, unit `nzd_per_week`, scale 1, and
`aggregation: median`. It reads the published value rather than deriving a
median, mean, or band midpoint. The median section appears twice in every
file: the `Quick stats` row on physical CSV line 13 and the table row on
line 1763. The package selects only line 1763 by its row identity, including
empty `section_type`. Selecting the table occurrence follows the existing
families' treatment of duplicated quick statistics and keeps its table-row
provenance next to the rent bands. Equal values do not make the two row
identities interchangeable.

The population definition is **not stated in the product**: the committed
CSVs contain no note establishing whether these rows cover rented occupied
private dwellings with a stated rent. That qualification is therefore not
asserted. The dollar basis is weekly rent in New Zealand dollars at the
census date, as specified by the hub. The CSV supports the weekly basis in
the section title and labels the median `dollars`; it does not spell out the
currency name or a separate dollar-basis note.

The reference date is census night, **7 March 2023**, as specified by the
hub and recorded in coverage. The files themselves state `2023` and
`Census`, without printing the exact night. The regional boundary vintage
is unstated. Geography keys follow the existing Census families, including
`region:99` for `Area Outside Region`; it is never assigned to another
region. Auckland's consumer geography name is `Auckland`, while its source
row retains the exact descriptor `Auckland Region`.

New Zealand rows come from the national file. They are never reconstructed
from regional values, and the eight bands are never summed into another
fact. Published band labels retain their exact spelling and spacing,
including `$200 - $299`. Every emitted dimension and dimension value carries
a label. The complete source files retain `Percent` rows, 2013 and 2018
periods, sections `for the Māori ethnic group`, the duplicate quick-stat
median, and unrelated sections; none emits a fact in this family.

All 162 selected rows have empty `confidentiality_indicator`,
`confidentiality_label`, `final_indicator`, and `final_label`. Those fields
travel in the full source-row lineage. Selection requires them to be empty,
so a flagged row cannot become a numeric fact even if its value contains
numeric text. No rounding-method note is stated in the files, and blank
status fields are not treated as a declaration of revision-final status.

The parser preserves each complete 2,030-row CSV as source rows, then builds
compact selected cells under the Chronicle virtual sheet
`place_summaries_<nz|rc_XX>_weekly_rent`. These names are not publisher
worksheets. Their family suffix avoids cell-key collisions with the
household and family packages' different selected-row orders. Each selected
cell retains its original physical line number and source-row key.

See [publisher evidence](evidence.md) for exact cells and the already
published raw objects. No aging, interpolation, shares, reconciliation,
imputation, or consumer target construction is performed.

## Bounded validation

The targeted regression file is
`tests/test_chronicle_nz_census_weekly_rent.py`. It declares the expected
place, section, category and row identities independently of package YAML,
checks the exact New Zealand and Auckland cells, and rejects percentage,
historical-year, wrong-region, Māori-section, duplicate-median and adjacent
band-label substitutions. Package validation and single-source suites cover
all 18 members. Full bundle construction remains a CI check.

The shared raw objects were published and verified by the hub on
2026-10-10; this offline lane checked local hashes and sizes against all 18
existing manifests without network access. Licence: `CC BY 4.0`, with
attribution to Stats NZ. The required `ledger-source-fidelity` and
`ledger-boundary` judge reviews remain merge gates.
Loading
Loading