Decide a disclosure policy for UK subnational breakdowns, and measure how far they can be split by nation and English region
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
Piste de recherche
Start by reading docs/engineering/skills/microdata-weights.md, the implementation of compute_uk_geography_disclosure, and src/modal/segmented_national.py; then measure run time and peak memory for the proposed splits on Modal, including the local-area file download. Document a disclosure policy and a recommendation based on those measurements, and open follow-up implementation issues if needed.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Context
#881 adds UK local-area breakdowns (breakdown=local_areas). A breakdown runs on the Microcosm local-area dataset and applies the disclosure control from #860 (.py's compute_uk_geography_disclosure). That control withholds areas with too few survey households, and areas whose values could be worked out from published totals.
In his review of #881 (https://github.com/PolicyEngine/policyengine-sim-api/pull/881#pullrequestreview-5628345214), Pavel pointed out that a region=uk breakdown and a region=country/* breakdown each make their own withholding decisions over the same households. An area withheld in one release can appear in the other, and a user can request both, for example by opening a UK-wide report and a Scotland report for the same reform and year.
This isn't blocking #881, but it should be settled before nation breakdowns are widely used. That happens once the Public API PR PolicyEngine/policyengine-api#4024 is merged.
1. Decide a disclosure policy for subnational results
Questions to answer:
- Repeated releases. Is it acceptable for the same areas to be published from more than one release (UK-wide, per nation, per English region), each with its own withholding decisions? If not, what's the rule? For example: every published area comes from one UK-wide release.
- Differencing. Which combinations can a user request, and could combining them recover withheld values? Cases include:
- UK-wide against nation releases;
- releases for different years;
- single-area reports (
constituency/*,local_authority/*) against breakdowns; - published national or nation totals.
- External guidance. What does statistical disclosure guidance (for example, ONS guidance, and any terms attached to the survey data behind Microcosm) say about repeated or overlapping releases?
- The current settings. Are #860's settings (200 bootstrap replicates, at most 25 resolution rounds, the published fields and their rounding) still right under that policy?
Known option (Pavel's suggestion): run every breakdown UK-wide and filter it to the requested nation's areas.
- Accuracy: each household's result doesn't depend on which other households are in the run, and filtering by nation keeps the same weights, so an area's averages are the same either way. Only the withholding decisions and the bootstrap ranges differ.
- Cost: a Wales, Scotland or Northern Ireland breakdown runs the whole UK local-area file.
- Possible bonus: the Public API could then send every breakdown as
region=ukand filter the result itself, so a UK-wide report and all four nation reports share one cached run.
Done when: a written decision on the policy, added to docs/engineering/skills/microdata-weights.md or a new disclosure document, with follow-up implementation issues opened.
2. Measure how far breakdowns can be split by nation and English region
A UK-wide breakdown currently builds one baseline and reform pair over every household in the local-area file. That took about 70–90 s and 12 GiB peak memory when measured locally on #881, and the Modal figures aren't measured yet. Work out how much faster or lighter it could be if it were split into parallel pieces, for example by nation, or by English region (the nine E12… regions in region_code_oa) plus Wales, Scotland and Northern Ireland.
Questions to answer:
- Measurements. What are the run time and peak memory per nation and per English region on Modal, compared with one UK-wide run? Include the cold-start download of the local-area file.
- Splitting the computation, not the disclosure. Can the simulations run in parallel by region, with disclosure control applied once over the combined household-level outputs, so the release stays a single one? Which parts of
compute_uk_geography_disclosureneed the whole UK at once? For example: the resolution rounds, and areas whose values could be worked out from regional or national totals. - Reuse. Can the US segmented-national path (
src/modal/segmented_national.py) be reused or generalised for the UK? - Data and limits. Are there constraints from the data (areas that cross region boundaries, households with unassigned codes) or from Modal (concurrency and memory limits)?
Done when: measured numbers for the main split options, and a recommendation on whether to implement one, opened as its own issue if so.
Related
- #881: UK local-area breakdowns
- #860 and #859: disclosure-controlled UK geography outputs
- PolicyEngine/policyengine-api#4024: the Public API side
- PolicyEngine/policyengine-app-v2#1398: the app's Compute button
- Langage dominant
- Python
- Étoiles
- 1
- Forks
- 1
- Merge moyen
- 2 j 30 min
- PR mergées (30 j)
- 66
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PolicyEngine/policyengine-sim-api
-
Update policyengine to 6.11.1Peut-être pris @policyengine l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
PolicyEngine/policyengine-sim-api#916 ·
Les mainteneurs répondent en général sous 2 jours
-
Update policyengine to 6.7.3Peut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 2/5 Une demi-journée Accessibilité débutants 70/100
PolicyEngine/policyengine-sim-api#823 ·
Les mainteneurs répondent en général sous 2 jours
-
Integration tests fail due to missing UV virtual environment setupPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
PolicyEngine/policyengine-sim-api#314 ·
Les mainteneurs répondent en général sous 2 jours
-
Update dependenciesPeut-être pris @policyengine l’a pris il y a 119 jours. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 20/100
PolicyEngine/policyengine-sim-api#915 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
PolicyEngine/policyengine-sim-api#914 ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de PolicyEngine/policyengine-sim-api
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
pydot/pydot#601 · 4 commentaires ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
letsencrypt/cp-cps#361 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
CI: startup_failure because callers grant fewer permissions than ledger-app-workflows@v1 declaresPeut-être pris @maykonmichel l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
LedgerHQ/app-boilerplate-rust#227 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
linuxmint/mintupdate#1107 ·