Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Decide a disclosure policy for UK subnational breakdowns, and measure how far they can be split by nation and English region

Ouverte
#907 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

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
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
data

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=uk and 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_disclosure need 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

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de PolicyEngine/policyengine-sim-api

Toutes les issues de PolicyEngine/policyengine-sim-api

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.