Decide a disclosure policy for UK subnational breakdowns, and measure how far they can be split by nation and English region
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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=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
- 主要言語
- Python
- スター
- 1
- フォーク
- 1
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 59
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-sim-api のほかの issue
-
Update policyengine to 6.7.3再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 半日 初心者へのやさしさ 70/100
PolicyEngine/policyengine-sim-api#823 ·
メンテナーはふだん 1 日以内に返信
-
Integration tests fail due to missing UV virtual environment setup対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
PolicyEngine/policyengine-sim-api#314 ·
メンテナーはふだん 1 日以内に返信
-
Update policyengine to 6.10.2対応中かも @policyengine が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
PolicyEngine/policyengine-sim-api#908 ·
メンテナーはふだん 1 日以内に返信
-
Update policyengine to 6.10.1対応中かも @policyengine が 2 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
PolicyEngine/policyengine-sim-api#905 ·
メンテナーはふだん 1 日以内に返信
-
Calculate a household under several policies in one call on Modal (v2 household functions)対応中かも @anth-volk が 3 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
PolicyEngine/policyengine-sim-api#902 ·
メンテナーはふだん 1 日以内に返信
PolicyEngine/policyengine-sim-api の issue をすべて見る
似ている issue
-
intake mcp-intake needs-ac needs-human-review priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Ikalus1988/MisakaNet#3848 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
521xueweihan/HelloGitHub#4105 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
igormcsouza/bookloud#54 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
aws-samples/sample-per-model-bedrock#526 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ok-oldking/ok-wuthering-waves#1802 ·
メンテナーはふだん 2 日以内に返信