Skip to main content

中国地区邮编经纬度/工具(Python 版)

pypi python_vesion

根据省市区获取中国经纬度和邮编

关于

特性

  1. 根据省市区获取经纬度和邮编。

安装

$ pip install china-region

依赖库

pandas>=0.23.4

升级

$ pip install -U china-region

使用示例

    # 获取满足条件的所有地址
    >>> import china_region
    >>> china_region.search_all(county='华安')
    [{'province': '福建省', 'city': '漳州市', 'county': '华安县', 'longitude': 117.53, 'latitude': 25.02, 'zipCode': '363800'}]
    >>> china_region.search_all(province='福建省',city='华安')
    [{'province': '福建省', 'city': '漳州市', 'county': '华安县', 'longitude': 117.53, 'latitude': 25.02, 'zipCode': '363800'}]
    >>> china_region.search_all(province='贵州',city='贵阳',county='白云')
    [{'province': '贵州省', 'city': '贵阳市', 'county': '白云区', 'longitude': 106.65, 'latitude': 26.68, 'zipCode': '550014'}]

    # 获取满足条件的第一个地址
    >>> china_region.search('辽宁 铁岭')
    {'province': '辽宁省', 'city': '铁岭市', 'county': '铁岭市', 'longitude': 123.83, 'latitude': 42.28, 'zipCode': '112000'}

    # 获取一个随机的地址
    >>> china_region.sample()
    {'province': '山西省', 'city': '临汾市', 'county': '洪洞县', 'longitude': 111.67, 'latitude': 36.25, 'zipCode': '041600'}

资源文件

北京市	北京市	北京市	116.4	39.9	100000
北京市	北京市	东城区	116.42	39.93	100010
北京市	北京市	西城区	116.37	39.92	100032
北京市	北京市	崇文区	116.43	39.88	100000
北京市	北京市	宣武区	116.35	39.87	100000
北京市	北京市	朝阳区	116.43	39.92	100020
北京市	北京市	丰台区	116.28	39.85	100071

相似项目: https://github.com/radiocontroller/china-location

Lincese

MIT License

Copyright (c) 2019  Thunder Bouble

Metadata

Release files for china-region 0.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for china-region 0.0.11
File Size Uploaded
china_region-0.0.11.tar.gz 190.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for china-region 0.0.11
File Interpreter ABI Platform
china_region-0.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 241.8 kB

Release files / china_region-0.0.11.tar.gz

Download URL china_region-0.0.11.tar.gz
Size 190.2 kB
Tags Source
SHA-256 checksum
How to use checksums
17adc01d8963fa1a3eab8e8b6c6fc11af33e486df6c3afb0e15738733c5d2411
BLAKE2b-256 checksum
How to use checksums
82c1dac2129c265c6655a02d56c301b237aa0ac446d3fe68b345e8012c056907
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / china_region-0.0.11-py3-none-any.whl

Download URL china_region-0.0.11-py3-none-any.whl
Size 51.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6838bd6221fc1015ffdbec9db0fca06d5765153a24006260a3b124fed2f841f
BLAKE2b-256 checksum
How to use checksums
e0254ce21d958aca2f8834cde2108053d628952fae3099a5d3cc4973e4a2992b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.11 This release

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page