Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#907 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
data

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Python
スター
1
フォーク
1
平均マージ
1日 18時間
マージ済み PR(30日)
59

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PolicyEngine/policyengine-sim-api のほかの issue

PolicyEngine/policyengine-sim-api の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。