{"id":21817707,"url":"https://github.com/yescallop/areacodes","last_synced_at":"2025-04-05T07:06:21.021Z","repository":{"id":39494889,"uuid":"129526023","full_name":"yescallop/areacodes","owner":"yescallop","description":"中华人民共和国县级以上历史行政区划代码及新旧代码对应关系数据集","archived":false,"fork":false,"pushed_at":"2024-10-11T06:55:23.000Z","size":3337,"stargazers_count":124,"open_issues_count":3,"forks_count":47,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T06:07:45.183Z","etag":null,"topics":["china","diff","division","historical-data"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yescallop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-14T14:46:35.000Z","updated_at":"2025-03-24T02:47:31.000Z","dependencies_parsed_at":"2023-12-07T09:26:16.767Z","dependency_job_id":"499fb624-5bb2-46f7-88cb-47e7a5d786b1","html_url":"https://github.com/yescallop/areacodes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yescallop%2Fareacodes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yescallop%2Fareacodes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yescallop%2Fareacodes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yescallop%2Fareacodes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yescallop","download_url":"https://codeload.github.com/yescallop/areacodes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299832,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["china","diff","division","historical-data"],"created_at":"2024-11-27T15:48:02.181Z","updated_at":"2025-04-05T07:06:21.002Z","avatar_url":"https://github.com/yescallop.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# areacodes\n\n这个项目收集并分析**中华人民共和国县级以上行政区划代码**自 1980 年至今的历史数据及新旧代码间的对应关系数据。\n\n## 在线预览\n\n[由此进入在线预览][preview]\n\n## 数据集情况\n\n| 数据集名称 | 规范 | 目录 | 汇总 | 进度 |\n| - | - | - | - | - |\n| 历史行政区划代码 | 无 | [data](data) | [SQL](sql) \\| [JSON] \\| [CSV] | 已完成 |\n| 新旧代码对应关系 | [diff 规范](diff-spec.md) | [diff](diff) | 同上 | 基本完成* |\n\n\\* 代码变更的文本描述收集工作现已开始，欢迎各位参与，详情参见 [Issue #6](https://github.com/yescallop/areacodes/issues/6)。\n\n## CSV 汇总表说明\n\n- 启用 / 弃用时间只精确到年。\n\n    注：自 2018 年起至 2020 年底，民政部发布的数据每月更新一次，但自 2021 年起又改为每年更新一次。为了维持一致性，汇总表中记录的时间只精确到年。\n- 一条记录若为省级，其“二级行政区”为空；若为地级，其“二级行政区”即为其名称；若为县级，其“二级行政区”为其启用时对应的上级行政区名称（若上级代码存在），或“直辖”（若上级代码不存在）。\n\n    注：先前的版本中“直辖”原为“直管”。\n- 一条记录的“新代码”为代码变更、弃用或行政区域变更后，原行政区域所对应的代码（若该记录的状态为“启用”，则“新代码”不含其自身的代码）。\n\n    注：“新代码”中代码以字符 `;` 分隔。若一代码后接包含年份的方括号（如 `[2010]`），说明其对应的行政区域变更发生在指定的年份，否则默认为“变更（弃用）时间”。\n- 查询一条记录对应的最新代码的方法是，以该记录为根节点，按“新代码”字段展开树节点，直至所有叶节点的“新代码”字段均为空且状态均为“启用”为止。\n- 在行政区划合并后又拆分的情况（或其他类似情况）下，按上述方法或不能精确查询一条记录对应的最新代码。后续可通过扩展语法解决此问题。\n\n## 许可协议\n\n本项目适用 [CC0 1.0] 许可协议。\n\n## 原始数据来源\n\n- [中华人民共和国县级以上行政区划代码][1]，民政部。\n- [县级以上行政区划变更情况][2]，民政部。\n- [中华人民共和国行政区划沿革][3]，中国政府网。\n- [全国行政区划信息查询平台][4]，民政部。\n- [原始数据勘误](errata.md)，本项目。\n\n[preview]: https://yescallop.cn/areacodes/\n[CSV]: https://raw.githubusercontent.com/yescallop/areacodes/master/result.csv\n[JSON]: https://raw.githubusercontent.com/yescallop/areacodes/master/codes.json\n[CC0 1.0]: https://creativecommons.org/publicdomain/zero/1.0/deed.zh-hans\n[1]: https://www.mca.gov.cn/n156/n186/index.html\n[2]: http://xzqh.mca.gov.cn/description?dcpid=1\n[3]: http://www.gov.cn/test/2006-02/27/content_212020.htm\n[4]: http://xzqh.mca.gov.cn/map\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyescallop%2Fareacodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyescallop%2Fareacodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyescallop%2Fareacodes/lists"}