Skip to main content

Chinese Province, City and Area Recognition Utilities (Updated 2025)

Project description

A Python module for extracting Chinese province, city, and district information from address strings.

Fork from DQinYuan/chinese_province_city_area_mapper with updated 2025 administrative division data.

Installation

pip install cpca-linch

Usage

import cpca

df = cpca.transform(["徐汇区虹漕路461号58号楼5楼", "广东省中山市沙溪镇云汉轻纺城"])
print(df)

Output:

     省    市    区              地址
0  上海市  上海市  徐汇区  虹漕路461号58号楼5楼
1  广东省  中山市  沙溪镇       云汉轻纺城

Key Improvements

  1. Updated administrative division data to 2025 (from xiangyuecn/AreaCity-JsSpider-StatsGov)

  2. Support for towns in prefecture-level cities without districts (Dongguan, Zhongshan, Danzhou, Jiayuguan)

  3. Removed latitude/longitude data for smaller package size

Full documentation: https://github.com/laofahai/cpca-linch

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpca_linch-0.4.4.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cpca_linch-0.4.4-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file cpca_linch-0.4.4.tar.gz.

File metadata

  • Download URL: cpca_linch-0.4.4.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cpca_linch-0.4.4.tar.gz
Algorithm Hash digest
SHA256 122652f34d7118a4fa0bf48d435eca6066823f8d3f366300bbee302e88ca1c64
MD5 dc37fa8a81c1cda86d8087d25ec060cd
BLAKE2b-256 1e4ff320318a9dd37f26a00375b33907a8df3875cf39b8f53a5310bf712d5b39

See more details on using hashes here.

File details

Details for the file cpca_linch-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: cpca_linch-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cpca_linch-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fbe0b1511950b7fc3c993a8a9bfd8beac4d3ed4e4d4d725f2fe5d0bd9a74e50f
MD5 df8811bec403e435d129811ae6661ec0
BLAKE2b-256 2eb412b06c035095f5c57aca8614f9da5c17c041e92167ab8c2bb2f8e771bb6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page