Aurouscia.ChinaAreas 1.0.0

dotnet add package Aurouscia.ChinaAreas --version 1.0.0
                    
NuGet\Install-Package Aurouscia.ChinaAreas -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aurouscia.ChinaAreas" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aurouscia.ChinaAreas" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Aurouscia.ChinaAreas" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aurouscia.ChinaAreas --version 1.0.0
                    
#r "nuget: Aurouscia.ChinaAreas, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aurouscia.ChinaAreas@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aurouscia.ChinaAreas&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Aurouscia.ChinaAreas&version=1.0.0
                    
Install as a Cake Tool

中国大陆地区行政区划数据(2025版)

数据来自民政部2025年发布,精确到区县

数据结构

  • 一般的省-市-区三级结构
  • 省直辖县直接属于省(例如湖北-仙桃
  • 直辖市的区直接属于直辖市(例如上海-浦东新区
  • 港澳台只有省级元素,缺少下辖的区划

使用

using Aurouscia.ChinaAreas.Data

//扁平的所有区划元素字典,key为区划六位代码,value为区划名称
ChinaAreasData.All
//{110000, "北京市"}, {110101, "东城区"}, ...

//区划层级关系字典,key为区划代码,value为其子级区划的代码
ChinaAreasData.Hierarchy
//{110000, [110101, 110102, 110105, 110106 ...]}

源码

源码中的本项目不包含数据,含有数据的C#文件是由父目录的node包生成的

  • 导航到packages/china-areas
  • 按该目录内的README.md准备数据源
  • 运行:npm run genTs,生成ts格式数据(生成C#数据的必要条件)
  • 运行:npm run genCs,以生成本项目内Data目录的C#代码

发现错误或过期

请在gitee提issue联系我,我会及时更正

许可证

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aurouscia.ChinaAreas:

Package Downloads
Aurouscia.ChineseIdCardNumber

中国大陆地区身份证号验证与信息提取

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 247 5/14/2025
0.0.0 228 5/14/2025