Scottish private-rent targets: PIPR is BRMA-grain, so council cells cannot bind by translation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the ons.rent.private_rent target, the CrossGrainBridge abstraction, and AREA_TYPES to understand the current grain and boundary-frame rules. Read the parity register and the proposed overlap resource and rebuild-tool requirements before choosing between BRMA-grain rows and a signed exception. Done means the overlap is committed with tests, the deferral reason records that translation is invalid, and no unsupported council targets are bound.
Written by the indexing model from the issue text.
Description
The gap
ONS's Price Index of Private Rents (PIPR) publishes Scottish rent levels for the 18 Broad Rental Market Areas (codes S33000001–S33000018), not for the 32 council areas. Microcosm's ons.rent.private_rent target is bound at local-authority grain, so all 32 Scottish cells are signed deferred (private_rent_pipr_scotland_brma_grain), and the parity register routes the concern cross_grain_private_rent_scotland_brma. Its fence says to keep the cells deferred "until a source-backed BRMA-to-LA bridge with an explicit aggregation rule exists". #736 lists this gap with no issue of its own.
A census crosswalk now exists (built for PolicyEngine/policyengine-uk-data#516 and #1087), so the question is whether a rule such as "household-weighted mean of BRMA rents per council" can lift the deferral.
What the overlap looks like
Built from Scotland's Census 2022 and the official BRMA geography (2022 output-area centroids in the Scottish Government's BRMA polygons, corrected by Rent Service Scotland's postcode lookup, FOI 202300368850):
- 63 BRMA × council intersections hold 322,995 private-rented households.
- 18 of the 32 councils fall in more than one BRMA, and 16 of the 18 BRMAs cover more than one council.
- 29 councils and 17 BRMAs form one connected block; the three Ayrshire councils and the Ayrshires BRMA are the only group that separates. No finer grouping makes BRMAs a union of whole councils. Much of the joining is slivers: dropping intersections under 1% of both sides leaves 11 blocks, one of which still holds five BRMAs and seven councils.
- Four councils are the same place as one BRMA to within 1% of private-rented households in both directions: Dumfries and Galloway, Fife, West Lothian and Scottish Borders.
What the weighted-mean rule would get wrong
For a council that sits inside one BRMA, the rule returns that BRMA's mean unchanged, so every council sharing a BRMA gets the same rent. Rent Service Scotland's market evidence for the year to September 2021 (FOI 202200303624: 31,833 lettings with BRMA, rent and postcode district) shows how far that is from the councils' own rents:
| Council | BRMA | Rule ÷ council's own mean |
|---|---|---|
| Midlothian | Lothian | +30.9% |
| Clackmannanshire | Forth Valley | +26.8% |
| East Lothian | Lothian | +23.1% |
| Falkirk | Forth Valley | +20.5% |
| Stirling | Forth Valley | −15.2% |
| Orkney Islands | Highland and Islands | +13.6% |
| Na h-Eileanan Siar | Highland and Islands | +13.3% |
| East Renfrewshire | Greater Glasgow / Renfrewshire and Inverclyde | −12.5% |
| Angus | Dundee and Angus | +11.1% |
Across the 31 councils with at least 30 records, the median absolute gap is 3.3%, 12 exceed 5% and 9 exceed 10%. The four coincident councils are within 0.1%.
Proposed outcome
- Commit the overlap as a source-backed resource with a rebuild tool and tests.
- Record that no rule turning BRMA rents into council targets satisfies the fence: any such rule gives a council a value that only BRMA averages determine, which is the allocation the fence forbids.
CrossGrainBridgecannot carry it either: it equates additive totals over a partition of legs, and a mean over overlapping geographies is neither. - Keep the 32 cells deferred, with the reason updated: the crosswalk exists; the missing piece is a target grain, not a translation.
Routes left open
- BRMA-grain target rows. Keep PIPR's geography on the target side (12 × BRMA mean × BRMA private renters) and aggregate the model side with the overlap shares. This uses all 18 published rents and allocates nothing, but
AREA_TYPESis("constituency", "la"), so it needs a new area type through the rowwise surface. - A signed exception for the four coincident councils. Their BRMA rent is their own rent to within about 2% in the worst case. Binding them means letting a fact on the BRMA boundary set reach a local-authority cell, which the boundary-frame gate added in #795 refuses by design.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 104
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PolicyEngine/microcosm
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
PolicyEngine/microcosm#475 ·
Maintainers usually reply within 1 day
-
UK: track the defects uk-data is fixing that microcosm still hasPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
PolicyEngine/microcosm#1095 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
PolicyEngine/microcosm#1094 ·
Maintainers usually reply within 1 day
-
ACS local release: real-data verification checklist for the first build of the #1019–#1023 stackOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
PolicyEngine/microcosm#1093 ·
Maintainers usually reply within 1 day
-
policyengine-uk 2.102.4+ needs policyengine-core 3.32.9+, which the certified US default refusesOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
PolicyEngine/microcosm#1086 · 2 comments ·
Maintainers usually reply within 1 day
All issues in PolicyEngine/microcosm
Similar issues
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
debpalash/VoiceStudio#2624 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Make Catch2 optional when `RDK_BUILD_CPP_TESTS=OFF`Possibly taken @pechersky claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
There are a few redundant calls to `fdesc._setCloseOnExec()`Possibly taken @gudnimg claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day