Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Publish v2 catalog regions from the Public API's own region reference files

未关闭
#4,019 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

@anth-volk 已经在做这个了。

开始于 2026年10月22日。

  • #4020 来自 @anth-volk —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
api, backend

调研方向

Start by locating the v2 region publication code and the certified data release inputs that provide row filters and weight matrices; the issue does not name specific files or tests. Check how the current PolicyEngine.py region registry feeds /v2/regions, then trace how region reference files should select households. Done means publication uses repository-owned references, rejects unavailable selectors, and omits US places that cannot run.

由索引模型根据 Issue 内容生成。

描述

What

The Public API should publish the regions of each v2 catalog version from region reference files it keeps in its own repository, one per country, instead of copying PolicyEngine.py's region registry.

Each file should list every region's code, label, type, parent and US state, the value that selects its households, and the v1 identifier it replaces (for example country/ni and constituency/Aldershot). Publication should then give each region its dataset and filter from the certified data release that PolicyEngine.py ships:

  • US states and congressional districts, and UK nations: a row filter (a column and a value).
  • UK constituencies and local authorities: the release's weight matrix and the region's row code in it.

It should refuse to publish a region the data cannot select, and leave out regions that cannot run yet (US places).

Why

  • Today /v2/regions lists only the regions PolicyEngine.py's registry exposes: 5 UK regions, and 333 US places that would calculate national figures if run as listed.
  • UK constituencies and local authorities are missing, and are known in v1 by name rather than by ONS code.
  • The registry's region lists and filters change with each PolicyEngine.py release, and nothing checks them against the data.

With reference files owned by the Public API, the catalog lists all 1,015 UK regions by ONS code, uses "United States" and "United Kingdom" as the national labels, and fails loudly when a filter column or matrix row is missing.

主要语言
Python
星标
18
派生
33
平均合并
2 天 18 小时
30 天内合并 PR
36

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PolicyEngine/policyengine-api 的其他 Issue

查看 PolicyEngine/policyengine-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。