diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 00000000..39906eb7
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,60 @@
+---
+
+name: Test
+
+on:
+ push:
+ pull_request:
+ schedule:
+ - cron: '9 0 * * 1'
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: [3.8, 3.9, '3.10', 3.11, 3.12, 3.13, 3.14, pypy3.9]
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: python -m pip install --upgrade pip tox
+ - name: Run tox
+ run: tox -e "$(echo py${{ matrix.python-version }} | sed -e 's/[.]//g;s/pypypy/pypy/')" --skip-missing-interpreters false
+ tox_job:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ tox_job: [docs, flake8, mypy, headers]
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: 3.13
+ - name: Install dependencies
+ run: python -m pip install --upgrade pip tox
+ - name: Run tox ${{ matrix.tox_job }}
+ run: tox -e ${{ matrix.tox_job }} --skip-missing-interpreters false
+ CodeQL:
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: python
+ - name: Build
+ uses: github/codeql-action/autobuild@v2
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/.gitignore b/.gitignore
index bc90af02..77e8d2c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,10 @@ __pycache__
# /
/.coverage
+/.mypy_cache
+/.ruff_cache
/.tox
+/.venv
/build
/coverage
/dist
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index c0f779b0..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: python
-os: linux
-dist: xenial
-cache: pip
-python:
- - 2.7
- - 3.4
- - 3.5
- - 3.6
- - 3.7
- - 3.8
- - pypy
-jobs:
- include:
- - python: 2.6
- dist: trusty
- - python: pypy3
- dist: bionic
- - python: 3.6
- env: TOXENV=flake8
- - python: 3.6
- env: TOXENV=docs
-install: pip install tox
-script: tox -e "${TOXENV:-$(echo py$TRAVIS_PYTHON_VERSION | tr -d . | sed -e 's/pypypy/pypy/')}" --skip-missing-interpreters false
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..f6ba7a3f
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,160 @@
+Contributing to python-stdnum
+=============================
+
+This document describes general guidelines for contributing new formats or
+other enhancement to python-stdnum.
+
+
+Adding number formats
+---------------------
+
+Basically any number or code that has some validation mechanism available or
+some common formatting is eligible for inclusion into this library. If the
+only specification of the number is "it consists of 6 digits" implementing
+validation may not be that useful.
+
+Contributions of new formats or requests to implement validation for a format
+should include the following:
+
+* The format name and short description.
+* References to (official) sources that describe the format.
+* A one or two paragraph description containing more details of the number
+ (e.g. purpose and issuer and possibly format information that might be
+ useful to end users).
+* If available, a link to an (official) validation service for the number,
+ reference implementations or similar sources that allow validating the
+ correctness of the implementation.
+* A set of around 20 to 100 "real" valid numbers for testing (more is better
+ during development but only around 100 will be retained for regression
+ testing).
+* If the validation depends on some (online) list of formats, structures or
+ parts of the identifier (e.g. a list of region codes that are part of the
+ number) a way to easily update the registry information should be
+ available.
+
+
+Code contributions
+------------------
+
+Improvements to python-stdnum are most welcome. Integrating contributions
+will be done on a best-effort basis and can be made easier if the following
+are considered:
+
+* Ideally contributions are made as GitHub pull requests, but contributions
+ by email (privately or through the python-stdnum-users mailing list) can
+ also be considered.
+* Submitted contributions will often be reformatted and sometimes
+ restructured for consistency with other parts.
+* Contributions will be acknowledged in the release notes.
+* Contributions should add or update a copyright statement if you feel the
+ contribution is significant.
+* All contribution should be made with compatible applicable copyright.
+* It is not needed to modify the NEWS, README.md or files under docs for new
+ formats; these files will be updated on release.
+* Marking valid numbers as invalid should be avoided and are much worse than
+ marking invalid numbers as valid. Since the primary use case for
+ python-stdnum is to validate entered data having an implementation that
+ results in "computer says no" should be avoided.
+* Number format implementations should include links to sources of
+ information: generally useful links (e.g. more details about the number
+ itself) should be in the module docstring, if it relates more to the
+ implementation (e.g. pointer to reference implementation, online API
+ documentation or similar) a comment in the code is better
+* Country-specific numbers and codes go in a country or region package (e.g.
+ stdnum.eu.vat or stdnum.nl.bsn) while global numbers go in the toplevel
+ name space (e.g. stdnum.isbn).
+* All code should be well tested and achieve 100% code coverage.
+* Existing code structure conventions (e.g. see README for interface) should
+ be followed.
+* Git commit messages should follow the usual 7 rules.
+* Declarative or functional constructs are preferred over an iterative
+ approach, e.g.::
+
+ s = sum(int(c) for c in number)
+
+ over::
+
+ s = 0
+ for c in number:
+ s += int(c)
+
+
+Testing
+-------
+
+Tests can be run with `tox`. Some basic code style tests can be run with `tox
+-e flake8` and most other targets run the test suite with various supported
+Python interpreters.
+
+Module implementations have a couple of smaller test cases that also serve as
+basic documentation of the happy flow.
+
+More extensive tests are available, per module, in the tests directory. These
+tests (also doctests) cover more corner cases and should include a set of
+valid numbers that demonstrate that the module works correctly for real
+numbers.
+
+The normal tests should never require online sources for execution. All
+functions that deal with online lookups (e.g. the EU VIES service for VAT
+validation) should only be tested using conditional unittests.
+
+
+Finding test numbers
+--------------------
+
+Some company numbers are commonly published on a company's website contact
+page (e.g. VAT or other registration numbers, bank account numbers). Doing a
+web search limited to a country and some key words generally turn up a lot of
+pages with this information.
+
+Another approach is to search for spreadsheet-type documents with some
+keywords that match the number. This sometimes turns up lists of companies
+(also occasionally works for personal identifiers).
+
+For information that is displayed on ID cards or passports it is sometimes
+useful to do an image search.
+
+For dealing with numbers that point to individuals it is important to:
+
+* Only keep the data that is needed to test the implementation.
+* Ensure that no actual other data relation to a person or other personal
+ information is kept or can be inferred from the kept data.
+* The presence of a number in the test set should not provide any information
+ about the person (other than that there is a person with the number or
+ information that is present in the number itself).
+
+Sometimes numbers are part of a data leak. If this data is used to pick a few
+sample numbers from the selection should be random and the leak should not be
+identifiable from the picked numbers. For example, if the leaked numbers
+pertain only to people with a certain medical condition, membership of some
+organisation or other specific property the leaked data should not be used.
+
+
+Reverse engineering
+-------------------
+
+Sometimes a number format clearly has a check digit but the algorithm is not
+publicly documented. It is sometimes possible to reverse engineer the used
+check digit algorithm from a large set of numbers.
+
+For example, given numbers that, apart from the check digit, only differ in
+one digit will often expose the weights used. This works reasonably well if
+the algorithm uses modulo 11 is over a weighted sums over the digits.
+
+See https://github.com/arthurdejong/python-stdnum/pull/203#issuecomment-623188812
+
+
+Registries
+----------
+
+Some numbers or parts of numbers use validation base on a registry of known
+good prefixes, ranges or formats. It is only useful to fully base validation
+on these registries if the update frequency to these registries is very low.
+
+If there is a registry that is used (a list of known values, ranges or
+otherwise) the downloaded information should be stored in a data file (see
+the stdnum.numdb module). Only the minimal amount of data should be kept (for
+validation or identification).
+
+The data files should be able to be created and updated using a script in the
+`update` directory.
diff --git a/COPYING b/COPYING
index 5ab7695a..f6683e74 100644
--- a/COPYING
+++ b/COPYING
@@ -1,8 +1,8 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -10,7 +10,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
- GNU LESSER GENERAL PUBLIC LICENSE
+ GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
@@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -455,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
@@ -484,8 +484,7 @@ convey the exclusion of warranty; and each file should have at least the
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ License along with this library; if not, see .
Also add information on how to contact you by electronic and paper mail.
@@ -496,9 +495,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
- , 1 April 1990
- Ty Coon, President of Vice
+ , 1 April 1990
+ Moe Ghoul, President of Vice
That's all there is to it!
-
-
diff --git a/ChangeLog b/ChangeLog
index 130c4586..a546b744 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,2228 @@
+2026-01-04 Arthur de Jong
+
+ * [e7e900a] .github/workflows/test.yml, setup.py, tox.ini: Add
+ support for Python 3.14
+
+2026-01-04 Arthur de Jong
+
+ * [97d8cae] stdnum/sn/ninea.py: URL escape the underscore because
+ it confuses Sphinx
+
+2026-01-04 Arthur de Jong
+
+ * [6070c60] stdnum/at/postleitzahl.dat, stdnum/be/banks.dat,
+ stdnum/cn/loc.dat, stdnum/cz/banks.dat, stdnum/gs1_ai.dat,
+ stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat,
+ stdnum/nz/banks.dat, stdnum/oui.dat: Update database files
+
+2026-01-04 Arthur de Jong
+
+ * [a7fd300] update/at_postleitzahl.py, update/be_banks.py,
+ update/cfi.py, update/cn_loc.py, update/cz_banks.py,
+ update/do_whitelists.py, update/gs1_ai.py, update/iban.py,
+ update/imsi.py, update/isbn.py, update/isil.py, update/nz_banks.py:
+ Consistently pass a user agent for update scripts
+
+ The scourge of AI bots is forcing more and more sites to block
+ bots that don't set particular user agents.
+
+2026-01-04 Arthur de Jong
+
+ * [e7afc61] update/be_banks.py: Update download URL of Belgian
+ bank numbers
+
+ This also changes the handling to prefer the English name over
+ other names and handles another variant of not-applicable values.
+
+2026-01-04 Arthur de Jong
+
+ * [d332ee1] stdnum/sn/ninea.py, tests/test_sn_ninea.doctest:
+ Add check digit validation to Senegal NINEA
+
+2023-02-12 Leandro Regueiro
+
+ * [dd22123] stdnum/sn/__init__.py, stdnum/sn/ninea.py,
+ tests/test_sn_ninea.doctest: Add support for Senegal TIN
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/395
+ Closes https://github.com/arthurdejong/python-stdnum/issues/357
+
+2026-01-03 Arthur de Jong
+
+ * [d3ec3bd] stdnum/br/cnpj.py: Support new format for Brazilian CNPJ
+
+ The new format allows letters as well as numbers to identify
+ companies.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/484
+
+2025-02-27 dotbit1 <68584562+dotbit1@users.noreply.github.com>
+
+ * [cd94bf1] stdnum/ro/onrc.py, tests/test_ro_onrc.doctest: Support
+ the new Romanian ONRC format
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/465
+
+2026-01-03 Arthur de Jong
+
+ * [293136b] stdnum/lv/pvn.py: Support Latvian personal codes issued
+ after 2017
+
+ These numbers no longer embed a birth date in the format.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/486
+
+2023-12-08 Cédric Krier
+
+ * [a906a1e] stdnum/eu/excise.py, stdnum/fr/__init__.py,
+ stdnum/fr/accise.py, tests/test_fr_accise.doctest: Add accise -
+ the French number for excise
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/424
+
+2023-12-08 Cédric Krier
+
+ * [1a254d9] stdnum/eu/excise.py, tests/test_eu_excise.doctest:
+ Add European Excise Number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/424
+
+2025-09-28 Cédric Krier
+
+ * [d534b3c] stdnum/be/ogm_vcs.py: Add Belgian OGM-VCS
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/487
+
+2025-10-14 KathrinM
+
+ * [2cf475c] stdnum/eu/nace.py, stdnum/eu/nace20.dat,
+ stdnum/eu/nace21.dat, tests/test_eu_nace.doctest: Add support
+ for nace revision 2.1
+
+ This makes revision 2.1 the default but still allows validating
+ against version 2.0 using the revision argument.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/490
+
+2025-12-19 Tuukka Tolvanen
+
+ * [acda255] stdnum/de/leitweg.py, tests/test_de_leitweg.doctest:
+ Add DE Leitweg-ID
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/491
+
+2025-12-16 Arthur de Jong
+
+ * [c7a7fd1] .github/workflows/test.yml: Run flake8 with Python 3.13
+
+ Python version 3.14 no longer works.
+
+2025-10-26 Arthur de Jong
+
+ * [7a9b852] stdnum/ro/cnp.py: Mark more Romanian CNP county codes
+ as valid
+
+ According to
+ https://ro.wikipedia.org/wiki/Carte_de_identitate_rom%C3%A2neasc%C4%83#Seriile_c%C4%83r%C8%9Bilor_de_identitate_(%C3%AEn_modelele_emise_%C3%AEnainte_de_2021)
+ 70 is used to represent any registration, regardless of county
+ but while multiple documents claim 80-83 are also valid it is
+ unclear what they represent.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/489
+
+2025-10-26 Arthur de Jong
+
+ * [7ca9b6c] stdnum/be/vat.py, tests/test_be_vat.doctest: Validate
+ first digit of Belgian VAT number
+
+ Thanks to antonio-ginestar find pointing this out.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/488
+
+2022-09-17 Leandro Regueiro
+
+ * [a1fdd5d] stdnum/az/__init__.py, stdnum/az/voen.py,
+ tests/test_az_voen.doctest: Add support for Azerbaijan TIN
+
+ Thanks to Adam Handke for finding the weights for the check
+ digit algorithm.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/200
+ CLoses https://github.com/arthurdejong/python-stdnum/pull/329
+
+2025-08-08 Fabien MICHEL
+
+ * [e741318] stdnum/fr/rcs.py, tests/test_fr_rcs.doctest: Add French
+ RCS number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/481
+
+2025-08-08 Fabien MICHEL
+
+ * [ca80cc4] stdnum/fr/siren.py: Add fr.siren.format() function
+
+2025-08-08 Fabien MICHEL
+
+ * [b3a42a1] stdnum/fr/tva.py, tests/test_fr_tva.doctest: Add
+ fr.tva.to_siren() function
+
+ The function can convert a French VAT number to a SIREN.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/480
+
+2025-08-14 Arthur de Jong
+
+ * [843bbec] stdnum/bic.py, tests/test_bic.doctest: Add validation
+ of country code in BIC
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/482
+
+2025-06-05 Joni Saarinen
+
+ * [deb0db1] stdnum/ee/__init__.py: Add personal id and business
+ id alias for Estonia
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/476
+
+2025-05-10 Luca
+
+ * [1773a91] stdnum/mz/__init__.py, stdnum/mz/nuit.py,
+ tests/test_mz_nuit.doctest: Add support for Mozambique TIN
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/360
+ Closes https://github.com/arthurdejong/python-stdnum/pull/392
+ Closes https://github.com/arthurdejong/python-stdnum/pull/473
+
+2025-06-01 Arthur de Jong
+
+ * [5ef6ade] stdnum/numdb.py: Use broader type ignore for
+ pkg_resources import
+
+ Apparently mypy changed for classifying the problem from
+ import-untyped to import-not-found.
+
+2025-05-25 Arthur de Jong
+
+ * [0e64cf6] stdnum/cn/loc.dat, stdnum/cn/ric.py,
+ tests/test_cn_ric.doctest, update/cn_loc.py: Download Chinise
+ location codes from Wikipedia
+
+ The list on GitHub is missing historical information and also
+ appears to no longer be updated. This changes the birth place
+ lookup to take the birth year into account to determine whether
+ a county was assigned at the time.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/442
+
+2025-05-18 Arthur de Jong
+
+ * [210b9ce] stdnum/gs1_128.py, stdnum/gs1_ai.dat,
+ tests/test_gs1_128.doctest, update/gs1_ai.py: Fix handling of
+ decimals in Application Identifiers
+
+ This fixes the handling of GS1-128 Application Identifiers with
+ decimal types. Previously, with some 4 digit decimal application
+ identifiers the number of decimals were incorrectly considered
+ part of the value instead of the application identifier.
+
+ For example (310)5033333 is not correct but it should be evaluated
+ as (3105)033333 (application identifier 3105 and value 0.33333).
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/471
+
+2025-05-17 Arthur de Jong
+
+ * [d66998e] ChangeLog, NEWS, stdnum/__init__.py: Get files ready
+ for 2.1 release
+
+2025-05-17 Arthur de Jong
+
+ * [a753ebf] stdnum/at/postleitzahl.dat, stdnum/cn/loc.dat,
+ stdnum/gs1_ai.dat, stdnum/imsi.dat, stdnum/isbn.dat,
+ stdnum/my/bp.dat, stdnum/nz/banks.dat, stdnum/oui.dat,
+ update/my_bp.py: Update database files
+
+ This also updates the URLs for the National Registration Department
+ of Malaysia.
+
+2025-05-14 Cédric Krier
+
+ * [972b42d] setup.py: Define minimal Python version in setup.py
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/474
+ Closes https://github.com/arthurdejong/python-stdnum/pull/475
+ Fixes 3542c06
+
+2025-05-05 Luca
+
+ * [8b78f78] stdnum/jp/in_.py: Remove superfluous modulus operation
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/470
+
+2025-05-05 Arthur de Jong
+
+ * [ad4af91] ChangeLog, NEWS, README.md, docs/conf.py,
+ docs/index.rst, docs/stdnum.be.eid.rst, docs/stdnum.be.ssn.rst,
+ docs/stdnum.es.cae.rst, docs/stdnum.id.nik.rst,
+ docs/stdnum.isni.rst, docs/stdnum.jp.in_.rst,
+ docs/stdnum.nl.identiteitskaartnummer.rst, docs/stdnum.ru.ogrn.rst,
+ stdnum/__init__.py: Get files ready for 2.0 release
+
+2025-05-05 Arthur de Jong
+
+ * [f2967d3] stdnum/at/postleitzahl.dat, stdnum/be/banks.dat,
+ stdnum/cfi.dat, stdnum/cn/loc.dat, stdnum/cz/banks.dat,
+ stdnum/gs1_ai.dat, stdnum/iban.dat, stdnum/imsi.dat,
+ stdnum/isbn.dat, stdnum/isil.dat, stdnum/my/bp.dat,
+ stdnum/nz/banks.dat, stdnum/oui.dat, tests/test_gs1_128.doctest,
+ tox.ini: Update database files
+
+ This also updates the GS1-128 tests because a previously unused
+ AI is now in use. This also adds the updating of the Czech bank
+ numbers to tox.
+
+2025-05-05 Arthur de Jong
+
+ * [c118723] update/at_postleitzahl.py: Remove duplicate Austrian
+ post offices
+
+2025-05-05 Arthur de Jong
+
+ * [1a87baf] update/my_bp.crt, update/my_bp.py: Drop custom
+ certificates for www.jpn.gov.my
+
+ The certificate chain for www.jpn.gov.my seems to have been fixed.
+
+2025-05-05 Arthur de Jong
+
+ * [44575a1] update/iban.py: Allow reading IBAN registry from the
+ command line
+
+ It seems that the Swift website currently uses TLS fingerprinting
+ to block downloads of the IBAN registry except in certain browsers.
+
+ It also fixes an idiosyncrasy in the IBAN registry iteself where
+ the Norwegian BBAN format string was not correct.
+
+2025-05-05 Arthur de Jong
+
+ * [44c2355] update/gs1_ai.py: Fix the downloading of GS1 application
+ identifiers
+
+ The URL changed and the embedded JSON also slightly changed.
+
+2025-05-05 Arthur de Jong
+
+ * [01e87f9] update/cn_loc.py, update/gs1_ai.py: Fix datetime
+ related deprecation warnings in update scripts
+
+2025-05-05 Arthur de Jong
+
+ * [37320ea] update/be_banks.py, update/requirements.txt: Fix the
+ downloading of Belgian bank identifiers
+
+ The site switched from XLS to XLSX files.
+
+2025-05-05 Arthur de Jong
+
+ * [98b4fa0] stdnum/util.py, update/cfi.py, update/isil.py,
+ update/my_bp.py: Always pass regex flags as keyword argument
+
+ In particular with re.sub() it got confused with the count
+ positional argument.
+
+ Fixes a9039c1
+
+2025-05-05 Arthur de Jong
+
+ * [6e8c783] stdnum/cr/cpj.py, stdnum/fr/nir.py, stdnum/si/maticna.py:
+ Switch some URLs to HTTPS
+
+2022-09-04 Leandro Regueiro
+
+ * [497bb11] stdnum/th/__init__.py: Add VAT alias for Thailand
+ TIN number
+
+ Based on
+ https://github.com/arthurdejong/python-stdnum/issues/118#issuecomment-920521305
+ Closes https://github.com/arthurdejong/python-stdnum/pull/314
+
+2025-05-05 Arthur de Jong
+
+ * [bfac07b] stdnum/ua/edrpou.py: Fix typo
+
+ Fixes b7b2af8
+
+2025-04-04 Luca Sicurello
+
+ * [fca47b0] stdnum/jp/in_.py: Add Japanese Individual Number
+
+2025-03-13 David Salvisberg
+
+ * [0e857fb] .github/workflows/test.yml, .gitignore, docs/index.rst,
+ setup.cfg, setup.py, stdnum/__init__.py, stdnum/ad/__init__.py,
+ stdnum/ad/nrt.py, stdnum/al/__init__.py, stdnum/al/nipt.py,
+ stdnum/ar/__init__.py, stdnum/ar/cbu.py, stdnum/ar/cuit.py,
+ stdnum/ar/dni.py, stdnum/at/__init__.py, stdnum/at/businessid.py,
+ stdnum/at/postleitzahl.py, stdnum/at/tin.py, stdnum/at/uid.py,
+ stdnum/at/vnr.py, stdnum/au/__init__.py, stdnum/au/abn.py,
+ stdnum/au/acn.py, stdnum/au/tfn.py, stdnum/be/__init__.py,
+ stdnum/be/bis.py, stdnum/be/eid.py, stdnum/be/iban.py,
+ stdnum/be/nn.py, stdnum/be/ssn.py, stdnum/be/vat.py,
+ stdnum/bg/egn.py, stdnum/bg/pnf.py, stdnum/bg/vat.py,
+ stdnum/bic.py, stdnum/bitcoin.py, stdnum/br/__init__.py,
+ stdnum/br/cnpj.py, stdnum/br/cpf.py, stdnum/by/__init__.py,
+ stdnum/by/unp.py, stdnum/ca/__init__.py, stdnum/ca/bc_phn.py,
+ stdnum/ca/bn.py, stdnum/ca/sin.py, stdnum/casrn.py, stdnum/cfi.py,
+ stdnum/ch/esr.py, stdnum/ch/ssn.py, stdnum/ch/uid.py,
+ stdnum/ch/vat.py, stdnum/cl/__init__.py, stdnum/cl/rut.py,
+ stdnum/cn/__init__.py, stdnum/cn/ric.py, stdnum/cn/uscc.py,
+ stdnum/co/__init__.py, stdnum/co/nit.py, stdnum/cr/__init__.py,
+ stdnum/cr/cpf.py, stdnum/cr/cpj.py, stdnum/cr/cr.py,
+ stdnum/cu/ni.py, stdnum/cusip.py, stdnum/cy/vat.py,
+ stdnum/cz/__init__.py, stdnum/cz/bankaccount.py,
+ stdnum/cz/dic.py, stdnum/cz/rc.py, stdnum/damm.py,
+ stdnum/de/__init__.py, stdnum/de/handelsregisternummer.py,
+ stdnum/de/idnr.py, stdnum/de/stnr.py, stdnum/de/vat.py,
+ stdnum/de/wkn.py, stdnum/dk/__init__.py, stdnum/dk/cpr.py,
+ stdnum/dk/cvr.py, stdnum/do/__init__.py, stdnum/do/cedula.py,
+ stdnum/do/ncf.py, stdnum/do/rnc.py, stdnum/dz/__init__.py,
+ stdnum/dz/nif.py, stdnum/ean.py, stdnum/ec/__init__.py,
+ stdnum/ec/ci.py, stdnum/ec/ruc.py, stdnum/ee/__init__.py,
+ stdnum/ee/ik.py, stdnum/ee/kmkr.py, stdnum/ee/registrikood.py,
+ stdnum/eg/__init__.py, stdnum/eg/tn.py, stdnum/es/__init__.py,
+ stdnum/es/cae.py, stdnum/es/ccc.py, stdnum/es/cif.py,
+ stdnum/es/cups.py, stdnum/es/dni.py, stdnum/es/iban.py,
+ stdnum/es/nie.py, stdnum/es/nif.py, stdnum/es/postal_code.py,
+ stdnum/es/referenciacatastral.py, stdnum/eu/at_02.py,
+ stdnum/eu/banknote.py, stdnum/eu/ecnumber.py, stdnum/eu/eic.py,
+ stdnum/eu/nace.py, stdnum/eu/oss.py, stdnum/eu/vat.py,
+ stdnum/exceptions.py, stdnum/fi/__init__.py, stdnum/fi/alv.py,
+ stdnum/fi/associationid.py, stdnum/fi/hetu.py,
+ stdnum/fi/veronumero.py, stdnum/fi/ytunnus.py,
+ stdnum/figi.py, stdnum/fo/__init__.py, stdnum/fo/vn.py,
+ stdnum/fr/__init__.py, stdnum/fr/nif.py, stdnum/fr/nir.py,
+ stdnum/fr/siren.py, stdnum/fr/siret.py, stdnum/fr/tva.py,
+ stdnum/gb/nhs.py, stdnum/gb/sedol.py, stdnum/gb/upn.py,
+ stdnum/gb/utr.py, stdnum/gb/vat.py, stdnum/gh/__init__.py,
+ stdnum/gh/tin.py, stdnum/gn/__init__.py, stdnum/gn/nifp.py,
+ stdnum/gr/amka.py, stdnum/gr/vat.py, stdnum/grid.py,
+ stdnum/gs1_128.py, stdnum/gt/__init__.py, stdnum/gt/nit.py,
+ stdnum/hr/__init__.py, stdnum/hr/oib.py, stdnum/hu/__init__.py,
+ stdnum/hu/anum.py, stdnum/iban.py, stdnum/id/__init__.py,
+ stdnum/id/nik.py, stdnum/id/npwp.py, stdnum/ie/pps.py,
+ stdnum/ie/vat.py, stdnum/il/__init__.py, stdnum/il/hp.py,
+ stdnum/il/idnr.py, stdnum/imei.py, stdnum/imo.py, stdnum/imsi.py,
+ stdnum/in_/__init__.py, stdnum/in_/aadhaar.py, stdnum/in_/epic.py,
+ stdnum/in_/gstin.py, stdnum/in_/pan.py, stdnum/in_/vid.py,
+ stdnum/is_/__init__.py, stdnum/is_/kennitala.py, stdnum/is_/vsk.py,
+ stdnum/isan.py, stdnum/isbn.py, stdnum/isil.py, stdnum/isin.py,
+ stdnum/ismn.py, stdnum/isni.py, stdnum/iso11649.py,
+ stdnum/iso6346.py, stdnum/iso7064/mod_11_10.py,
+ stdnum/iso7064/mod_11_2.py, stdnum/iso7064/mod_37_2.py,
+ stdnum/iso7064/mod_37_36.py, stdnum/iso7064/mod_97_10.py,
+ stdnum/isrc.py, stdnum/issn.py, stdnum/it/__init__.py,
+ stdnum/it/aic.py, stdnum/it/codicefiscale.py, stdnum/it/iva.py,
+ stdnum/jp/__init__.py, stdnum/jp/cn.py, stdnum/ke/__init__.py,
+ stdnum/ke/pin.py, stdnum/kr/__init__.py, stdnum/kr/brn.py,
+ stdnum/kr/rrn.py, stdnum/lei.py, stdnum/li/peid.py,
+ stdnum/lt/__init__.py, stdnum/lt/asmens.py,
+ stdnum/lt/pvm.py, stdnum/lu/__init__.py, stdnum/lu/tva.py,
+ stdnum/luhn.py, stdnum/lv/__init__.py, stdnum/lv/pvn.py,
+ stdnum/ma/__init__.py, stdnum/ma/ice.py, stdnum/mac.py,
+ stdnum/mc/__init__.py, stdnum/mc/tva.py, stdnum/md/idno.py,
+ stdnum/me/__init__.py, stdnum/me/iban.py, stdnum/me/pib.py,
+ stdnum/meid.py, stdnum/mk/__init__.py, stdnum/mk/edb.py,
+ stdnum/mt/vat.py, stdnum/mu/nid.py, stdnum/mx/__init__.py,
+ stdnum/mx/curp.py, stdnum/mx/rfc.py, stdnum/my/nric.py,
+ stdnum/nl/__init__.py, stdnum/nl/brin.py, stdnum/nl/bsn.py,
+ stdnum/nl/btw.py, stdnum/nl/identiteitskaartnummer.py,
+ stdnum/nl/onderwijsnummer.py, stdnum/nl/postcode.py,
+ stdnum/no/__init__.py, stdnum/no/fodselsnummer.py,
+ stdnum/no/iban.py, stdnum/no/kontonr.py, stdnum/no/mva.py,
+ stdnum/no/orgnr.py, stdnum/numdb.py, stdnum/nz/__init__.py,
+ stdnum/nz/bankaccount.py, stdnum/nz/ird.py, stdnum/pe/__init__.py,
+ stdnum/pe/cui.py, stdnum/pe/ruc.py, stdnum/pk/cnic.py,
+ stdnum/pl/__init__.py, stdnum/pl/nip.py, stdnum/pl/pesel.py,
+ stdnum/pl/regon.py, stdnum/pt/__init__.py, stdnum/pt/cc.py,
+ stdnum/pt/nif.py, stdnum/py.typed, stdnum/py/__init__.py,
+ stdnum/py/ruc.py, stdnum/ro/__init__.py, stdnum/ro/cf.py,
+ stdnum/ro/cnp.py, stdnum/ro/cui.py, stdnum/ro/onrc.py,
+ stdnum/rs/__init__.py, stdnum/rs/pib.py, stdnum/ru/__init__.py,
+ stdnum/ru/inn.py, stdnum/ru/ogrn.py, stdnum/se/__init__.py,
+ stdnum/se/orgnr.py, stdnum/se/personnummer.py,
+ stdnum/se/postnummer.py, stdnum/se/vat.py,
+ stdnum/sg/__init__.py, stdnum/sg/uen.py, stdnum/si/__init__.py,
+ stdnum/si/ddv.py, stdnum/si/emso.py, stdnum/si/maticna.py,
+ stdnum/sk/__init__.py, stdnum/sk/dph.py, stdnum/sk/rc.py,
+ stdnum/sm/__init__.py, stdnum/sm/coe.py, stdnum/sv/__init__.py,
+ stdnum/sv/nit.py, stdnum/th/moa.py, stdnum/th/pin.py,
+ stdnum/th/tin.py, stdnum/tn/__init__.py, stdnum/tn/mf.py,
+ stdnum/tr/__init__.py, stdnum/tr/tckimlik.py, stdnum/tr/vkn.py,
+ stdnum/tw/__init__.py, stdnum/tw/ubn.py, stdnum/ua/edrpou.py,
+ stdnum/ua/rntrc.py, stdnum/us/atin.py, stdnum/us/ein.py,
+ stdnum/us/itin.py, stdnum/us/ptin.py, stdnum/us/rtn.py,
+ stdnum/us/ssn.py, stdnum/us/tin.py, stdnum/util.py,
+ stdnum/uy/__init__.py, stdnum/uy/rut.py, stdnum/vatin.py,
+ stdnum/ve/__init__.py, stdnum/ve/rif.py, stdnum/verhoeff.py,
+ stdnum/vn/__init__.py, stdnum/vn/mst.py, stdnum/za/idnr.py,
+ stdnum/za/tin.py, tests/test_by_unp.py, tests/test_ch_uid.py,
+ tests/test_de_handelsregisternummer.py, tests/test_do_cedula.py,
+ tests/test_do_ncf.py, tests/test_do_rnc.py, tests/test_eu_vat.py,
+ tox.ini: Add type hints
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/467
+ Closes https://github.com/arthurdejong/python-stdnum/issues/433
+
+2025-04-21 Arthur de Jong
+
+ * [bc689fd] stdnum/do/cedula.py: Add missing verify argument to
+ Cedula check_dgii()
+
+2025-03-13 David Salvisberg
+
+ * [8283dbb] stdnum/be/bis.py, stdnum/be/nn.py, stdnum/be/ssn.py,
+ stdnum/de/handelsregisternummer.py, stdnum/do/ncf.py,
+ stdnum/do/rnc.py, stdnum/eu/vat.py, stdnum/pk/cnic.py,
+ stdnum/util.py: Explicity return None
+
+ As per PEP 8.
+
+ See https://peps.python.org/pep-0008/
+
+2025-03-13 David Salvisberg
+
+ * [6b9bbe2] stdnum/be/iban.py, stdnum/be/nn.py,
+ stdnum/cz/bankaccount.py, stdnum/es/cups.py, stdnum/gs1_128.py,
+ stdnum/pk/cnic.py, stdnum/vatin.py, stdnum/verhoeff.py,
+ tests/test_be_iban.doctest: Small code cleanups
+
+2025-04-21 Arthur de Jong
+
+ * [3542c06] .github/workflows/test.yml, setup.py, tox.ini: Drop
+ support for Python 3.6 and 3.7
+
+ Sadly GitHub has dropped the ability to run tests with these
+ versions of Python.
+
+2025-03-27 Arthur de Jong
+
+ * [ae0d86c] tests/test_do_cedula.py, tests/test_do_rnc.py: Ignore
+ test failures from www.dgii.gov.do
+
+ There was a change in the SOAP service and there is a new
+ URL. However, the API has changed and seems to require
+ authentication.
+
+ We ignore test failures for now but unless a solution is found
+ the DGII validation will be removed.
+
+ See: https://github.com/arthurdejong/python-stdnum/pull/462 See:
+ https://github.com/arthurdejong/python-stdnum/issues/461
+
+2025-03-27 Arthur de Jong
+
+ * [dcd7fa6] tests/test_do_rnc.py: Drop more Python 2.7 compatibility
+ code
+
+2025-03-27 Arthur de Jong
+
+ * [852515c] stdnum/cz/rc.py, tests/test_cz_rc.doctest: Fix Czech
+ Rodné číslo check digit validation
+
+ It seems that a small minority of numbers assigned
+ with a checksum of 10 are still valid and expected
+ to have a check digit value of 0. According to
+ https://www.domzo13.cz/sw/evok/help/born_numbers.html this
+ practice even happended (but less frequently) after 1985.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/468
+
+2025-02-16 Arthur de Jong
+
+ * [fc766bc] .github/workflows/test.yml, setup.py, tox.ini: Add
+ support for Python 3.13
+
+2024-12-10 nvmbrasserie
+
+ * [1386f67] stdnum/ru/ogrn.py, tests/test_ru_ogrn.doctest: Add
+ Russian ОГРН
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/459
+
+2024-07-04 Quique Porta
+
+ * [8519221] stdnum/es/cae.py, tests/test_es_cae.doctest: Add
+ Spanish CAE Number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/446
+
+2025-02-15 Arthur de Jong
+
+ * [0f94ca6] stdnum/ec/ruc.py, tests/test_ec_ruc.doctest: Support
+ Ecuador public RUC with juridical format
+
+ It seems that numbers with a format used for juridical RUCs have
+ been issued to companies.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/457
+
+2025-02-15 Arthur de Jong
+
+ * [928a09d] stdnum/isni.py: Add International Standard Name
+ Identifier
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/463
+
+2025-01-11 Arthur de Jong
+
+ * [2b92075] .github/workflows/test.yml, README.md,
+ online_check/stdnum.wsgi, setup.cfg, setup.py, stdnum/by/unp.py,
+ stdnum/de/handelsregisternummer.py, stdnum/do/ncf.py,
+ stdnum/eg/tn.py, stdnum/es/referenciacatastral.py,
+ stdnum/eu/nace.py, stdnum/imsi.py,
+ stdnum/mac.py, stdnum/meid.py, stdnum/mk/edb.py,
+ stdnum/mx/curp.py, stdnum/mx/rfc.py, stdnum/util.py,
+ tests/test_by_unp.doctest, tests/test_cn_ric.doctest,
+ tests/test_de_handelsregisternummer.doctest,
+ tests/test_de_stnr.doctest, tests/test_eg_tn.doctest,
+ tests/test_es_referenciacatastral.doctest, tests/test_isan.doctest,
+ tests/test_mac.doctest, tests/test_mk_edb.doctest,
+ tests/test_my_nric.doctest, tests/test_robustness.doctest,
+ tests/test_util.doctest, tox.ini: Drop Python 2 support
+
+ This deprecates the stdnum.util.to_unicode() function because
+ we no longer have to deal with bytestrings.
+
+2024-11-17 Arthur de Jong
+
+ * [0218601] stdnum/uy/rut.py, tests/test_uy_rut.doctest: Allow
+ Uruguay RUT number starting with 22
+
+2024-09-30 Victor Sordoillet
+
+ * [bcd5018] stdnum/isrc.py, tests/test_isrc.doctest: Add missing
+ music industry ISRC country codes
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/455
+ Closes https://github.com/arthurdejong/python-stdnum/issues/454
+
+2024-10-11 Arthur de Jong
+
+ * [020f1df] .github/workflows/test.yml: Use older Github runner
+ for Python 3.7 tests
+
+2024-10-11 Arthur de Jong
+
+ * [051e63f] tests/test_verhoeff.doctest: Add more tests for
+ Verhoeff implementation
+
+ See https://github.com/arthurdejong/python-stdnum/issues/456
+
+2024-09-21 Arthur de Jong
+
+ * [dc850d6] tox.ini: Ignore deprecation warnings in flake8 target
+
+ This silences a ton of ast deprecation warnings that we can't
+ fix in python-stdnum anyway.
+
+2024-09-15 Arthur de Jong
+
+ * [0ceb2b9] stdnum/util.py: Ensure get_soap_client() caches
+ with verify
+
+ This fixes the get_soap_client() function to cache SOAP clients
+ taking the verify argument into account.
+
+ Fixes 3fcebb2
+
+2024-07-25 Jeff Horemans
+
+ * [6c2873c] stdnum/be/eid.py: Add Belgian eID card number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/448
+
+2024-07-25 Jeff Horemans
+
+ * [56036d0] stdnum/nl/identiteitskaartnummer.py: Add Dutch
+ identiteitskaartnummer
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/449
+
+2024-09-14 Arthur de Jong
+
+ * [3fcebb2] setup.py, stdnum/by/unp.py, stdnum/ch/uid.py,
+ stdnum/de/handelsregisternummer.py, stdnum/do/ncf.py,
+ stdnum/do/rnc.py, stdnum/eu/vat.py, stdnum/tr/tckimlik.py,
+ stdnum/util.py: Customise certificate validation for web services
+
+ This adds a `verify` argument to all functions that use network
+ services for lookups. The option is used to configure how
+ certificate validation works, the same as in the requests library.
+
+ For SOAP requests this is implemented properly when using the
+ Zeep library. The implementations using Suds and PySimpleSOAP
+ have been updated on a best-effort basis but their use has been
+ deprecated because they do not seem to work in practice in a
+ lot of cases already.
+
+ Related to https://github.com/arthurdejong/python-stdnum/issues/452
+ Related to https://github.com/arthurdejong/python-stdnum/pull/453
+
+2024-07-04 Joris Makauskis
+
+ * [6cbb9bc] stdnum/util.py: Fix zeep client timeout parameter
+
+ The timeout parameter of the zeep transport class is not
+ responsable for POST/GET timeouts. The operational_timeout
+ parameter should be used for that.
+
+ See https://github.com/mvantellingen/python-zeep/issues/140
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/444
+ Closes https://github.com/arthurdejong/python-stdnum/pull/445
+
+2023-07-04 Jeff Horemans
+
+ * [af3a728] stdnum/be/ssn.py, tests/test_be_ssn.doctest: Add
+ Belgian SSN number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/438
+
+2024-07-15 Arthur de Jong
+
+ * [0da257c] online_check/stdnum.wsgi: Replace use of deprecated
+ inspect.getargspec()
+
+ Use the inspect.signature() function instead. The
+ inspect.getargspec() function was removed in Python 3.11.
+
+2024-06-23 Arthur de Jong
+
+ * [e951dac] stdnum/id/npwp.py, tests/test_id_npwp.doctest: Support
+ 16 digit Indonesian NPWP numbers
+
+ The Indonesian NPWP is being switched from 15 to 16 digits. The
+ number is now the NIK for Indonesian citizens and the old format
+ with a leading 0 for others (organisations and non-citizens).
+
+ See
+ https://www.grantthornton.co.id/insights/global-insights1/updates-regarding-the-format-of-indonesian-tax-id-numbers/
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/432
+
+2024-05-17 Jeff Horemans
+
+ * [1da003f] stdnum/ch/uid.py: Adjust Swiss uid module to accept
+ numbers without CHE prefix
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/437
+ Closes https://github.com/arthurdejong/python-stdnum/issues/423
+
+2024-05-21 petr.prikryl
+
+ * [91959bd] stdnum/cz/banks.dat: Update Czech database files
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/439
+ Closes https://github.com/arthurdejong/python-stdnum/pull/435
+
+2024-05-31 Olly Middleton
+
+ * [58ecb03] stdnum/ie/pps.py, tests/test_ie_pps.doctest: Update
+ Irish PPS validator to support new numbers
+
+ See https://www.charteredaccountants.ie/News/b-range-pps-numbers
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/440
+ Closes https://github.com/arthurdejong/python-stdnum/pull/441
+
+2024-06-13 vanderkoort
+
+ * [fb4d792] NEWS: Fix a typo
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/443
+
+2024-05-19 Arthur de Jong
+
+ * [5aeaeff] stdnum/id/loc.dat, stdnum/id/nik.py: Add support for
+ Indonesian NIK
+
+2024-05-19 Arthur de Jong
+
+ * [0690996] .github/workflows/test.yml, setup.py, tox.ini: Drop
+ support for Python 3.5
+
+ We don't have an easy way to test with Python 3.5 any more.
+
+2024-03-17 Arthur de Jong
+
+ * [201d4d1] ChangeLog, NEWS, README.md, docs/conf.py, docs/index.rst,
+ docs/stdnum.ca.bc_phn.rst, docs/stdnum.eu.ecnumber.rst,
+ docs/stdnum.in_.vid.rst, stdnum/__init__.py: Get files ready
+ for 1.20 release
+
+2024-03-17 Arthur de Jong
+
+ * [b454d3a] stdnum/at/postleitzahl.dat, stdnum/be/banks.dat,
+ stdnum/cn/loc.dat, stdnum/gs1_128.py, stdnum/gs1_ai.dat,
+ stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat,
+ stdnum/nz/banks.dat, stdnum/oui.dat, tests/test_be_iban.doctest,
+ update/gs1_ai.py: Update database files
+
+ The Belgian bpost bank no longer has a registration and a few
+ bank account numbers in the tests that used that bank were removed.
+
+ Also updates the update/gs1_ai.py script to handle the new format
+ of the data published by GS1. Also update the GS1-128 module to
+ handle some different date formats.
+
+ The Pakistan entry was kept in the stdnum/iban.dat file because
+ the PDF version of the IBAN Registry still contains the country.
+
+ fix db
+
+2024-03-17 Arthur de Jong
+
+ * [97dbced] tox.ini: Add update-dat tox target for convenient data
+ file updating
+
+2024-03-17 Arthur de Jong
+
+ * [26fd25b] setup.cfg, update/cfi.py, update/nz_banks.py,
+ update/requirements.txt: Switch to using openpyxl for parsing
+ XLSX files
+
+ The xlrd has dropped support for parsing XLSX files. We still
+ use xlrd for update/be_banks.py because they use the classic
+ XLS format and openpyxl does not support that format.
+
+2024-03-17 Arthur de Jong
+
+ * [9230604] stdnum/za/idnr.py: Use HTTPS in URLs where possible
+
+2024-02-27 Atul Deolekar
+
+ * [7cba469] stdnum/in_/vid.py: Add Indian virtual identity number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/428
+
+2024-03-17 Arthur de Jong
+
+ * [bb20121] stdnum/ua/edrpou.py, tests/test_ua_edrpou.doctest:
+ Fix Ukrainian EDRPOU check digit calculation
+
+ This fixes the case where the weighted sum woud be 10 which
+ should result in a check digit of 0.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/429
+
+2023-12-15 Kevin Dagostino
+
+ * [9c7c669] stdnum/fr/nif.py: Imporve French NIF validation
+ (checksum)
+
+ The last 3 digits are a checksum. % 511
+ https://ec.europa.eu/taxation_customs/tin/specs/FS-TIN%20Algorithms-Public.docx
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/426
+
+2024-02-03 Arthur de Jong
+
+ * [1e412ee] stdnum/vatin.py, tests/test_vatin.doctest: Fix vatin
+ number compacting for "EU" VAT numbers
+
+ Thanks Davide Walder for finding this.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/427
+
+2023-11-19 Daniel Weber
+
+ * [2535bbf] stdnum/eu/ecnumber.py, tests/test_eu_ecnumber.doctest:
+ Add European Community (EC) Number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/422
+
+2023-10-20 Ömer Boratav
+
+ * [2478483] stdnum/ca/bc_phn.py: Add British Columbia PHN
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/421
+
+2023-11-12 Arthur de Jong
+
+ * [58d6283] stdnum/ro/cf.py, tests/test_eu_vat.doctest: Ensure EU
+ VAT numbers don't accept duplicate country codes
+
+2023-11-12 Arthur de Jong
+
+ * [1a5db1f] stdnum/de/vat.py: Fix typo (thanks Александр
+ Кизеев)
+
+2023-10-02 Arthur de Jong
+
+ * [352bbcb] .github/workflows/test.yml, setup.py, tox.ini: Add
+ support for Python 3.12
+
+2023-08-20 Arthur de Jong
+
+ * [fa455fc] ChangeLog, NEWS, README.md, docs/index.rst,
+ docs/stdnum.be.bis.rst, docs/stdnum.eg.tn.rst,
+ docs/stdnum.es.postal_code.rst, docs/stdnum.eu.oss.rst,
+ docs/stdnum.gn.nifp.rst, docs/stdnum.si.maticna.rst,
+ stdnum/__init__.py: Get files ready for 1.19 release
+
+2023-08-20 Arthur de Jong
+
+ * [3191b4c] MANIFEST.in: Ensure all files are included in source
+ archive
+
+ Fixes b1dc313 Fixes 90044e2
+
+2023-08-20 Arthur de Jong
+
+ * [3947a54] stdnum/by/portal.nalog.gov.by.crt, stdnum/by/unp.py:
+ Remove obsolete intermediate certificate
+
+ The portal.nalog.gov.by web no longer has an incomplete
+ certificate chain.
+
+2023-08-20 Arthur de Jong
+
+ * [7761e42] stdnum/numdb.py: Use importlib.resource in place of
+ deprecated pkg_resources
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/412
+ Closes https://github.com/arthurdejong/python-stdnum/pull/413
+
+2023-08-20 Arthur de Jong
+
+ * [f6edcc5] tests/test_do_rnc.py: Avoid the deprecated
+ assertRegexpMatches function
+
+2023-08-20 Arthur de Jong
+
+ * [895f092] setup.cfg: Rename license_file option in setup.cfg
+
+ It seems the old option wasn't working with all versions of
+ setuptools anyway.
+
+ See
+ https://setuptools.pypa.io/en/latest/userguide/declarative_config.html
+
+2023-08-20 Arthur de Jong
+
+ * [3126f96] stdnum/by/unp.py, tests/test_by_unp.py: Update Belarusian
+ UNP online check
+
+ The API for the online check for Belarusian UNP numbers at
+ https://www.portal.nalog.gov.by/grp/getData has changed some
+ small details of the API.
+
+2023-08-20 Arthur de Jong
+
+ * [88d1dca] tests/test_de_handelsregisternummer.py: Replace test
+ number for German company registry
+
+ The number seems to be no longer valid breaking the online tests.
+
+2023-08-20 Arthur de Jong
+
+ * [6e56f3c] stdnum/at/postleitzahl.dat, stdnum/be/banks.dat,
+ stdnum/cn/loc.dat, stdnum/gs1_ai.dat, stdnum/iban.dat,
+ stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat,
+ stdnum/nz/banks.dat, stdnum/oui.dat, tests/test_be_iban.doctest,
+ update/oui.py: Update database files
+
+ This also modifies the OUI update script because the website
+ has changed to HTTPS and is sometimes very slow.
+
+ The Belgian Commerzbank no longer has a registration and a bank
+ account number in the tests used that bank.
+
+2023-08-20 Arthur de Jong
+
+ * [0aa0b85] update/eu_nace.py: Remove EU NACE update script
+
+ The website that publishes the NACE catalogue has changed and
+ a complete re-write of the script would be necessary. The data
+ file hasn't changed since 2017 so is also unlikely to change
+ until it is going to be replaced by NACE rev. 2.1 in 2025.
+
+ See https://ec.europa.eu/eurostat/web/nace
+
+ The NACE rev 2 specification can now be found here:
+ https://showvoc.op.europa.eu/#/datasets/ESTAT_Statistical_Classification_of_Economic_Activities_in_the_European_Community_Rev._2/data
+
+ The NACE rev 2.1 specification can now be found here:
+ https://showvoc.op.europa.eu/#/datasets/ESTAT_Statistical_Classification_of_Economic_Activities_in_the_European_Community_Rev._2.1._%28NACE_2.1%29/data
+
+ In both cases a ZIP file with RDF metadata can be downloaded
+ (but the web applciation also exposes some simpler JSON APIs).
+
+2023-08-13 Arthur de Jong
+
+ * [f58e08d] stdnum/eu/oss.py, stdnum/eu/vat.py,
+ tests/test_eu_oss.doctest, tests/test_eu_vat.doctest: Validate
+ European VAT numbers with EU or IM prefix
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/417
+
+2023-06-30 Blaž Bregar
+
+ * [d0f4c1a] stdnum/si/__init__.py, stdnum/si/maticna.py,
+ tests/test_si_maticna.doctest: Add Slovenian Corporate Registration
+ Number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/414
+
+2023-08-06 Arthur de Jong
+
+ * [b8ee830] .github/workflows/test.yml, scripts/check_headers.py,
+ tox.ini: Extend license check to file header check
+
+ This also checks that the file name referenced in the file header
+ is correct.
+
+2023-08-06 Arthur de Jong
+
+ * [ef49f49] stdnum/be/bis.py, stdnum/be/nn.py,
+ stdnum/de/stnr.py, stdnum/dz/nif.py, stdnum/fi/alv.py,
+ stdnum/gb/utr.py, stdnum/hr/oib.py, stdnum/md/idno.py,
+ stdnum/pl/regon.py, stdnum/py/ruc.py, stdnum/sk/dph.py,
+ stdnum/tn/mf.py, stdnum/ua/edrpou.py, stdnum/ua/rntrc.py,
+ stdnum/vn/mst.py, stdnum/za/idnr.py, tests/test_al_nipt.doctest,
+ tests/test_gb_sedol.doctest, tests/test_iso6346.doctest,
+ tests/test_iso7064.doctest, tests/test_th_moa.doctest,
+ tests/test_tn_mf.doctest, tests/test_ve_rif.doctest: Fix file
+ headers
+
+ This improves consistency across files and fixes some files that
+ had an incorrect file name reference.
+
+2023-07-30 Arthur de Jong
+
+ * [3848318] stdnum/ca/sin.py: Validate first digit of Canadian SIN
+
+ See
+ http://www.straightlineinternational.com/docs/vaildating_canadian_sin.pdf
+ See
+ https://lists.arthurdejong.org/python-stdnum-users/2023/msg00000.html
+
+2023-06-20 Jeff Horemans
+
+ * [be33a80] stdnum/be/bis.py, stdnum/be/nn.py,
+ tests/test_be_bis.doctest, tests/test_be_nn.doctest: Add Belgian
+ BIS Number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/418
+
+2023-06-19 Arthur de Jong
+
+ * [8ce4a47] .github/workflows/test.yml: Run Python 2.7 tests in
+ a container for GitHub Actions
+
+ See https://github.com/actions/setup-python/issues/672
+
+2023-06-13 Jeff Horemans
+
+ * [311fd56] stdnum/be/nn.py, tests/test_be_nn.doctest: Handle
+ (partially) unknown birthdate of Belgian National Number
+
+ This adds documentation for the special cases regarding birth
+ dates embedded in the number, allows for date parts to be unknown
+ and adds functions for getting the year and month.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/416
+
+2023-06-01 Chales Horn
+
+ * [7d3ddab] stdnum/isbn.py, stdnum/issn.py: Minor ISSN and ISBN
+ documentation fixes
+
+ Fix a comment that claimed incorrect ISSN length and use slightly
+ more consistent terminology around check digits in ISSN and ISBN.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/415
+
+2023-05-12 Arthur de Jong
+
+ * [90044e2] .github/workflows/test.yml,
+ scripts/check_license_headers.py, tox.ini: Add automated checking
+ for correct license header
+
+2023-01-28 Leandro Regueiro
+
+ * [62d15e9] stdnum/gn/__init__.py, stdnum/gn/nifp.py,
+ tests/test_gn_nifp.doctest: Add support for Guinea TIN
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/384
+ Closes https://github.com/arthurdejong/python-stdnum/pull/386
+
+2023-02-24 Victor
+
+ * [96abcfe] stdnum/es/postal_code.py: Add Spanish postcode validator
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/401
+
+2023-02-13 mjturt
+
+ * [36858cc] stdnum/fi/hetu.py, tests/test_fi_hetu.doctest: Add
+ support for Finland HETU new century indicating signs
+
+ More information at
+ https://dvv.fi/en/reform-of-personal-identity-code
+
+ Cloess https://github.com/arthurdejong/python-stdnum/pull/396
+
+2023-01-05 Jeff Horemans
+
+ * [42d2792] stdnum/be/nn.py, tests/test_be_nn.doctest: Add
+ functionality to get gender from Belgian National Number
+
+ This also extends the documentation for the number.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/347/files
+
+2023-03-06 RaduBorzea <101399404+RaduBorzea@users.noreply.github.com>
+
+ * [cf14a9f] stdnum/ro/cnp.py: Add get_county() function to
+ Romanian CNP
+
+ This also validates the county part of the number.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/407
+
+2023-03-19 Arthur de Jong
+
+ * [a8b6573] docs/conf.py, setup.cfg, tox.ini: Ensure flake8 is
+ run on all Python files
+
+ This also fixes code style fixes in the Sphinx configuration file.
+
+2023-03-18 Arthur de Jong
+
+ * [7af50b7] .github/workflows/test.yml, setup.py, tox.ini: Add
+ support for Python 3.11
+
+2023-03-18 Arthur de Jong
+
+ * [8498b37] stdnum/gs1_128.py: Fix date formatting on PyPy 2.7
+
+ The original way of calling strftime was likely an artifact of
+ Python 2.6 support.
+
+ Fixes 7e84c05
+
+2023-03-18 Arthur de Jong
+
+ * [7e84c05] stdnum/gs1_128.py, stdnum/gs1_ai.dat,
+ tests/test_gs1_128.doctest, update/gs1_ai.py: Extend date parsing
+ in GS1-128
+
+ Some new AIs have new date formats or have changed the way
+ optional components of formats are defined.
+
+2023-03-09 Dimitri Papadopoulos
+<3234522+DimitriPapadopoulos@users.noreply.github.com>
+
+ * [bf1bdfe] stdnum/iban.dat: Update IBAN database file
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/409
+
+2023-03-18 Arthur de Jong
+
+ * [a09a7ce] stdnum/al/nipt.py, tests/test_al_nipt.doctest: Fix
+ Albanian tax number validation
+
+ This extends the description of the Albanian NIPT (NUIS) number
+ with information on the structure of the number. The first
+ character was previously limited between J and L but this letter
+ indicates a decade and the number is also used for individuals
+ to where it indicates a birth date.
+
+ Thanks Julien Launois for pointing this out.
+
+ Source:
+ https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Albania-TIN.pdf
+
+ Fixes 3db826c Closes
+ https://github.com/arthurdejong/python-stdnum/pull/402
+
+2023-03-13 Ali-Akber Saifee
+
+ * [031a249] stdnum/sg/uen.py: Fix typo in UEN docstring
+
+2023-01-02 Arthur de Jong
+
+ * [cf22705] online_check/stdnum.wsgi, tox.ini: Extend number
+ properties to show in online check
+
+ This also ensures that flake8 is run on the WSGI script.
+
+2022-10-09 Leandro Regueiro
+
+ * [6d366e3] stdnum/eg/__init__.py, stdnum/eg/tn.py,
+ tests/test_eg_tn.doctest: Add support for Egypt TIN
+
+ This also convertis Arabic digits to ASCII digits.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/225
+ Closes https://github.com/arthurdejong/python-stdnum/pull/334
+
+2022-12-30 Arthur de Jong
+
+ * [b1dc313] CONTRIBUTING.md, docs/contributing.rst, docs/index.rst:
+ Add initial CONTRIBUTING.md file
+
+ Initial description of the information needed for adding new
+ number formats and some coding and testing guidelines.
+
+2022-12-05 Dimitri Papadopoulos
+<3234522+DimitriPapadopoulos@users.noreply.github.com>
+
+ * [df894c3] stdnum/ch/uid.py, stdnum/gh/tin.py: Fix typos found
+ by codespell
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/344
+
+2022-12-12 Arthur de Jong
+
+ * [4f8155c] .github/workflows/test.yml: Run Python 3.5 and 3.6
+ GitHub tests on older Ubuntu
+
+ The ubuntu-latest now points to ubuntu-22.04 instead of
+ ubuntu-20.04 before.
+
+ This also switches the PyPy version to test with to 3.9.
+
+2022-11-29 valeriko
+
+ * [74d854f] stdnum/ee/ik.py: Fix a typo
+
+ Clocses https://github.com/arthurdejong/python-stdnum/pull/341
+
+2022-11-28 Arthur de Jong
+
+ * [7a91a98] tox.ini: Avoid newer flake8
+
+ The new 6.0.0 contains a number of backwards incompatible changes
+ for which plugins need to be updated and configuration needs to
+ be updated.
+
+ Sadly the maintainer no longer accepts contributions or discussion
+ See https://github.com/PyCQA/flake8/issues/1760
+
+2022-11-13 Arthur de Jong
+
+ * [60a90ed] ChangeLog, NEWS, README.md, docs/index.rst,
+ docs/stdnum.be.nn.rst, docs/stdnum.cfi.rst,
+ docs/stdnum.cz.bankaccount.rst, docs/stdnum.dz.nif.rst,
+ docs/stdnum.fo.vn.rst, docs/stdnum.gh.tin.rst,
+ docs/stdnum.ke.pin.rst, docs/stdnum.ma.ice.rst,
+ docs/stdnum.me.pib.rst, docs/stdnum.mk.edb.rst,
+ docs/stdnum.pk.cnic.rst, docs/stdnum.si.emso.rst,
+ docs/stdnum.tn.mf.rst, stdnum/__init__.py, stdnum/gh/tin.py,
+ tox.ini: Get files ready for 1.18 release
+
+2022-11-13 Arthur de Jong
+
+ * [31b2694] stdnum/at/postleitzahl.dat, stdnum/be/banks.dat,
+ stdnum/cn/loc.dat, stdnum/eu/nace.dat, stdnum/gs1_ai.dat,
+ stdnum/imsi.dat, stdnum/isbn.dat, stdnum/nz/banks.dat,
+ stdnum/oui.dat: Update database files
+
+2022-11-13 Arthur de Jong
+
+ * [f691bf7] stdnum/de/handelsregisternummer.py,
+ tests/test_de_handelsregisternummer.py: Update German
+ OffeneRegister lookup data format
+
+ It appears that the data structure at OffeneRegister has changed
+ which requires a different query. Data is returned in a different
+ structure.
+
+2022-11-13 Arthur de Jong
+
+ * [5cdef0d] update/cn_loc.py: Increase timeout for CN Open Data
+ download
+
+ It seems that raw.githubusercontent.com can be extremely slow.
+
+2022-11-13 Arthur de Jong
+
+ * [580d6e0] update/my_bp.py: Pick up custom certificate from
+ script path
+
+ This ensures that the script can be run from any directory.
+
+ Fixes c4ad714
+
+2022-09-06 Leandro Regueiro
+
+ * [7348c7a] tests/test_vatin.doctest: vatin: Add a few more tests
+ for is_valid
+
+ See https://github.com/arthurdejong/python-stdnum/pull/316
+
+2022-11-13 Arthur de Jong
+
+ * [fa62ea3] stdnum/pk/__init__.py, stdnum/pk/cnic.py,
+ tests/test_pk_cnic.doctest: Add Pakistani ID card number
+
+ Based on the implementation provided by Quantum Novice (Syed
+ Haseeb Shah).
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/306
+ Closes https://github.com/arthurdejong/python-stdnum/issues/304
+
+2022-10-16 Blaž Bregar
+
+ * [feccaff] stdnum/si/__init__.py, stdnum/si/emso.py,
+ tests/test_si_emso.doctest: Add support for Slovenian EMŠO
+ (Unique Master Citizen Number)
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/338
+
+2022-11-12 Arthur de Jong
+
+ * [74cc981] stdnum/cz/bankaccount.py, stdnum/nz/bankaccount.py,
+ tox.ini, update/iban.py: Ensure we always run flake8-bugbear
+
+ This assumes that we no longer use Python 2.7 for running the
+ flake8 tests any more.
+
+2022-11-12 Arthur de Jong
+
+ * [a03ac04] stdnum/cz/bankaccount.py,
+ stdnum/es/referenciacatastral.py, stdnum/lei.py, stdnum/nl/bsn.py:
+ Use HTTPS in URLs where possible
+
+2022-10-23 Leandro Regueiro
+
+ * [8e76cd2] stdnum/cr/cpf.py: Pad with zeroes in a more readable
+ manner
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/340
+
+2022-11-12 Arthur de Jong
+
+ * [45f098b] stdnum/exceptions.py: Make all exceptions inherit
+ from ValueError
+
+ All the validation exceptions (subclasses of ValidationError)
+ are raised when a number is provided with an inappropriate value.
+
+2022-11-12 Arthur de Jong
+
+ * [a218032] stdnum/ch/uid.py, tests/test_ch_uid.py: Add a check_uid()
+ function to the stdnum.ch.uid module
+
+ This function can be used to performa a lookup of organisation
+ information by the Swiss Federal Statistical Office web service.
+
+ Related to https://github.com/arthurdejong/python-stdnum/issues/336
+
+2022-11-12 Arthur de Jong
+
+ * [1364e19] stdnum/cusip.py, tests/test_cusip.doctest: Support
+ "I" and "O" in CUSIP number
+
+ It is unclear why these letters were considered invalid at the
+ time of the implementation.
+
+ This also reduces the test set a bit while still covering
+ most cases.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/337
+
+2022-10-23 Arthur de Jong
+
+ * [f972894] online_check/stdnum.wsgi: Switch to escape() from html
+
+ The function was removed from the cgi module in Python 3.8.
+
+2022-10-23 Arthur de Jong
+
+ * [c5d3bf4] online_check/stdnum.wsgi: Switch to parse_qs() from
+ urllib.parse
+
+ The function was removed from the cgi module in Python 3.8.
+
+2022-10-19 Arthur de Jong
+
+ * [8b5b07a] stdnum/casrn.py: Remove unused import
+
+ Fixes 09d595b
+
+2022-10-19 Arthur de Jong
+
+ * [09d595b] stdnum/casrn.py: Improve validation of CAS Registry
+ Number
+
+ This ensures that a leading 0 is treated as invalid.
+
+2022-10-19 Arthur de Jong
+
+ * [7c2153e] stdnum/cas.py: Remove duplicate CAS Registry Number
+
+ The recently added stdnum.cas module was already available as
+ teh stdnum.casrn module.
+
+ Reverts acb6934
+
+2022-10-19 Arthur de Jong
+
+ * [1003033] tests/test_no_fodselsnummer.doctest: Update
+ Fødselsnummer test case for date in future
+
+ The future was now. This problem was pushed forwards to October
+ 2039.
+
+2022-10-15 Arthur de Jong
+
+ * [1636045] tox.ini: Support running tests with PyPy 2.7
+
+ This also applies the fix from cfc80c8 from Python 2.7 to PyPy.
+
+2022-09-11 Leandro Regueiro
+
+ * [7be2291] stdnum/gh/__init__.py, stdnum/gh/tin.py,
+ tests/test_gh_tin.doctest: Add support for Ghana TIN
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/326
+ Closes https://github.com/arthurdejong/python-stdnum/issues/262
+
+2022-10-15 Arthur de Jong
+
+ * [acb6934] stdnum/cas.py: Add CAS Registry Number
+
+2022-09-18 Leandro Regueiro
+
+ * [2b6e087] stdnum/me/__init__.py, stdnum/me/pib.py,
+ tests/test_me_pib.doctest: Add support for Montenegro TIN
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/331
+ Closes https://github.com/arthurdejong/python-stdnum/issues/223
+
+2022-09-10 Leandro Regueiro
+
+ * [fbe094c] stdnum/fo/__init__.py, stdnum/fo/vn.py,
+ tests/test_fo_vn.doctest: Add Faroe Islands V-number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/323
+ Closes https://github.com/arthurdejong/python-stdnum/issues/219
+
+2022-09-17 Leandro Regueiro
+
+ * [a261a93] stdnum/mk/__init__.py, stdnum/mk/edb.py,
+ tests/test_mk_edb.doctest: Add North Macedonian ЕДБ
+
+ Note that this is implementation is mostly based
+ on unofficial sources describing the format,
+ which match the hundreds of examples found online.
+ https://forum.it.mk/threads/modularna-kontrola-na-embg-edb-dbs-itn.15663/?__cf_chl_tk=Op2PaEIauip6Z.ZjvhP897O8gRVAwe5CDAVTpjx1sEo-1663498930-0-gaNycGzNCRE#post-187048
+
+ Also note that the algorithm for the check digit was tested on
+ all found examples, and it doesn't work for all of them, despite
+ those failing examples don't seem to be valid according to the
+ official online search.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/330
+ Closes https://github.com/arthurdejong/python-stdnum/issues/222
+
+2022-09-23 Dimitri Papadopoulos
+<3234522+DimitriPapadopoulos@users.noreply.github.com>
+
+ * [eff3f52] stdnum/cn/ric.py, stdnum/ma/ice.py: Fix a couple typos
+ found by codespell
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/333
+
+2022-09-04 Leandro Regueiro
+
+ * [31709fc] stdnum/dz/__init__.py, stdnum/dz/nif.py,
+ tests/test_dz_nif.doctest: Add Algerian NIF number
+
+ This currently only checks the length and whether it only
+ contains digits because little could be found on the structure
+ of the number of whether there are any check digits.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/313
+ Closes https://github.com/arthurdejong/python-stdnum/issues/307
+
+2022-09-03 Leandro Regueiro
+
+ * [2907676] stdnum/ma/__init__.py, stdnum/ma/ice.py,
+ tests/test_ma_ice.doctest: Add support for Morocco TIN
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/226
+ Closes https://github.com/arthurdejong/python-stdnum/pull/312
+
+2022-08-08 Leandro Regueiro
+
+ * [d70549a] stdnum/ke/__init__.py, stdnum/ke/pin.py,
+ tests/test_ke_pin.doctest: Add Kenyan TIN
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/300
+ Closes https://github.com/arthurdejong/python-stdnum/pull/310
+
+2022-09-06 Leandro Regueiro
+
+ * [dd70cd5] stdnum/tn/__init__.py, stdnum/tn/mf.py,
+ tests/test_tn_mf.doctest: Add support for Tunisia TIN
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/317
+ Closes https://github.com/arthurdejong/python-stdnum/issues/309
+
+2022-08-15 Arthur de Jong
+
+ * [e40c827] tests/test_eu_vat.py: Update EU VAT Vies test with
+ new number
+
+ The number used before was apparently no longer valid.
+
+2022-08-15 Arthur de Jong
+
+ * [5bcc460] stdnum/de/handelsregisternummer.py: Fix German
+ OffeneRegister company registry URL
+
+2022-08-15 Arthur de Jong
+
+ * [ee9dfdf] stdnum/at/postleitzahl.dat, stdnum/be/banks.dat,
+ stdnum/cfi.dat, stdnum/cn/loc.dat, stdnum/eu/nace.dat,
+ stdnum/gs1_ai.dat, stdnum/iban.dat, stdnum/imsi.dat,
+ stdnum/isbn.dat, stdnum/isil.dat, stdnum/my/bp.dat,
+ stdnum/nz/banks.dat, stdnum/oui.dat: Update database files
+
+2022-08-15 Arthur de Jong
+
+ * [6b39c3d] update/nz_banks.py: Do not print trailing space
+
+2022-08-15 Arthur de Jong
+
+ * [e901ac7] update/my_bp.py: Ignore invalid downloaded country codes
+
+ The page currently lists a country without a country code (is
+ listed as "-"). This also ensures that lists of country codes
+ are handled consistently.
+
+2022-08-15 Arthur de Jong
+
+ * [2cf78c2] update/imsi.py: Update names of Wikipedia pages with
+ IMSI codes
+
+2022-08-15 Arthur de Jong
+
+ * [975d508] update/at_postleitzahl.py, update/be_banks.py,
+ update/cfi.py, update/cn_loc.py, update/cz_banks.py,
+ update/do_whitelists.py, update/eu_nace.py, update/gs1_ai.py,
+ update/iban.py, update/imsi.py, update/isbn.py, update/isil.py,
+ update/my_bp.py, update/nz_banks.py, update/oui.py: Provide a
+ timeout to all download scripts
+
+2022-08-15 Arthur de Jong
+
+ * [ed37a6a] stdnum/isil.py, update/isil.py: Update ISIL download URL
+
+2022-08-13 Christian Clauss
+
+ * [8aa6b5e] .github/workflows/test.yml: Remove redundant steps
+ with tox_job
+
+ This also switches the other Tox jobs to use the latest Python
+ 3.x interpreter.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/305
+
+2022-08-03 Romuald R
+
+ * [ce9322c] stdnum/de/handelsregisternummer.py,
+ tests/test_de_handelsregisternummer.doctest: Add extra court
+ alias for german Handelsregisternummer
+
+ Charlottenburg (Berlin) is a valid court representation for Berlin
+ (Charlottenburg).
+
+ See
+ https://www.northdata.com/VRB+Service+GmbH,+Berlin/Amtsgericht+Charlottenburg+%28Berlin%29+HRB+103587+B
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/298
+
+2022-08-15 Arthur de Jong
+
+ * [eae1dd2] stdnum/ch/esr.py, stdnum/il/idnr.py, stdnum/isin.py,
+ stdnum/nl/bsn.py, stdnum/no/kontonr.py, stdnum/nz/ird.py,
+ stdnum/ro/cui.py: Use str.zfill() for padding leading zeros
+
+2022-06-08 petr.prikryl
+
+ * [c5595c7] stdnum/cz/bankaccount.py, stdnum/cz/banks.dat,
+ tests/test_cz_bankaccount.doctest, update/cz_banks.py: Add Czech
+ bank account numbers
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/295
+ Closes https://github.com/arthurdejong/python-stdnum/pull/296
+
+2022-08-06 vovavili <64227274+vovavili@users.noreply.github.com>
+
+ * [4d4a0b3] stdnum/isin.py: Fix small typo
+
+ Improper inflection of plurals.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/299
+
+2022-08-13 Arthur de Jong
+
+ * [7ee0563] setup.cfg, stdnum/ad/nrt.py, stdnum/cr/cpj.py,
+ stdnum/eu/nace.py, stdnum/id/npwp.py, stdnum/il/hp.py,
+ stdnum/it/aic.py, stdnum/li/peid.py, stdnum/nz/ird.py,
+ stdnum/sg/uen.py, stdnum/sv/nit.py, stdnum/za/tin.py,
+ update/eu_nace.py: Put long line flake8 ignores in files instead
+ of globally
+
+ We have some long URLs in the code (mostly in docstrings) and
+ wrapping them does not improve readability (and is difficult
+ in docstrings) so the E501 ignore is now put inside each file
+ instead of globally.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/302
+
+2022-08-13 Arthur de Jong
+
+ * [351be74] .github/workflows/test.yml, setup.py, tox.ini: Add
+ support for Python 3.10
+
+2022-08-08 Christian Clauss
+
+ * [b36c0d6] .github/workflows/test.yml: Upgrade GitHub Actions
+
+ Update checkout to v3 (no relevant changes) and setup-python to v4
+ (changes the names for pypy versions).
+
+2022-08-12 Arthur de Jong
+
+ * [9f79691] stdnum/it/iva.py, update/iban.py: Fix flake8 error
+
+ This stops using not as a function and hopefully also makes the
+ logic clearer.
+
+2022-07-04 Arthur de Jong
+
+ * [a280d53] .github/workflows/test.yml: Upgrade to CodeQL Action v2
+
+ https://github.blog/changelog/2022-04-27-code-scanning-deprecation-of-codeql-action-v1/
+
+2022-04-09 Arthur de Jong
+
+ * [8a28e38] setup.cfg, tox.ini: Switch from nose to pytest
+
+ Nose hasn't seen a release since 2015 and sadly doesn't work
+ with Python 3.10.
+
+ See https://github.com/nose-devs/nose/issues/1099
+
+2022-05-09 Arthur de Jong
+
+ * [e831d07] setup.cfg: Ignore flake8 complaining about print
+ statements
+
+ It seems that flake8 now uses T201 instead of T001 for this check.
+
+2022-04-08 Alexis de Lattre
+
+ * [7d81eac] stdnum/gs1_128.py, tests/test_gs1_128.doctest: Support
+ parsing dates without a day in GS1-128
+
+ Date such as '(17)260400' is now properly interpreted as April
+ 30th 2026.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/294
+
+2022-02-05 Cédric Krier
+
+ * [bda2a9c] stdnum/be/nn.py, tests/test_be_nn.doctest: Compute
+ birth date from Belgian National Number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/288
+
+2022-03-21 Arthur de Jong
+
+ * [e2a2774] stdnum/iso7064/mod_97_10.py, tests/test_iso7064.doctest:
+ Return check digits in 02-98 range for ISO 7064 Mod 97, 10
+
+ There are some valid ranges for check digits within ISO 7064
+ Mod 97, 10 that all result in a valid checksum. This changes the
+ calculated check digits to be in the range from 02 to 98 as is
+ specified for use in IBAN.
+
+ See
+ https://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/289
+
+2022-03-07 Cédric Krier
+
+ * [73f5e3a] stdnum/fr/siret.py, tests/test_fr_siret.doctest:
+ Support special validation of La Post SIRET
+
+ See
+ https://fr.wikipedia.org/wiki/Système_d'identification_du_répertoire_des_établissements#Exceptions_pour_le_groupe_La_Poste
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/293
+ Closes https://github.com/arthurdejong/python-stdnum/issues/291
+
+2022-02-14 Arthur de Jong
+
+ * [27c7c74] stdnum/cfi.py, tests/test_cfi.doctest: Fix Python 2.7
+ compatibility of the tests
+
+ Fixes a9039c1
+
+2022-02-14 Arthur de Jong
+
+ * [cfc80c8] tox.ini: Support running tests with Python 2.7
+
+ When using recent versions of virtualenv this ensures that
+ older versions of pip and setuptools will be used inside the
+ virtualenvs that are created by tox.
+
+2022-02-13 Arthur de Jong
+
+ * [a9039c1] stdnum/cfi.dat, stdnum/cfi.py, tests/test_cfi.doctest,
+ update/cfi.py: Add Classification of Financial Instruments
+
+ This implements parsing of ISO 10962 CFI codes based on the
+ published description of the structure of these numbers.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/283
+
+2022-02-13 Arthur de Jong
+
+ * [219ff54] stdnum/numdb.py, tests/numdb-test.dat: Fix problem in
+ numdb with missing sub-properties
+
+ If a numdb data file line contains multiple values or ranges
+ the sub-ranges were only applied to the last value in the range.
+
+2022-02-13 Arthur de Jong
+
+ * [fd32e61] setup.py: Also ensure that embedded certificates
+ are shipped
+
+2022-01-09 Arthur de Jong
+
+ * [02dec52] stdnum/mx/curp.py: Fix disabling check digit validation
+ of Mexican CURP
+
+ The validation functions supported an optional parameter to
+ disable check digit validation in the number that didn't actually
+ affect validation and was most likely accidentally copied from
+ the RFC module.
+
+ Fixes 50874a9 Closes
+ https://github.com/arthurdejong/python-stdnum/issues/285
+
+2021-11-29 Cédric Krier
+
+ * [dcf4730] stdnum/be/__init__.py, stdnum/be/nn.py: Add Belgian
+ National Number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/284
+
+2021-10-03 Arthur de Jong
+
+ * [50650a9] ChangeLog, NEWS, README.md, docs/index.rst,
+ docs/stdnum.in_.epic.rst, docs/stdnum.in_.gstin.rst,
+ docs/stdnum.isrc.rst, docs/stdnum.pt.cc.rst,
+ docs/stdnum.se.postnummer.rst, docs/stdnum.th.moa.rst,
+ docs/stdnum.th.pin.rst, docs/stdnum.th.tin.rst, stdnum/__init__.py:
+ Get files ready for 1.17 release
+
+2021-10-03 Arthur de Jong
+
+ * [0779d6a] stdnum/kr/brn.py, tests/test_kr_brn.py: Remove South
+ Korean BRN online check
+
+ The Korea Fair Trade Commission website now requires solving
+ a CAPTCHA before submitting the request so this is no longer
+ possible.
+
+2021-10-03 Arthur de Jong
+
+ * [61ebc9c] stdnum/no/orgnr.py: Add documentation for Norwegian
+ Organisasjonsnummer
+
+2021-10-03 Arthur de Jong
+
+ * [9da63a4] tests/test_do_cedula.py: Update Cedula online test value
+
+ Apparently the previously whitelisted value is no longer recognised
+ as a valid value by the DGII service.
+
+2021-10-03 Arthur de Jong
+
+ * [25c30d7] stdnum/by/portal.nalog.gov.by.crt: Update Let's Encrypt
+ R3 intermediate certificate
+
+ The portal.nalog.gov.by web site serves an incomplete certificate
+ chain and the certificate chain was changed.
+
+2021-10-03 Arthur de Jong
+
+ * [3406c24] MANIFEST.in, README.md, docs/index.rst, setup.py,
+ update/numlist.py: Rename README to README.md
+
+ Mostly to please GitHub.
+
+ See https://github.com/arthurdejong/python-stdnum/issues/280
+
+2021-10-03 Arthur de Jong
+
+ * [d5cba0a] stdnum/at/postleitzahl.dat, stdnum/be/banks.dat,
+ stdnum/cn/loc.dat, stdnum/eu/nace.dat, stdnum/gs1_ai.dat,
+ stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat, stdnum/isil.dat,
+ stdnum/nz/banks.dat, stdnum/oui.dat, update/gs1_ai.py: Update
+ database files
+
+2021-09-30 Gaurav Chauhan <71322586+vairag22@users.noreply.github.com>
+
+ * [26a7e7b] stdnum/in_/__init__.py, stdnum/in_/gstin.py: Add Indian
+ GSTIN (VAT number)
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/279
+
+2021-09-30 Gaurav Chauhan <71322586+vairag22@users.noreply.github.com>
+
+ * [ca560cd] stdnum/in_/epic.py: Add Indian EPIC number (Voter
+ ID number)
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/279
+
+2021-09-30 Gaurav Chauhan <71322586+vairag22@users.noreply.github.com>
+
+ * [fc56388] stdnum/in_/aadhaar.py, stdnum/in_/pan.py: Improve
+ validation and docstrings of Indian numbers
+
+ This ensures that an Aadhaar cannot be a palindrome and checks the
+ serial part of the PAN to not be all zeros. It also updates some
+ descriptions of PAN holder types and renames the card_holder_type
+ to just holder_type.
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/279
+
+2021-09-19 Arthur de Jong
+
+ * [1a0e613] stdnum/ec/ruc.py, tests/test_ec_ruc.doctest: Fix
+ detection of natural RUC values
+
+ A natural RUC is the CI plus an establishment number. Both the
+ natural RUC and the public RUC can have a third digit with the
+ value 6.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/267
+
+2021-08-20 michele
+
+ * [8071444] stdnum/se/__init__.py, stdnum/se/postnummer.py,
+ tests/test_se_postnummer.doctest: Add swedish postcode validator
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/271
+
+2021-02-21 Piruin Panichphol
+
+ * [424e408] stdnum/th/__init__.py, stdnum/th/moa.py,
+ stdnum/th/pin.py, stdnum/th/tin.py, tests/test_th_moa.doctest,
+ tests/test_th_pin.doctest, tests/test_th_tin.doctest: Add support
+ for Thai Numbers
+
+ - TIN Taxpayer Identification Number - PIN Personal Identification
+ Number - MOA Memorandum of Association Number
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/118
+ Closes https://github.com/arthurdejong/python-stdnum/pull/255
+
+2021-03-10 Nuno André
+
+ * [36d723c] stdnum/isrc.py, tests/test_isrc.doctest: Add ISRC
+ (International Standard Recording Code)
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/261
+
+2021-08-07 Dimitri Papadopoulos
+<3234522+DimitriPapadopoulos@users.noreply.github.com>
+
+ * [48bfd84] stdnum/ad/nrt.py, stdnum/bitcoin.py, stdnum/do/ncf.py,
+ stdnum/isbn.py, stdnum/util.py, stdnum/vn/mst.py,
+ tests/test_cusip.doctest, tests/test_de_idnr.doctest,
+ update/be_banks.py, update/imsi.py, update/isil.py,
+ update/numlist.py: Fix typos found by codespell
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/269
+
+2021-08-07 Dimitri Papadopoulos
+<3234522+DimitriPapadopoulos@users.noreply.github.com>
+
+ * [dcdb5c9] stdnum/exceptions.py: Explicilty define exported
+ exceptions
+
+ LGTM alert: Import pollutes the enclosing namespace
+ See: https://lgtm.com/rules/3980091/ Closes
+ https://github.com/arthurdejong/python-stdnum/pull/270
+
+2021-08-07 Dimitri Papadopoulos
+<3234522+DimitriPapadopoulos@users.noreply.github.com>
+
+ * [abda037] stdnum/no/fodselsnummer.py: Simplify range checking
+ in Norwegian birth numbers
+
+ LGTM alert: Test is always true See: https://lgtm.com/rules/900073/
+ Closes https://github.com/arthurdejong/python-stdnum/pull/270
+
+2021-08-07 Dimitri Papadopoulos
+<3234522+DimitriPapadopoulos@users.noreply.github.com>
+
+ * [c69b4f6] update/be_banks.py: Fix handling of empty worksheet
+ in Belgian bank download
+
+ LGTM alert: Call to next() in a generator
+ See: https://lgtm.com/rules/11000086/ Closes
+ https://github.com/arthurdejong/python-stdnum/pull/270
+
+2021-06-09 David Vaz
+
+ * [4516748] stdnum/pt/cc.py, tests/test_pt_cc.doctest: Add CC
+ (Número de Cartão de Cidadão, Portuguese Identity number)
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/265
+
+2021-06-10 FRANK ROBERTO CHAVEZ SOSA <1085268@est.intec.edu.do>
+
+ * [4c51860] stdnum/do/ncf.py: Add new e-CF types to Dominican
+ Republic NCF
+
+2021-01-18 Andres Rodriguez
+
+ * [48e6502] stdnum/do/ncf.py: Fix parsing of empty fields in
+ DGII checking
+
+2020-12-11 Cristopher Ortega
+
+ * [2b452b6] stdnum/do/ncf.py, tests/test_do_ncf.py: Add ENCF
+ validation support for Dominican Republic NCF
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/248
+
+2021-06-09 Dimitri Papadopoulos
+<3234522+DimitriPapadopoulos@users.noreply.github.com>
+
+ * [eeaf665] stdnum/fr/nif.py: Improve French NIF validation
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/266
+
+2021-07-12 Arthur de Jong
+
+ * [e2a95fc] .github/workflows/test.yml: Configure CodeQL code
+ scanning
+
+2021-07-18 Arthur de Jong
+
+ * [175b1e5] stdnum/exceptions.py: Ignore N818 because our exceptions
+ are not named error
+
+2021-04-11 Arthur de Jong
+
+ * [38c368d] stdnum/numdb.py, tests/numdb-test.dat: Only process
+ the shortest matches in the numdb module
+
+ This ensures that matching numbers is done consistently when
+ the numdb database file has conflicting information about the
+ length of numbers.
+
+ This also refactors the _find() function to be simpler and
+ reduces the number of recursive calls that have to be done.
+
+ The tests have been re-formatted to use pprint to make it easier
+ to spot differences if any of the tests fail (instead of just
+ saying expected True, got False).
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/257
+
+2021-04-11 Arthur de Jong
+
+ * [b7901d6] update/imsi.py: Stop non-operational MNCs from confusing
+ IMSI dataset
+
+ This only includes data from non-operational (status "Not
+ operational" according to Wikipedia) Mobile Network Code operators
+ in the generated data file if they would not confuse the lookup
+ of operational numbers.
+
+ This avoid problems when the "030" to "039" non-operational ranges
+ conflicting with the "03" operational range. This ensures that
+ only the "03" value is kept. For historical completeness we keep
+ the other non-operational values.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/257
+
+2021-03-03 Jakub Wilk
+
+ * [7e69090] docs/index.rst: Fix typo
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/258
+
+2021-03-21 Arthur de Jong
+
+ * [5785afb] .github/workflows/test.yml, .travis.yml: Replace Travis
+ with GitHub actions
+
+2021-03-21 Arthur de Jong
+
+ * [7c0bb84] .travis.yml, setup.py, tox.ini: Drop support for Python
+ 2.6 and 3.4
+
+ It is increasingly difficult to test with these versions of
+ Python and everybody should have upgraded to a more recent
+ version long ago.
+
+2021-02-06 Arthur de Jong
+
+ * [075d85e] ChangeLog, NEWS, stdnum/__init__.py: Get files ready
+ for 1.16 release
+
+2021-02-06 Arthur de Jong
+
+ * [fad3064] stdnum/by/portal.nalog.gov.by.crt: Add Let's Encrypt
+ R3 intermediate certificate
+
+ The portal.nalog.gov.by web site serves an incomplete certificate
+ chain and the intermediate certificate was changed.
+
+2021-02-06 Arthur de Jong
+
+ * [8c4ec55] stdnum/be/banks.dat, stdnum/cn/loc.dat,
+ stdnum/eu/nace.dat, stdnum/gs1_ai.dat, stdnum/imsi.dat,
+ stdnum/isbn.dat, stdnum/nz/banks.dat, stdnum/oui.dat: Update
+ database files
+
+2021-02-06 Arthur de Jong
+
+ * [fe34e15] stdnum/kr/rrn.py, stdnum/pe/ruc.py, stdnum/ua/edrpou.py:
+ Use HTTPS in URLs where possible
+
+2021-01-24 Arthur de Jong
+
+ * [407a02f] stdnum/at/postleitzahl.dat, update/at_postleitzahl.py:
+ Switch postal code download to Austrian open-data portal
+
+ This simplifies the process of downloading Austrian
+ postal codes by downloading a JSON blob instead from
+ https://www.data.gv.at/katalog/dataset/f76ed887-00d6-450f-a158-9f8b1cbbeebf
+
+ This filters the list to only use addressable (adressierbar)
+ postal codes because it matches the previous list.
+
+ Thanks Bernd Schlapsi for providing the pointer.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/235
+
+2021-01-21 Alexis de Lattre
+
+ * [53f13b4] stdnum/vatin.py, tests/test_vatin.doctest: Add support
+ for XI VAT numbers in vatin
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/251
+
+2021-01-21 Arthur de Jong
+
+ * [b93d695] stdnum/eu/vat.py, stdnum/gb/vat.py,
+ tests/test_eu_vat.doctest: Support xi country code for Northern
+ Ireland
+
+ While Great Brittain is no longer an EU member state some GB VAT
+ numbers are still valid if the company meets certain requirements.
+
+ See
+ https://www.gov.uk/government/publications/accounting-for-vat-on-goods-moving-between-great-britain-and-northern-ireland-from-1-january-2021/check-when-you-are-trading-under-the-northern-ireland-protocol-if-you-are-vat-registered-business
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/250
+
+2021-01-11 Arthur de Jong
+
+ * [6b7f209] ChangeLog, NEWS, README, docs/conf.py, docs/index.rst,
+ docs/stdnum.li.peid.rst, docs/stdnum.ro.cui.rst,
+ docs/stdnum.ua.edrpou.rst, docs/stdnum.ua.rntrc.rst,
+ stdnum/__init__.py, tox.ini: Get files ready for 1.15 release
+
+2021-01-11 Arthur de Jong
+
+ * [755eee7] .travis.yml: Simplify Travis matrix
+
+ This also ensures that supported Python interpreters are output
+ in order.
+
+2021-01-10 Arthur de Jong
+
+ * [a0c62ee] stdnum/at/postleitzahl.dat, stdnum/be/banks.dat,
+ stdnum/cn/loc.dat, stdnum/eu/nace.dat, stdnum/gs1_ai.dat,
+ stdnum/iban.dat, stdnum/imsi.dat, stdnum/isbn.dat,
+ stdnum/my/bp.dat, stdnum/nz/banks.dat, stdnum/oui.dat,
+ update/at_postleitzahl.py, update/my_bp.py, update/nz_banks.py:
+ Update database files
+
+2021-01-10 Arthur de Jong
+
+ * [df0623b] stdnum/by/unp.py, stdnum/do/ncf.py, stdnum/imsi.py,
+ stdnum/isbn.py, stdnum/meid.py, tox.ini: Drop pinning of isort
+ now flake8-isort has been fixed
+
+ This changes a few inline imports in the code to pass with the
+ new isort.
+
+ Reverts 291b831
+
+2021-01-10 Arthur de Jong
+
+ * [b202eee] stdnum/my/nric.py: Fix typo
+
+2021-01-10 Arthur de Jong
+
+ * [7e86331] setup.py: Add project URLs for PyPI
+
+2020-10-25 Leandro Regueiro
+
+ * [126496c] stdnum/ua/rntrc.py, tests/test_ua_rntrc.doctest:
+ Add support for Ukraine РНОКПП number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/242
+ Closes https://github.com/arthurdejong/python-stdnum/issues/117
+
+2020-10-25 Leandro Regueiro
+
+ * [b7b2af8] stdnum/ua/__init__.py, stdnum/ua/edrpou.py,
+ tests/test_ua_edrpou.doctest: Add support for Ukraine ЄДРПОУ
+ number
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/242
+ Closes https://github.com/arthurdejong/python-stdnum/issues/117
+
+2021-01-04 Viggo de Vries
+
+ * [0427b01] stdnum/eu/vat.py, tests/test_eu_vat.doctest,
+ tests/test_gb_vat.doctest: Remove GB from EU member states
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/246
+
+2021-01-10 Arthur de Jong
+
+ * [2f2c742] .travis.yml, setup.py, tox.ini: Add support for
+ Python 3.9
+
+ This switches Travis tests to bionic by default.
+
+2021-01-10 Arthur de Jong
+
+ * [2046f51] stdnum/damm.py, stdnum/eu/at_02.py, stdnum/gs1_128.py,
+ stdnum/iso7064/mod_11_10.py, stdnum/iso7064/mod_11_2.py,
+ stdnum/iso7064/mod_37_2.py, stdnum/iso7064/mod_37_36.py,
+ stdnum/iso7064/mod_97_10.py, stdnum/luhn.py, stdnum/util.py,
+ stdnum/verhoeff.py: Fix flake8 blind except Exception error
+
+2021-01-04 Viggo de Vries
+
+ * [cc3a970] stdnum/au/__init__.py: Use ABN as Australian VAT number
+
+ See https://www.ato.gov.au/Business/GST/Tax-invoices/
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/246
+
+2021-01-02 Arthur de Jong
+
+ * [c74e322] stdnum/vatin.py, tests/test_vatin.doctest: Support
+ VAT numbers that are only valid with country prefix
+
+ The Swish VAT number has the CH prefix embedded as a required
+ part of the number. This ensures that the international VAT
+ number module also supports that.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/245
+ Fixes ff188bd
+
+2020-10-27 Matthias Schmid, M.Sc
+
+ * [5082af4] stdnum/li/__init__.py, stdnum/li/peid.py,
+ tests/test_li_peid.doctest: Add Liechtenstein
+ Personenidentifikationsnummer
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/241
+ Closes https://github.com/arthurdejong/python-stdnum/issues/125
+
+2020-10-02 Jonas Geuens
+
+ * [3a592e4] stdnum/be/vat.py, tests/test_be_vat.doctest: Expanded
+ validation for BE VAT numbers
+
+ Specifically invalidated all-zero numbers
+
+ Closes https://github.com/arthurdejong/python-stdnum/pull/240
+
+2020-11-01 Arthur de Jong
+
+ * [c5eb2d8] stdnum/eu/vat.py, stdnum/ro/cf.py,
+ tests/test_eu_vat.doctest: Retain RO prefix in Romanian VAT numbers
+
+ This does not strip the RO prefix from Romanian VAT numbers to be
+ able to keep the distinction between a CUI/CIF that is registered
+ for VAT (which commonly has the RO prefix) and those that don't.
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/231
+
+2020-11-01 Arthur de Jong
+
+ * [1f6c77f] stdnum/ro/cnp.py, stdnum/ro/onrc.py: Minor updates
+
+2020-11-01 Arthur de Jong
+
+ * [e0417f6] stdnum/ro/cf.py, stdnum/ro/cui.py: Add Romanian
+ CUI/CIF number
+
+ This module separates the validation of numbers assigned to
+ companies (CUI or CIF) of those assigned to natural persons (CNP).
+
+2020-09-19 Arthur de Jong
+
+ * [19d3f70] stdnum/eu/vat.py: Make list of EU member states list
+ of public API
+
+ This provides stdnum.eu.vat.MEMBER_STATES. Note that Greece is
+ listed with a country code of "gr" while the prefix used in VAT
+ numbers is "el".
+
+ Closes https://github.com/arthurdejong/python-stdnum/issues/238
+
+2020-09-04 Arthur de Jong
+
+ * [992dc20] online_check/check.js,
+ online_check/jquery-1.7.1.js, online_check/jquery-1.7.1.min.js,
+ online_check/jquery-3.5.1.js, online_check/jquery-3.5.1.min.js,
+ online_check/jquery-3.5.1.min.map, online_check/template.html:
+ Upgrade jQuery to 3.5.1
+
+ This also runs eslint over check.js and fixes an issue from
+ the upgrade.
+
+2020-08-09 Arthur de Jong
+
+ * [3373938] ChangeLog, NEWS, README, docs/index.rst,
+ docs/stdnum.by.unp.rst, docs/stdnum.cn.uscc.rst,
+ docs/stdnum.gb.utr.rst, docs/stdnum.gs1_128.rst,
+ docs/stdnum.id.npwp.rst, docs/stdnum.il.hp.rst,
+ docs/stdnum.it.aic.rst, docs/stdnum.kr.brn.rst,
+ docs/stdnum.ro.onrc.rst, docs/stdnum.sg.uen.rst,
+ docs/stdnum.sv.nit.rst, docs/stdnum.tw.ubn.rst,
+ docs/stdnum.vatin.rst, docs/stdnum.vn.mst.rst,
+ docs/stdnum.za.idnr.rst, stdnum/__init__.py: Get files ready
+ for 1.14 release
+
2020-08-09 Arthur de Jong
* [40fcc24] stdnum/be/banks.dat, stdnum/cn/loc.dat,
diff --git a/MANIFEST.in b/MANIFEST.in
index ac3b4245..b718eaf2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,6 @@
-include README NEWS ChangeLog COPYING *.py tox.ini
+include README.md CONTRIBUTING.md NEWS ChangeLog COPYING *.py tox.ini
recursive-include tests *.doctest *.dat *.py
recursive-include docs *.rst *.py
recursive-include online_check *
recursive-include update README requirements.txt *.py
+recursive-include scripts *.py
diff --git a/NEWS b/NEWS
index ccd5d8a6..8eb60b3a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,233 @@
+changes from 2.1 to 2.2
+-----------------------
+
+* Add modules for the following number formats:
+
+ - VÖEN (Vergi ödəyicisinin eyniləşdirmə nömrəsi, Azerbaijan tax number)
+ (thanks Leandro Regueiro)
+ - Belgian OGM-VCS
+ (thanks Cédric Krier)
+ - Leitweg-ID, a buyer reference or routing identifier for electronic invoices
+ (thanks Tuukka Tolvanen)
+ - European Excise Number (thanks Cédric Krier)
+ - n° d'accise (French number to identify taxpayers of excise taxes)
+ (thanks Cédric Krier)
+ - RCS (French trade registration number for commercial companies)
+ (thanks Fabien MICHEL)
+ - NUIT (Número Único de Identificação Tributaria, Mozambique tax number)
+ (thanks Luca and Leandro Regueiro)
+ - NINEA (Numéro d'Identification Nationale des Entreprises et Associations, Senegal tax number)
+ (thanks Leandro Regueiro)
+
+* Fix handling of decimals in Application Identifiers (thanks zipus)
+* Update list of valid Chinese counties (thanks 电子旅人 and Luca)
+* Mark more Romanian CNP county codes as valid (thanks luella-s)
+* Support Latvian personal codes issued after 2017 (thanks José Luis López Pino)
+* Provide aliases for Estonian numbers (thanks Joni Saarinen)
+* Add validation of country code in BIC (thanks Luuk Gubbels)
+* Add function to convert a French VAT number into a SIREN (thanks Fabien MICHEL)
+* Add a function to format a French SIREN (thanks Fabien MICHEL)
+* Add extra validation of Belgian VAT numbers (thanks Antonio Ginestar)
+* Add support for nace revision 2.1 (thanks KathrinM)
+* Support the new Romanian ONRC format (thanks dotbit1)
+* Support new format for Brazilian CNPJ (thanks Cloves Oliveira)
+
+
+changes from 2.0 to 2.1
+-----------------------
+
+* Add python_requires to setup.py to avoid installation with older Python versions
+ (thanks Cédric Krier)
+* Remove superfluous modulus operation in Japanese Individual Number
+ (thanks Luca Sicurello)
+
+
+changes from 1.20 to 2.0
+------------------------
+
+* Only support Python 3.8 and newer (drop Python 2 support so major version bump)
+* Include type hints for mypy (thanks David Salvisberg)
+
+* Add modules for the following number formats:
+
+ - eID Number (Belgian electronic Identity Card Number) (thanks Jeff Horemans)
+ - SSN, INSZ, NISS (Belgian social security number) (thanks Jeff Horemans)
+ - CAE (Código de Actividad y Establecimiento, Spanish activity establishment code)
+ (thanks Quique Porta)
+ - NIK (Nomor Induk Kependudukan, Indonesian identity number)
+ - ISNI (International Standard Name Identifier) (thanks Henning Kage)
+ - IN (個人番号, kojin bangō, Japanese Individual Number) (thanks Luca Sicurello)
+ - Identiteitskaartnummer, Paspoortnummer (the Dutch passport number)
+ (thanks Jeff Horemans)
+ - ОГРН, OGRN, PSRN, ОГРНИП, OGRNIP (Russian Primary State Registration Number)
+ (thanks Ivan Stavropoltsev)
+
+* Fix Czech RČ check digit validation (thanks Jan Chaloupecky)
+* Support Ecuador public RUC with juridical format (thanks Leandro)
+* Allow Uruguay RUT numbers starting with 22
+* Add missing music industry ISRC country codes (thanks Victor Sordoillet)
+* Support 16 digit Indonesian NPWP numbers (thanks Chris Smola)
+* Adjust Swiss uid module to accept numbers without CHE prefix (thanks Jeff Horemans)
+* Update Irish PPS validator to support new numbers (thanks Olly Middleton)
+* Add missing vat alias for Thailand VAT number (thanks Leandro Regueiro)
+* Add more tests for the Verhoeff implementation
+* Ensure that certificate verification can be configured using the verify
+ argument when using web services
+* The check_dgii() and search_dgii() functions from the Dominican Republic Cedula
+ and RNC modules no longer work due to a change in the DGII online web service
+* Various small code cleanups (thanks David Salvisberg)
+* Various small fixes to update scripts
+* The stdnum.util.to_unicode() function is now deprecated and will be removed
+ in an upcoming release
+
+
+changes from 1.19 to 1.20
+-------------------------
+
+* Add modules for the following number formats:
+ - BC PHN (British Columbia Personal Health Number) (thanks Ömer Boratav)
+ - EC Number (European Community number) (thanks Daniel Weber)
+ - VID (Indian personal virtual identity number) (thanks Atul Deolekar)
+
+* Fix typo in German Umsatzsteur Identifikationnummer (thanks Александр Кизеев)
+* Ensure EU VAT numbers don't accept duplicate country codes
+* Fix vatin number compacting for "EU" VAT numbers (thanks Davide Walder)
+* Add check digit validation to French NIF (thanks Kevin Dagostino)
+* Fix Ukrainian EDRPOU check digit calculation (thanks sector119)
+
+
+changes from 1.18 to 1.19
+-------------------------
+
+* Add modules for the following number formats:
+
+ - Tax Registration Number (الرقم الضريبي, Egypt tax number) (thanks Leandro Regueiro)
+ - Postcode (the Spanish postal code) (thanks Víctor)
+ - NIFp (Numéro d'Identification Fiscale Permanent, Guinea tax number)
+ (thanks Leandro Regueiro)
+ - BIS (Belgian BIS number) (thanks Jeff Horemans)
+ - Matična številka poslovnega registra (Corporate Registration Number) (thanks Blaž Bregar)
+ - OSS (European VAT on e-Commerce - One Stop Shop) (thanks Sergi Almacellas Abellana)
+
+* Extend the validation of the Albanian NIPT (NUIS) number (thanks Julien Launois)
+* Support different date formats in parsing GS1-128 application identifiers
+* Add get_county() function to Romanian CNP (thanks RaduBorzea)
+* Add functionality to get gender from Belgian National Number (thanks Jeff Horemans)
+* Add support for Finland HETU new century indicating signs (thanks Maks Turtiainen)
+* Add functionality to get (partial) birth date from Belgian National Number
+ (thanks Jeff Horemans)
+* Extend validation of Canadian SIN (thanks Marcel Lecker)
+* Fix Belarusian UNP online validation
+* Various typo and documentation fixes (thanks valeriko, Dimitri Papadopoulos,
+ Ali-Akber Saifee and Chales Horn)
+* Add contribution information to documentation
+* Test suite improvements (including checking file headers)
+
+
+changes from 1.17 to 1.18
+-------------------------
+
+* Add modules for the following number formats:
+
+ - NN, NISS (Belgian national number) (thanks Cédric Krier)
+ - CFI (ISO 10962 Classification of Financial Instruments)
+ - Czech bank account number (thanks Petr Přikryl)
+ - NIF, sometimes N.I.F. (Numéro d'Identification Fiscale, Algeria tax number)
+ (thanks Leandro Regueiro)
+ - V-number (Vinnutal, Faroe Islands tax number) (thanks Leandro Regueiro)
+ - TIN (Taxpayer Identification Number, Ghana tax number) (thanks Leandro Regueiro)
+ - PIN (Personal Identification Number, Kenya tax number) (thanks Leandro Regueiro)
+ - ICE (Identifiant Commun de l’Entreprise, التعريف الموحد للمقاولة, Morocco tax number)
+ (thanks Leandro Regueiro)
+ - PIB (Poreski Identifikacioni Broj, Montenegro tax number) (thanks Leandro Regueiro)
+ - ЕДБ (Едниствен Даночен Број, North Macedonia tax number) (thanks Leandro Regueiro)
+ - CNIC number (Pakistani Computerised National Identity Card number)
+ (thanks Syed Haseeb Shah)
+ - Enotna matična številka občana (Unique Master Citizen Number)
+ (thanks Blaž Bregar)
+ - MF (Matricule Fiscal, Tunisia tax number) (thanks Leandro Regueiro)
+
+* Fix disabling check digit validation of Mexican CURP (thanks guyskk)
+* Support special validation of La Post SIRET (thanks BIGBen99 and Cédric Krier)
+* Fix support for "I" and "O" in CUSIP number (thanks Thomas Kavanagh)
+* Calculate ISO 7064 Mod 97, 10 check digits in the range 02-98 for IBAN
+ (thanks David Svenson)
+* Fix German OffeneRegister lookups (change of URL and of data structure)
+* Add extra court alias for Berlin in German Handelsregisternummer (thanks Romuald R)
+* Ensure certificate for the Belarus VAT number check_nalog() lookup is included
+* Support parsing incomplete dates in GS1-128 (thanks Alexis de Lattre)
+* Improve validation of CAS Registry Number
+* Typo fixes (thanks Vladimir and Dimitri Papadopoulos)
+* Add a check_uid() function to the stdnum.ch.uid module
+* All validation exceptions should now inherit from ValueError
+* Switch from nose to pytest as test runner
+
+
+changes from 1.16 to 1.17
+-------------------------
+
+* Add modules for the following number formats:
+
+ - EPIC (Electoral Photo Identity Card, Indian Voter ID)
+ (thanks Gaurav Chauhan)
+ - GSTIN (Goods and Services Tax identification number, Indian VAT number)
+ (thanks Gaurav Chauhan)
+ - ISRC (International Standard Recording Code) (thanks Nuno André)
+ - CC (Número de Cartão de Cidadão, Portuguese Identity number)
+ (thanks David Vaz)
+ - Postcode (the Swedish postal code) (thanks Michele Ciccozzi)
+ - MOA (Thailand Memorandum of Association Number) (thanks Piruin Panichphol)
+ - PIN (Thailand Personal Identification Number) (thanks Piruin Panichphol)
+ - TIN (Thailand Taxpayer Identification Number) (thanks Piruin Panichphol)
+
+* Add ENCF validation support for Dominican Republic NCF
+ (thanks Cristopher Ortega)
+* Add new e-CF types to Dominican Republic NCF (thanks Frank Roberto Chavez Sosa)
+* Improve French NIF validation (thanks Dimitri Papadopoulos)
+* Drop support for Python 2.6 and 3.4
+* Fix parsing of empty fields in Dominican Republic DGII checking
+ (thanks Andres Rodriguez)
+* Fix handling of empty worksheet in Belgian bank download
+ (thanks Dimitri Papadopoulos)
+* Fix detection of natural RUC values (thanks Victor Rodriguez)
+* Fix Belarus VAT number online lookup again
+* Fixes for problems with loading IMSI data from Wikipedia and dealing with
+ inconsistencies
+* Remove South Korean BRN Fair Trade Commission website check due to CAPTCHA
+* Various code and documentation improvements (thanks Dimitri Papadopoulos and Gaurav Chauhan)
+
+
+changes from 1.15 to 1.16
+-------------------------
+
+* Support XI country code for Northern Ireland VAT numbers
+ (thanks Alexis de Lattre)
+* Switch data source for Austrian postal codes
+ (thanks Bernd Schlapsi)
+* Fix Belarus VAT number online lookup
+
+
+changes from 1.14 to 1.15
+-------------------------
+
+* Add modules for the following number formats:
+
+ - CUI or CIF (Codul Unic de Înregistrare, Romanian company identifier)
+ - PEID (Liechtenstein tax code for individuals and entities)
+ (thanks Matthias Schmid)
+ - ЄДРПОУ, EDRPOU (Identifier for enterprises and organizations in Ukraine)
+ (thanks Leandro Regueiro)
+ - РНОКПП, RNTRC (Individual taxpayer registration number in Ukraine)
+ (thanks Leandro Regueiro)
+
+* Make list of EU member states part of public API
+* Retain RO prefix in Romanian VAT numbers
+* Support international VAT numbers that are only valid with country prefix
+* Expanded validation for Belgian VAT numbers
+* Use ABN as Australian VAT number
+* Remove GB from EU member states
+
+
changes from 1.13 to 1.14
-------------------------
@@ -323,7 +553,7 @@ changes from 1.1 to 1.2
- VAT, MWST, TVA, IVA, TPV (Mehrwertsteuernummer, the Swiss VAT number)
- CUSIP number (financial security identification number)
- Wertpapierkennnummer (German securities identification code)
- - Isikukood (Estonian Personcal ID number)
+ - Isikukood (Estonian Personal ID number)
- Finnish Association Identifier
- Y-tunnus (Finnish business identifier)
- SEDOL number (Stock Exchange Daily Official List number)
diff --git a/README b/README.md
similarity index 79%
rename from README
rename to README.md
index b472833f..75bc4fbd 100644
--- a/README
+++ b/README.md
@@ -16,7 +16,7 @@ Available formats
Currently this package supports the following formats:
* NRT (Número de Registre Tributari, Andorra tax number)
- * NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number)
+ * NIPT, NUIS (Numri i Identifikimit për Personin e Tatueshëm, Albanian tax number)
* CBU (Clave Bancaria Uniforme, Argentine bank account number)
* CUIT (Código Único de Identificación Tributaria, Argentinian tax number)
* DNI (Documento Nacional de Identidad, Argentinian national identity nr.)
@@ -28,7 +28,13 @@ Currently this package supports the following formats:
* ABN (Australian Business Number)
* ACN (Australian Company Number)
* TFN (Australian Tax File Number)
+ * VÖEN (Vergi ödəyicisinin eyniləşdirmə nömrəsi, Azerbaijan tax number)
+ * BIS (Belgian BIS number)
+ * eID Number (Belgian electronic Identity Card Number)
* Belgian IBAN (International Bank Account Number)
+ * NN, NISS, RRN (Belgian national number)
+ * Belgian OGM-VCS
+ * SSN, INSZ, NISS (Belgian social security number)
* BTW, TVA, NWSt, ondernemingsnummer (Belgian enterprise number)
* EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes)
* PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner)
@@ -38,9 +44,11 @@ Currently this package supports the following formats:
* CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazilian company identifier)
* CPF (Cadastro de Pessoas Físicas, Brazilian national identifier)
* УНП, UNP (Учетный номер плательщика, the Belarus VAT number)
+ * BC PHN (British Columbia Personal Health Number)
* BN (Canadian Business Number)
* SIN (Canadian Social Insurance Number)
* CAS RN (Chemical Abstracts Service Registry Number)
+ * CFI (ISO 10962 Classification of Financial Instruments)
* ESR, ISR, QR-reference (reference number on Swiss payment slips)
* Swiss social security number ("Sozialversicherungsnummer")
* UID (Unternehmens-Identifikationsnummer, Swiss business identifier)
@@ -55,10 +63,12 @@ Currently this package supports the following formats:
* NI (Número de identidad, Cuban identity card numbers)
* CUSIP number (financial security identification number)
* Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number)
+ * Czech bank account number
* DIČ (Daňové identifikační číslo, Czech VAT number)
* RČ (Rodné číslo, the Czech birth number)
* Handelsregisternummer (German company register number)
* IdNr (Steuerliche Identifikationsnummer, German personal tax number)
+ * Leitweg-ID, a buyer reference or routing identifier for electronic invoices
* St.-Nr. (Steuernummer, German tax number)
* Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number)
* Wertpapierkennnummer (German securities identification code)
@@ -67,12 +77,15 @@ Currently this package supports the following formats:
* Cedula (Dominican Republic national identification number)
* NCF (Números de Comprobante Fiscal, Dominican Republic receipt number)
* RNC (Registro Nacional del Contribuyente, Dominican Republic tax number)
+ * NIF, sometimes N.I.F. (Numéro d'Identification Fiscale, Algeria tax number)
* EAN (International Article Number)
* CI (Cédula de identidad, Ecuadorian personal identity code)
* RUC (Registro Único de Contribuyentes, Ecuadorian company tax number)
- * Isikukood (Estonian Personcal ID number)
+ * Isikukood (Estonian Personal ID number)
* KMKR (Käibemaksukohuslase, Estonian VAT number)
* Registrikood (Estonian organisation registration code)
+ * Tax Registration Number (الرقم الضريبي, Egypt tax number)
+ * CAE (Código de Actividad y Establecimiento, Spanish activity establishment code)
* CCC (Código Cuenta Corriente, Spanish Bank Account Code)
* CIF (Código de Identificación Fiscal, Spanish company tax number)
* CUPS (Código Unificado de Punto de Suministro, Spanish meter point number)
@@ -80,11 +93,15 @@ Currently this package supports the following formats:
* Spanish IBAN (International Bank Account Number)
* NIE (Número de Identificación de Extranjero, Spanish foreigner number)
* NIF (Número de Identificación Fiscal, Spanish VAT number)
+ * Postcode (the Spanish postal code)
* Referencia Catastral (Spanish real estate property id)
* SEPA Identifier of the Creditor (AT-02)
* Euro banknote serial numbers
+ * EC Number (European Community number)
* EIC (European Energy Identification Code)
+ * European Excise Number
* NACE (classification for businesses in the European Union)
+ * OSS (European VAT on e-Commerce - One Stop Shop)
* VAT (European Union VAT number)
* ALV nro (Arvonlisäveronumero, Finnish VAT number)
* Finnish Association Identifier
@@ -92,8 +109,11 @@ Currently this package supports the following formats:
* Veronumero (Finnish individual tax number)
* Y-tunnus (Finnish business identifier)
* FIGI (Financial Instrument Global Identifier)
+ * V-number (Vinnutal, Faroe Islands tax number)
+ * n° d'accise (French number to identify taxpayers of excise taxes)
* NIF (Numéro d'Immatriculation Fiscale, French tax identification number)
* NIR (French personal identification number)
+ * RCS (French trade registration number for commercial companies)
* SIREN (a French company identification number)
* SIRET (a French company establishment identification number)
* n° TVA (taxe sur la valeur ajoutée, French VAT number)
@@ -102,6 +122,8 @@ Currently this package supports the following formats:
* UPN (English Unique Pupil Number)
* UTR (United Kingdom Unique Taxpayer Reference)
* VAT (United Kingdom (and Isle of Man) VAT registration number)
+ * TIN (Taxpayer Identification Number, Ghana tax number)
+ * NIFp (Numéro d'Identification Fiscale Permanent, Guinea tax number)
* AMKA (Αριθμός Μητρώου Κοινωνικής Ασφάλισης, Greek social security number)
* FPA, ΦΠΑ, ΑΦΜ (Αριθμός Φορολογικού Μητρώου, the Greek VAT number)
* GRid (Global Release Identifier)
@@ -110,6 +132,7 @@ Currently this package supports the following formats:
* OIB (Osobni identifikacijski broj, Croatian identification number)
* ANUM (Közösségi adószám, Hungarian VAT number)
* IBAN (International Bank Account Number)
+ * NIK (Nomor Induk Kependudukan, Indonesian identity number)
* NPWP (Nomor Pokok Wajib Pajak, Indonesian VAT Number)
* PPS No (Personal Public Service Number, Irish personal number)
* VAT (Irish tax reference number)
@@ -118,8 +141,11 @@ Currently this package supports the following formats:
* IMEI (International Mobile Equipment Identity)
* IMO number (International Maritime Organization number)
* IMSI (International Mobile Subscriber Identity)
- * Aadhaar (Indian digital resident personal identity number)
+ * Aadhaar (Indian personal identity number)
+ * EPIC (Electoral Photo Identity Card, Indian Voter ID)
+ * GSTIN (Goods and Services Tax identification number, Indian VAT number)
* PAN (Permanent Account Number, Indian income tax identifier)
+ * VID (Indian personal virtual identity number)
* Kennitala (Icelandic personal and organisation identity code)
* VSK number (Virðisaukaskattsnúmer, Icelandic VAT number)
* ISAN (International Standard Audiovisual Number)
@@ -127,33 +153,43 @@ Currently this package supports the following formats:
* ISIL (International Standard Identifier for Libraries)
* ISIN (International Securities Identification Number)
* ISMN (International Standard Music Number)
+ * ISNI (International Standard Name Identifier)
* ISO 11649 (Structured Creditor Reference)
* ISO 6346 (International standard for container identification)
+ * ISRC (International Standard Recording Code)
* ISSN (International Standard Serial Number)
* AIC (Italian code for identification of drugs)
* Codice Fiscale (Italian tax code for individuals)
* Partita IVA (Italian VAT number)
* CN (法人番号, hōjin bangō, Japanese Corporate Number)
+ * IN (個人番号, kojin bangō, Japanese Individual Number)
+ * PIN (Personal Identification Number, Kenya tax number)
* BRN (사업자 등록 번호, South Korea Business Registration Number)
* RRN (South Korean resident registration number)
* LEI (Legal Entity Identifier)
+ * PEID (Liechtenstein tax code for individuals and entities)
* Asmens kodas (Lithuanian, personal numbers)
* PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number)
* TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number)
* PVN (Pievienotās vērtības nodokļa, Latvian VAT number)
+ * ICE (Identifiant Commun de l’Entreprise, التعريف الموحد للمقاولة, Morocco tax number)
* MAC address (Media Access Control address)
* n° TVA (taxe sur la valeur ajoutée, Monacan VAT number)
* IDNO (Moldavian company identification number)
* Montenegro IBAN (International Bank Account Number)
+ * PIB (Poreski Identifikacioni Broj, Montenegro tax number)
* MEID (Mobile Equipment Identifier)
+ * ЕДБ (Едниствен Даночен Број, North Macedonia tax number)
* VAT (Maltese VAT number)
* ID number (Mauritian national identifier)
* CURP (Clave Única de Registro de Población, Mexican personal ID)
* RFC (Registro Federal de Contribuyentes, Mexican tax number)
* NRIC No. (Malaysian National Registration Identity Card Number)
+ * NUIT (Número Único de Identificação Tributaria, Mozambique tax number)
* BRIN number (the Dutch school identification number)
* BSN (Burgerservicenummer, the Dutch citizen identification number)
* Btw-identificatienummer (Omzetbelastingnummer, the Dutch VAT number)
+ * Identiteitskaartnummer, Paspoortnummer (the Dutch passport number)
* Onderwijsnummer (the Dutch student identification number)
* Postcode (the Dutch postal code)
* Fødselsnummer (Norwegian birth number, the national identity number)
@@ -165,28 +201,42 @@ Currently this package supports the following formats:
* IRD number (New Zealand Inland Revenue Department (Te Tari Tāke) number)
* CUI (Cédula Única de Identidad, Peruvian identity number)
* RUC (Registro Único de Contribuyentes, Peruvian company tax number)
+ * CNIC number (Pakistani Computerised National Identity Card number)
* NIP (Numer Identyfikacji Podatkowej, Polish VAT number)
* PESEL (Polish national identification number)
* REGON (Rejestr Gospodarki Narodowej, Polish register of economic units)
+ * CC (Número de Cartão de Cidadão, Portuguese Identity number)
* NIF (Número de identificação fiscal, Portuguese VAT number)
* RUC number (Registro Único de Contribuyentes, Paraguay tax number)
* CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number)
* CNP (Cod Numeric Personal, Romanian Numerical Personal Code)
+ * CUI or CIF (Codul Unic de Înregistrare, Romanian company identifier)
* ONRC (Ordine din Registrul Comerţului, Romanian Trade Register identifier)
* PIB (Poreski Identifikacioni Broj, Serbian tax identification number)
* ИНН (Идентификационный номер налогоплательщика, Russian tax identifier)
+ * ОГРН, OGRN, PSRN, ОГРНИП, OGRNIP (Russian Primary State Registration Number)
* Orgnr (Organisationsnummer, Swedish company number)
* Personnummer (Swedish personal identity number)
+ * Postcode (the Swedish postal code)
* VAT (Moms, Mervärdesskatt, Swedish VAT number)
* UEN (Singapore's Unique Entity Number)
* ID za DDV (Davčna številka, Slovenian VAT number)
+ * Enotna matična številka občana (Unique Master Citizen Number)
+ * Matična številka poslovnega registra (Corporate Registration Number)
* IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number)
* RČ (Rodné číslo, the Slovak birth number)
* COE (Codice operatore economico, San Marino national tax number)
+ * NINEA (Numéro d'Identification Nationale des Entreprises et Associations, Senegal tax number)
* NIT (Número de Identificación Tributaria, El Salvador tax number)
+ * MOA (Thailand Memorandum of Association Number)
+ * PIN (Thailand Personal Identification Number)
+ * TIN (Thailand Taxpayer Identification Number)
+ * MF (Matricule Fiscal, Tunisia tax number)
* T.C. Kimlik No. (Turkish personal identification number)
* VKN (Vergi Kimlik Numarası, Turkish tax identification number)
* UBN (Unified Business Number, 統一編號, Taiwanese tax number)
+ * ЄДРПОУ, EDRPOU (Identifier for enterprises and organizations in Ukraine)
+ * РНОКПП, RNTRC (Individual taxpayer registration number in Ukraine)
* ATIN (U.S. Adoption Taxpayer Identification Number)
* EIN (U.S. Employer Identification Number)
* ITIN (U.S. Individual Taxpayer Identification Number)
@@ -249,13 +299,12 @@ Requirements
------------
The modules should not require any external Python modules and should be pure
-Python. The modules are developed and tested with Python 2.7 and 3.6 but may
-also work with older versions of Python.
+Python. The modules are developed and tested with Python 3 versions (see `setup.py`).
Copyright
---------
-Copyright (C) 2010-2020 Arthur de Jong and others
+Copyright (C) 2010-2026 Arthur de Jong and others
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -268,9 +317,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA
+License along with this library; if not, see .
Feedback and bug reports
------------------------
diff --git a/docs/conf.py b/docs/conf.py
index 6c8e4a24..d37c1cbe 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -11,25 +11,18 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+"""python-stdnum documentation build configuration."""
import stdnum
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('..'))
# -- General configuration -----------------------------------------------------
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
- 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo',
- 'sphinx.ext.coverage', 'sphinx.ext.autosummary'
+ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo',
+ 'sphinx.ext.coverage', 'sphinx.ext.autosummary',
]
# Add any paths that contain templates here, relative to this directory.
@@ -46,7 +39,7 @@
# General information about the project.
project = u'python-stdnum'
-copyright = u'2013-2019, Arthur de Jong'
+copyright = u'2013-2026, Arthur de Jong'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -57,43 +50,21 @@
# The full version, including alpha/beta/rc tags.
release = version
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_*', '.svn', '.git']
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
-modindex_common_prefix = ['stdnum.', ]
+modindex_common_prefix = ['stdnum.']
# Automatically generate stub pages for autosummary entries.
autosummary_generate = True
+# Autosummary overwrites existing files by generated stub pages.
+autosummary_generate_overwrite = False
# -- Options for HTML output ---------------------------------------------------
@@ -101,79 +72,13 @@
# a list of builtin themes.
html_theme = 'default'
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# " v documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['_static']
-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%Y-%m-%d'
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Suffix for generated links to HTML files.
-#html_link_suffix = ''
-
# Output file base name for HTML help builder.
htmlhelp_basename = 'python-stdnumdoc'
@@ -184,10 +89,7 @@
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'python-stdnum', u'python-stdnum Documentation',
- [u'Arthur de Jong'], 1)
+ [u'Arthur de Jong'], 1),
]
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
diff --git a/docs/contributing.rst b/docs/contributing.rst
new file mode 100644
index 00000000..58977a88
--- /dev/null
+++ b/docs/contributing.rst
@@ -0,0 +1 @@
+.. include:: ../CONTRIBUTING.md
diff --git a/docs/index.rst b/docs/index.rst
index 959e7817..7cb0b702 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,6 +1,6 @@
.. module:: stdnum
-.. include:: ../README
+.. include:: ../README.md
:end-before: Available formats
@@ -9,7 +9,7 @@ Common Interface
Most of the number format modules implement the following functions:
-.. function:: module.validate(number)
+.. function:: module.validate(number: str) -> str
Validate the number and return a compact, consistent representation of
the number or code. If the validation fails,
@@ -19,7 +19,7 @@ Most of the number format modules implement the following functions:
:raises ValidationError: When the specified number is invalid
:returns: str -- A compact (canonical) representation of the number
-.. function:: module.is_valid(number)
+.. function:: module.is_valid(number: str) -> bool
Return either ``True`` or ``False`` depending on whether the passed number
is in any supported and valid form and passes all embedded checks of the
@@ -27,7 +27,7 @@ Most of the number format modules implement the following functions:
:returns: bool -- ``True`` if validated, ``False`` otherwise
-.. function:: module.compact(number)
+.. function:: module.compact(number: str) -> str
Return a compact representation of the number or code. This function
generally does not do validation but may raise exceptions for wildly
@@ -35,7 +35,7 @@ Most of the number format modules implement the following functions:
:returns: str -- The compacted number
-.. function:: module.format(number)
+.. function:: module.format(number: str) -> str
Return a formatted version of the number in the preferred format.
This function generally expects to be passed a valid number or code and
@@ -45,7 +45,7 @@ Most of the number format modules implement the following functions:
The check digit modules generally also provide the following functions:
-.. function:: module.checksum(number)
+.. function:: module.checksum(number: str) -> int
Calculate the checksum over the provided number. This is generally a
number that can be used to determine whether the provided number is
@@ -53,7 +53,7 @@ The check digit modules generally also provide the following functions:
:returns: int -- A numeric checksum over the number
-.. function:: module.calc_check_digit(number)
+.. function:: module.calc_check_digit(number: str) -> str
Calculate the check digit that should be added to the number to make it
valid.
@@ -92,7 +92,7 @@ Helper functions and modules
may have multiple)
* ``'personalid'`` for generic personal identifiers (some countries may have
multiple, especially for tax purposes)
- * ``'postcal_code'`` for address postal codes
+ * ``'postal_code'`` for address postal codes
Generic check digit algorithms
@@ -126,7 +126,13 @@ Available formats
au.abn
au.acn
au.tfn
+ az.voen
+ be.bis
+ be.eid
be.iban
+ be.nn
+ be.ogm_vcs
+ be.ssn
be.vat
bg.egn
bg.pnf
@@ -136,9 +142,11 @@ Available formats
br.cnpj
br.cpf
by.unp
+ ca.bc_phn
ca.bn
ca.sin
casrn
+ cfi
ch.esr
ch.ssn
ch.uid
@@ -153,10 +161,12 @@ Available formats
cu.ni
cusip
cy.vat
+ cz.bankaccount
cz.dic
cz.rc
de.handelsregisternummer
de.idnr
+ de.leitweg
de.stnr
de.vat
de.wkn
@@ -165,12 +175,15 @@ Available formats
do.cedula
do.ncf
do.rnc
+ dz.nif
ean
ec.ci
ec.ruc
ee.ik
ee.kmkr
ee.registrikood
+ eg.tn
+ es.cae
es.ccc
es.cif
es.cups
@@ -178,11 +191,15 @@ Available formats
es.iban
es.nie
es.nif
+ es.postal_code
es.referenciacatastral
eu.at_02
eu.banknote
+ eu.ecnumber
eu.eic
+ eu.excise
eu.nace
+ eu.oss
eu.vat
fi.alv
fi.associationid
@@ -190,8 +207,11 @@ Available formats
fi.veronumero
fi.ytunnus
figi
+ fo.vn
+ fr.accise
fr.nif
fr.nir
+ fr.rcs
fr.siren
fr.siret
fr.tva
@@ -200,6 +220,8 @@ Available formats
gb.upn
gb.utr
gb.vat
+ gh.tin
+ gn.nifp
gr.amka
gr.vat
grid
@@ -208,6 +230,7 @@ Available formats
hr.oib
hu.anum
iban
+ id.nik
id.npwp
ie.pps
ie.vat
@@ -217,7 +240,10 @@ Available formats
imo
imsi
in_.aadhaar
+ in_.epic
+ in_.gstin
in_.pan
+ in_.vid
is_.kennitala
is_.vsk
isan
@@ -225,33 +251,43 @@ Available formats
isil
isin
ismn
+ isni
iso11649
iso6346
+ isrc
issn
it.aic
it.codicefiscale
it.iva
jp.cn
+ jp.in_
+ ke.pin
kr.brn
kr.rrn
lei
+ li.peid
lt.asmens
lt.pvm
lu.tva
lv.pvn
+ ma.ice
mac
mc.tva
md.idno
me.iban
+ me.pib
meid
+ mk.edb
mt.vat
mu.nid
mx.curp
mx.rfc
my.nric
+ mz.nuit
nl.brin
nl.bsn
nl.btw
+ nl.identiteitskaartnummer
nl.onderwijsnummer
nl.postcode
no.fodselsnummer
@@ -263,28 +299,42 @@ Available formats
nz.ird
pe.cui
pe.ruc
+ pk.cnic
pl.nip
pl.pesel
pl.regon
+ pt.cc
pt.nif
py.ruc
ro.cf
ro.cnp
+ ro.cui
ro.onrc
rs.pib
ru.inn
+ ru.ogrn
se.orgnr
se.personnummer
+ se.postnummer
se.vat
sg.uen
si.ddv
+ si.emso
+ si.maticna
sk.dph
sk.rc
sm.coe
+ sn.ninea
sv.nit
+ th.moa
+ th.pin
+ th.tin
+ tn.mf
tr.tckimlik
tr.vkn
tw.ubn
+ ua.edrpou
+ ua.rntrc
us.atin
us.ein
us.itin
@@ -307,3 +357,12 @@ Changes in python-stdnum
:maxdepth: 2
changes
+
+
+Contributing to python-stdnum
+-----------------------------
+
+.. toctree::
+ :maxdepth: 2
+
+ contributing
diff --git a/docs/stdnum.az.voen.rst b/docs/stdnum.az.voen.rst
new file mode 100644
index 00000000..8c303dd3
--- /dev/null
+++ b/docs/stdnum.az.voen.rst
@@ -0,0 +1,5 @@
+stdnum.az.voen
+==============
+
+.. automodule:: stdnum.az.voen
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.be.bis.rst b/docs/stdnum.be.bis.rst
new file mode 100644
index 00000000..916faf4c
--- /dev/null
+++ b/docs/stdnum.be.bis.rst
@@ -0,0 +1,5 @@
+stdnum.be.bis
+=============
+
+.. automodule:: stdnum.be.bis
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.be.eid.rst b/docs/stdnum.be.eid.rst
new file mode 100644
index 00000000..2bcedf5f
--- /dev/null
+++ b/docs/stdnum.be.eid.rst
@@ -0,0 +1,5 @@
+stdnum.be.eid
+=============
+
+.. automodule:: stdnum.be.eid
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.be.nn.rst b/docs/stdnum.be.nn.rst
new file mode 100644
index 00000000..1937b8b7
--- /dev/null
+++ b/docs/stdnum.be.nn.rst
@@ -0,0 +1,5 @@
+stdnum.be.nn
+============
+
+.. automodule:: stdnum.be.nn
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.be.ogm_vcs.rst b/docs/stdnum.be.ogm_vcs.rst
new file mode 100644
index 00000000..efb1854e
--- /dev/null
+++ b/docs/stdnum.be.ogm_vcs.rst
@@ -0,0 +1,5 @@
+stdnum.be.ogm_vcs
+=================
+
+.. automodule:: stdnum.be.ogm_vcs
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.be.ssn.rst b/docs/stdnum.be.ssn.rst
new file mode 100644
index 00000000..3cf31865
--- /dev/null
+++ b/docs/stdnum.be.ssn.rst
@@ -0,0 +1,5 @@
+stdnum.be.ssn
+=============
+
+.. automodule:: stdnum.be.ssn
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.ca.bc_phn.rst b/docs/stdnum.ca.bc_phn.rst
new file mode 100644
index 00000000..1299ee4d
--- /dev/null
+++ b/docs/stdnum.ca.bc_phn.rst
@@ -0,0 +1,5 @@
+stdnum.ca.bc_phn
+================
+
+.. automodule:: stdnum.ca.bc_phn
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.cfi.rst b/docs/stdnum.cfi.rst
new file mode 100644
index 00000000..bc4be164
--- /dev/null
+++ b/docs/stdnum.cfi.rst
@@ -0,0 +1,5 @@
+stdnum.cfi
+==========
+
+.. automodule:: stdnum.cfi
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.cz.bankaccount.rst b/docs/stdnum.cz.bankaccount.rst
new file mode 100644
index 00000000..64ed9d56
--- /dev/null
+++ b/docs/stdnum.cz.bankaccount.rst
@@ -0,0 +1,5 @@
+stdnum.cz.bankaccount
+=====================
+
+.. automodule:: stdnum.cz.bankaccount
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.de.leitweg.rst b/docs/stdnum.de.leitweg.rst
new file mode 100644
index 00000000..747e1016
--- /dev/null
+++ b/docs/stdnum.de.leitweg.rst
@@ -0,0 +1,5 @@
+stdnum.de.leitweg
+=================
+
+.. automodule:: stdnum.de.leitweg
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.dz.nif.rst b/docs/stdnum.dz.nif.rst
new file mode 100644
index 00000000..845b47d6
--- /dev/null
+++ b/docs/stdnum.dz.nif.rst
@@ -0,0 +1,5 @@
+stdnum.dz.nif
+=============
+
+.. automodule:: stdnum.dz.nif
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.eg.tn.rst b/docs/stdnum.eg.tn.rst
new file mode 100644
index 00000000..4cf97686
--- /dev/null
+++ b/docs/stdnum.eg.tn.rst
@@ -0,0 +1,5 @@
+stdnum.eg.tn
+============
+
+.. automodule:: stdnum.eg.tn
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.es.cae.rst b/docs/stdnum.es.cae.rst
new file mode 100644
index 00000000..93ddd64c
--- /dev/null
+++ b/docs/stdnum.es.cae.rst
@@ -0,0 +1,5 @@
+stdnum.es.cae
+=============
+
+.. automodule:: stdnum.es.cae
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.es.postal_code.rst b/docs/stdnum.es.postal_code.rst
new file mode 100644
index 00000000..d6c8bf61
--- /dev/null
+++ b/docs/stdnum.es.postal_code.rst
@@ -0,0 +1,5 @@
+stdnum.es.postal_code
+=====================
+
+.. automodule:: stdnum.es.postal_code
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.eu.ecnumber.rst b/docs/stdnum.eu.ecnumber.rst
new file mode 100644
index 00000000..f6626e6d
--- /dev/null
+++ b/docs/stdnum.eu.ecnumber.rst
@@ -0,0 +1,5 @@
+stdnum.eu.ecnumber
+==================
+
+.. automodule:: stdnum.eu.ecnumber
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.eu.excise.rst b/docs/stdnum.eu.excise.rst
new file mode 100644
index 00000000..0bfc38fd
--- /dev/null
+++ b/docs/stdnum.eu.excise.rst
@@ -0,0 +1,5 @@
+stdnum.eu.excise
+================
+
+.. automodule:: stdnum.eu.excise
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.eu.oss.rst b/docs/stdnum.eu.oss.rst
new file mode 100644
index 00000000..8f4b004b
--- /dev/null
+++ b/docs/stdnum.eu.oss.rst
@@ -0,0 +1,5 @@
+stdnum.eu.oss
+=============
+
+.. automodule:: stdnum.eu.oss
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.fo.vn.rst b/docs/stdnum.fo.vn.rst
new file mode 100644
index 00000000..74730ee7
--- /dev/null
+++ b/docs/stdnum.fo.vn.rst
@@ -0,0 +1,5 @@
+stdnum.fo.vn
+============
+
+.. automodule:: stdnum.fo.vn
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.fr.accise.rst b/docs/stdnum.fr.accise.rst
new file mode 100644
index 00000000..3c5b93db
--- /dev/null
+++ b/docs/stdnum.fr.accise.rst
@@ -0,0 +1,5 @@
+stdnum.fr.accise
+================
+
+.. automodule:: stdnum.fr.accise
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.fr.rcs.rst b/docs/stdnum.fr.rcs.rst
new file mode 100644
index 00000000..a77f27b9
--- /dev/null
+++ b/docs/stdnum.fr.rcs.rst
@@ -0,0 +1,5 @@
+stdnum.fr.rcs
+=============
+
+.. automodule:: stdnum.fr.rcs
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.gh.tin.rst b/docs/stdnum.gh.tin.rst
new file mode 100644
index 00000000..fe8aaf5d
--- /dev/null
+++ b/docs/stdnum.gh.tin.rst
@@ -0,0 +1,5 @@
+stdnum.gh.tin
+=============
+
+.. automodule:: stdnum.gh.tin
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.gn.nifp.rst b/docs/stdnum.gn.nifp.rst
new file mode 100644
index 00000000..0361b779
--- /dev/null
+++ b/docs/stdnum.gn.nifp.rst
@@ -0,0 +1,5 @@
+stdnum.gn.nifp
+==============
+
+.. automodule:: stdnum.gn.nifp
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.id.nik.rst b/docs/stdnum.id.nik.rst
new file mode 100644
index 00000000..ca388859
--- /dev/null
+++ b/docs/stdnum.id.nik.rst
@@ -0,0 +1,5 @@
+stdnum.id.nik
+=============
+
+.. automodule:: stdnum.id.nik
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.in_.epic.rst b/docs/stdnum.in_.epic.rst
new file mode 100644
index 00000000..d7e3e901
--- /dev/null
+++ b/docs/stdnum.in_.epic.rst
@@ -0,0 +1,5 @@
+stdnum.in\_.epic
+================
+
+.. automodule:: stdnum.in_.epic
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.in_.gstin.rst b/docs/stdnum.in_.gstin.rst
new file mode 100644
index 00000000..d0871072
--- /dev/null
+++ b/docs/stdnum.in_.gstin.rst
@@ -0,0 +1,5 @@
+stdnum.in\_.gstin
+=================
+
+.. automodule:: stdnum.in_.gstin
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.in_.vid.rst b/docs/stdnum.in_.vid.rst
new file mode 100644
index 00000000..602124c4
--- /dev/null
+++ b/docs/stdnum.in_.vid.rst
@@ -0,0 +1,5 @@
+stdnum.in\_.vid
+===============
+
+.. automodule:: stdnum.in_.vid
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.isni.rst b/docs/stdnum.isni.rst
new file mode 100644
index 00000000..fd9ab985
--- /dev/null
+++ b/docs/stdnum.isni.rst
@@ -0,0 +1,5 @@
+stdnum.isni
+===========
+
+.. automodule:: stdnum.isni
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.isrc.rst b/docs/stdnum.isrc.rst
new file mode 100644
index 00000000..e9c8f63d
--- /dev/null
+++ b/docs/stdnum.isrc.rst
@@ -0,0 +1,5 @@
+stdnum.isrc
+===========
+
+.. automodule:: stdnum.isrc
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.jp.in_.rst b/docs/stdnum.jp.in_.rst
new file mode 100644
index 00000000..7957124f
--- /dev/null
+++ b/docs/stdnum.jp.in_.rst
@@ -0,0 +1,5 @@
+stdnum.jp.in_
+=============
+
+.. automodule:: stdnum.jp.in_
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.ke.pin.rst b/docs/stdnum.ke.pin.rst
new file mode 100644
index 00000000..bd47baf7
--- /dev/null
+++ b/docs/stdnum.ke.pin.rst
@@ -0,0 +1,5 @@
+stdnum.ke.pin
+=============
+
+.. automodule:: stdnum.ke.pin
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.li.peid.rst b/docs/stdnum.li.peid.rst
new file mode 100644
index 00000000..70ec351f
--- /dev/null
+++ b/docs/stdnum.li.peid.rst
@@ -0,0 +1,5 @@
+stdnum.li.peid
+==============
+
+.. automodule:: stdnum.li.peid
+ :members:
diff --git a/docs/stdnum.ma.ice.rst b/docs/stdnum.ma.ice.rst
new file mode 100644
index 00000000..32ef626c
--- /dev/null
+++ b/docs/stdnum.ma.ice.rst
@@ -0,0 +1,5 @@
+stdnum.ma.ice
+=============
+
+.. automodule:: stdnum.ma.ice
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.me.pib.rst b/docs/stdnum.me.pib.rst
new file mode 100644
index 00000000..b713647c
--- /dev/null
+++ b/docs/stdnum.me.pib.rst
@@ -0,0 +1,5 @@
+stdnum.me.pib
+=============
+
+.. automodule:: stdnum.me.pib
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.mk.edb.rst b/docs/stdnum.mk.edb.rst
new file mode 100644
index 00000000..bff1a283
--- /dev/null
+++ b/docs/stdnum.mk.edb.rst
@@ -0,0 +1,5 @@
+stdnum.mk.edb
+=============
+
+.. automodule:: stdnum.mk.edb
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.mz.nuit.rst b/docs/stdnum.mz.nuit.rst
new file mode 100644
index 00000000..8fd5d05f
--- /dev/null
+++ b/docs/stdnum.mz.nuit.rst
@@ -0,0 +1,5 @@
+stdnum.mz.nuit
+==============
+
+.. automodule:: stdnum.mz.nuit
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.nl.identiteitskaartnummer.rst b/docs/stdnum.nl.identiteitskaartnummer.rst
new file mode 100644
index 00000000..782416d0
--- /dev/null
+++ b/docs/stdnum.nl.identiteitskaartnummer.rst
@@ -0,0 +1,5 @@
+stdnum.nl.identiteitskaartnummer
+================================
+
+.. automodule:: stdnum.nl.identiteitskaartnummer
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.pk.cnic.rst b/docs/stdnum.pk.cnic.rst
new file mode 100644
index 00000000..c3a191b2
--- /dev/null
+++ b/docs/stdnum.pk.cnic.rst
@@ -0,0 +1,5 @@
+stdnum.pk.cnic
+==============
+
+.. automodule:: stdnum.pk.cnic
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.pt.cc.rst b/docs/stdnum.pt.cc.rst
new file mode 100644
index 00000000..954c9a99
--- /dev/null
+++ b/docs/stdnum.pt.cc.rst
@@ -0,0 +1,5 @@
+stdnum.pt.cc
+============
+
+.. automodule:: stdnum.pt.cc
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.ro.cui.rst b/docs/stdnum.ro.cui.rst
new file mode 100644
index 00000000..e46aa91c
--- /dev/null
+++ b/docs/stdnum.ro.cui.rst
@@ -0,0 +1,5 @@
+stdnum.ro.cui
+=============
+
+.. automodule:: stdnum.ro.cui
+ :members:
diff --git a/docs/stdnum.ru.ogrn.rst b/docs/stdnum.ru.ogrn.rst
new file mode 100644
index 00000000..aee48283
--- /dev/null
+++ b/docs/stdnum.ru.ogrn.rst
@@ -0,0 +1,5 @@
+stdnum.ru.ogrn
+==============
+
+.. automodule:: stdnum.ru.ogrn
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.se.postnummer.rst b/docs/stdnum.se.postnummer.rst
new file mode 100644
index 00000000..025aeaf3
--- /dev/null
+++ b/docs/stdnum.se.postnummer.rst
@@ -0,0 +1,5 @@
+stdnum.se.postnummer
+====================
+
+.. automodule:: stdnum.se.postnummer
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.si.emso.rst b/docs/stdnum.si.emso.rst
new file mode 100644
index 00000000..e4cd833a
--- /dev/null
+++ b/docs/stdnum.si.emso.rst
@@ -0,0 +1,5 @@
+stdnum.si.emso
+==============
+
+.. automodule:: stdnum.si.emso
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.si.maticna.rst b/docs/stdnum.si.maticna.rst
new file mode 100644
index 00000000..5a9de042
--- /dev/null
+++ b/docs/stdnum.si.maticna.rst
@@ -0,0 +1,5 @@
+stdnum.si.maticna
+=================
+
+.. automodule:: stdnum.si.maticna
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.sn.ninea.rst b/docs/stdnum.sn.ninea.rst
new file mode 100644
index 00000000..087fd3bb
--- /dev/null
+++ b/docs/stdnum.sn.ninea.rst
@@ -0,0 +1,5 @@
+stdnum.sn.ninea
+===============
+
+.. automodule:: stdnum.sn.ninea
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.th.moa.rst b/docs/stdnum.th.moa.rst
new file mode 100644
index 00000000..7377b73c
--- /dev/null
+++ b/docs/stdnum.th.moa.rst
@@ -0,0 +1,5 @@
+stdnum.th.moa
+=============
+
+.. automodule:: stdnum.th.moa
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.th.pin.rst b/docs/stdnum.th.pin.rst
new file mode 100644
index 00000000..40c21e63
--- /dev/null
+++ b/docs/stdnum.th.pin.rst
@@ -0,0 +1,5 @@
+stdnum.th.pin
+=============
+
+.. automodule:: stdnum.th.pin
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.th.tin.rst b/docs/stdnum.th.tin.rst
new file mode 100644
index 00000000..c889ec2a
--- /dev/null
+++ b/docs/stdnum.th.tin.rst
@@ -0,0 +1,5 @@
+stdnum.th.tin
+=============
+
+.. automodule:: stdnum.th.tin
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.tn.mf.rst b/docs/stdnum.tn.mf.rst
new file mode 100644
index 00000000..781d0b94
--- /dev/null
+++ b/docs/stdnum.tn.mf.rst
@@ -0,0 +1,5 @@
+stdnum.tn.mf
+============
+
+.. automodule:: stdnum.tn.mf
+ :members:
\ No newline at end of file
diff --git a/docs/stdnum.ua.edrpou.rst b/docs/stdnum.ua.edrpou.rst
new file mode 100644
index 00000000..88c5c5db
--- /dev/null
+++ b/docs/stdnum.ua.edrpou.rst
@@ -0,0 +1,5 @@
+stdnum.ua.edrpou
+================
+
+.. automodule:: stdnum.ua.edrpou
+ :members:
diff --git a/docs/stdnum.ua.rntrc.rst b/docs/stdnum.ua.rntrc.rst
new file mode 100644
index 00000000..89e92a6a
--- /dev/null
+++ b/docs/stdnum.ua.rntrc.rst
@@ -0,0 +1,5 @@
+stdnum.ua.rntrc
+===============
+
+.. automodule:: stdnum.ua.rntrc
+ :members:
diff --git a/online_check/check.js b/online_check/check.js
index 69019564..68d16652 100644
--- a/online_check/check.js
+++ b/online_check/check.js
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
- # License along with this library; if not, write to the Free Software
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- # 02110-1301 USA
+ # License along with this library; if not, see .
*/
$(document).ready(function () {
diff --git a/online_check/stdnum.wsgi b/online_check/stdnum.wsgi
index 2909c941..f95ce7cd 100755
--- a/online_check/stdnum.wsgi
+++ b/online_check/stdnum.wsgi
@@ -1,6 +1,6 @@
# stdnum.wsgi - simple WSGI application to check numbers
#
-# Copyright (C) 2017-2020 Arthur de Jong.
+# Copyright (C) 2017-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -13,25 +13,25 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Simple WSGI application to check numbers."""
-import cgi
+import datetime
+import html
import inspect
import json
import os
import re
import sys
+import urllib.parse
sys.stdout = sys.stderr
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'python-stdnum'))
-from stdnum.util import (
- get_module_description, get_module_name, get_number_modules, to_unicode)
+from stdnum.util import ( # noqa: E402,I001 (import after changes to sys.path)
+ get_module_description, get_module_name, get_number_modules)
_template = None
@@ -40,16 +40,18 @@ _template = None
def get_conversions(module, number):
"""Return the possible conversions for the number."""
for name, func in inspect.getmembers(module, inspect.isfunction):
- if name.startswith('to_'):
- args, varargs, varkw, defaults = inspect.getargspec(func)
- if defaults:
- args = args[:-len(defaults)]
+ if name.startswith('to_') or name.startswith('get_'):
+ signature = inspect.signature(func)
+ args = [p.name for p in signature.parameters.values() if p.default == p.empty]
if args == ['number'] and not name.endswith('binary'):
try:
+ prop = name.split('_', 1)[1].replace('_', ' ')
conversion = func(number)
- if conversion != number:
- yield (name[3:], to_unicode(conversion))
- except Exception:
+ if isinstance(conversion, datetime.date):
+ yield (prop, conversion.strftime('%Y-%m-%d'))
+ elif conversion != number:
+ yield (prop, conversion)
+ except Exception: # noqa: B902 (catch anything that goes wrong)
pass
@@ -62,14 +64,14 @@ def info(module, number):
compact=compactfn(number),
valid=module.is_valid(number),
module=module.__name__.split('.', 1)[1],
- name=to_unicode(get_module_name(module)),
- description=to_unicode(get_module_description(module)),
+ name=get_module_name(module),
+ description=get_module_description(module),
conversions=dict(get_conversions(module, number)))
def format(data):
"""Return an HTML snippet describing the number."""
- description = cgi.escape(data['description']).replace('\n\n', ' \n')
+ description = html.escape(data['description']).replace('\n\n', ' \n')
description = re.sub(
r'^[*] (.*)$', r'',
description, flags=re.MULTILINE)
@@ -79,10 +81,10 @@ def format(data):
description, flags=re.IGNORECASE + re.UNICODE)
for name, conversion in data.get('conversions', {}).items():
description += '\n%s : %s' % (
- cgi.escape(name), cgi.escape(conversion))
+ html.escape(name), html.escape(conversion))
return '%s: %s %s
' % (
- cgi.escape(data['number']),
- cgi.escape(data['name']),
+ html.escape(data['number']),
+ html.escape(data['name']),
description)
@@ -94,14 +96,14 @@ def application(environ, start_response):
basedir = os.path.join(
environ['DOCUMENT_ROOT'],
os.path.dirname(environ['SCRIPT_NAME']).strip('/'))
- _template = to_unicode(open(os.path.join(basedir, 'template.html'), 'rt').read())
+ _template = open(os.path.join(basedir, 'template.html'), 'rb').read().decode('utf-8')
is_ajax = environ.get(
'HTTP_X_REQUESTED_WITH', '').lower() == 'xmlhttprequest'
- parameters = cgi.parse_qs(environ.get('QUERY_STRING', ''))
+ parameters = urllib.parse.parse_qs(environ.get('QUERY_STRING', ''))
results = []
number = ''
if 'number' in parameters:
- number = to_unicode(parameters['number'][0])
+ number = parameters['number'][0]
results = [
info(module, number)
for module in get_number_modules()
@@ -115,5 +117,5 @@ def application(environ, start_response):
('Content-Type', 'text/html; charset=utf-8'),
('Vary', 'X-Requested-With')])
return [(_template % dict(
- value=cgi.escape(number, True),
+ value=html.escape(number, True),
results=u'\n'.join(format(data) for data in results))).encode('utf-8')]
diff --git a/scripts/check_headers.py b/scripts/check_headers.py
new file mode 100755
index 00000000..f1f19a14
--- /dev/null
+++ b/scripts/check_headers.py
@@ -0,0 +1,85 @@
+#!/usr/bin/env python3
+
+# check_headers.py - check that all source files have licensing information
+#
+# Copyright (C) 2023 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""This script checks that all source files have licensing information."""
+
+import glob
+import os
+import re
+import sys
+import textwrap
+
+
+# Regext to match the first line
+identification_re = re.compile(
+ r'^(#!/usr/bin/env python3?\s+|/\*\s+)?'
+ r'(# coding: utf-8\s+)?'
+ r'(\s?#\s+)?'
+ r'(?P[^ :]+) - ', re.MULTILINE)
+
+# Regex to match standard license blurb
+license_re = re.compile(textwrap.dedent(r'''
+ [# ]*This library is free software; you can redistribute it and/or
+ [# ]*modify it under the terms of the GNU Lesser General Public
+ [# ]*License as published by the Free Software Foundation; either
+ [# ]*version 2.1 of the License, or .at your option. any later version.
+ [# ]*
+ [# ]*This library is distributed in the hope that it will be useful,
+ [# ]*but WITHOUT ANY WARRANTY; without even the implied warranty of
+ [# ]*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ [# ]*Lesser General Public License for more details.
+ [# ]*
+ [# ]*You should have received a copy of the GNU Lesser General Public
+ [# ]*License along with this library; if not, see .
+ ''').strip(), re.MULTILINE)
+
+
+def get_file_header(filename):
+ """Read the file header from the file."""
+ with open(filename, 'rt') as f:
+ # Only read the first 2048 bytes to avoid loading too much and the
+ # license information should be in the first part anyway.
+ return f.read(2048)
+
+
+if __name__ == '__main__':
+ files_to_check = (
+ glob.glob('*.py') +
+ glob.glob('stdnum/**/*.py', recursive=True) +
+ glob.glob('tests/**/*.doctest', recursive=True) +
+ glob.glob('scripts/*', recursive=True) +
+ glob.glob('update/**/*.py', recursive=True) +
+ glob.glob('online_check/*.wsgi', recursive=True) +
+ glob.glob('online_check/check.js', recursive=True)
+ )
+
+ # Look for files with incorrect first lines or license
+ fail = False
+ for filename in sorted(files_to_check):
+ contents = get_file_header(filename)
+ m = identification_re.match(contents)
+ if not bool(m) or m.group('filename') not in (filename, os.path.basename(filename)):
+ print('%s: Incorrect file identification' % filename)
+ fail = True
+ if not bool(license_re.search(contents)):
+ print('%s: Incorrect license text' % filename)
+ fail = True
+
+ if fail:
+ sys.exit(1)
diff --git a/setup.cfg b/setup.cfg
index da1f59ac..2bff8c77 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,30 +1,24 @@
[metadata]
-license_file = COPYING
+license_files = COPYING
[sdist]
owner=root
group=root
-[bdist_wheel]
-universal=1
-
-[nosetests]
-with-doctest=true
-doctest-extension=doctest
-doctest-options=+IGNORE_EXCEPTION_DETAIL,+NORMALIZE_WHITESPACE
-with-coverage=true
-cover-branches=true
-cover-package=stdnum
-cover-inclusive=true
-cover-erase=true
-cover-html=true
-cover-html-dir=coverage
-cover-min-percentage=100
+[tool:pytest]
+addopts = --doctest-modules --doctest-glob="*.doctest" stdnum tests --ignore=stdnum/iso9362.py --cov=stdnum --cov-report=term-missing:skip-covered --cov-report=html
+doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL
+
+[coverage:run]
+branch = true
[coverage:report]
fail_under=100
show_missing=true
+[coverage:html]
+directory = coverage
+
[build_sphinx]
all_files = 1
@@ -32,20 +26,32 @@ all_files = 1
ignore =
D205,D209,D400 # our docstrings are multi-line blobs
D302 # We don't care about Unicode docstrings
- E501 # ignore long lines
E731 # we occasionally use lambda
F403,F405 # we use * imports
Q001 # we use '''...''' multi-line strings
Q003 # don't force "" strings to avoid escaping quotes
- T001 # we use print statements in the update scripts
+ T001,T201 # we use print statements in the update scripts
W504 # we put the binary operator on the preceding line
max-complexity = 15
max-line-length = 120
+extend-exclude =
+ .github
+ .mypy_cache
+ .pytest_cache
+ .ruff_cache
+ .venv
+ build
[isort]
lines_after_imports = 2
multi_line_output = 4
known_third_party =
lxml
+ openpyxl
requests
xlrd
+
+[mypy]
+python_version = 3.9
+strict = True
+warn_unreachable = True
diff --git a/setup.py b/setup.py
index f340218a..bb95890e 100755
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@
# setup.py - python-stdnum installation script
#
-# Copyright (C) 2010-2020 Arthur de Jong
+# Copyright (C) 2010-2026 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""python-stdnum installation script."""
@@ -36,7 +34,7 @@
base_dir = os.path.dirname(__file__)
-with open(os.path.join(base_dir, 'README'), 'rb') as fp:
+with open(os.path.join(base_dir, 'README.md'), 'rb') as fp:
long_description = fp.read().decode('utf-8')
setup(
@@ -44,9 +42,14 @@
version=stdnum.__version__,
description='Python module to handle standardized numbers and codes',
long_description=long_description,
+ long_description_content_type='text/markdown',
author='Arthur de Jong',
author_email='arthur@arthurdejong.org',
url='https://arthurdejong.org/python-stdnum/',
+ project_urls={
+ 'Documentation': 'https://arthurdejong.org/python-stdnum/doc/',
+ 'GitHub': 'https://github.com/arthurdejong/python-stdnum/',
+ },
license='LGPL',
classifiers=[
'Development Status :: 5 - Production/Stable',
@@ -57,29 +60,27 @@
'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)',
'Operating System :: OS Independent',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
+ 'Programming Language :: Python :: 3.12',
+ 'Programming Language :: Python :: 3.13',
+ 'Programming Language :: Python :: 3.14',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business :: Financial',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Text Processing :: General',
],
packages=find_packages(),
+ python_requires='>=3.8',
install_requires=[],
- package_data={'': ['*.dat']},
+ package_data={'': ['*.dat', '*.crt', 'py.typed']},
extras_require={
# The SOAP feature is only required for a number of online tests
# of numbers such as the EU VAT VIES lookup, the Dominican Republic
# DGII services or the Turkish T.C. Kimlik validation.
- 'SOAP': ['zeep'], # recommended implementation
- 'SOAP-ALT': ['suds'], # but this should also work
- 'SOAP-FALLBACK': ['PySimpleSOAP'], # this is a fallback
+ 'SOAP': ['zeep'],
},
)
diff --git a/stdnum/__init__.py b/stdnum/__init__.py
index 73646fb1..44bb0301 100644
--- a/stdnum/__init__.py
+++ b/stdnum/__init__.py
@@ -1,7 +1,7 @@
# __init__.py - main module
# coding: utf-8
#
-# Copyright (C) 2010-2020 Arthur de Jong
+# Copyright (C) 2010-2026 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Parse, validate and reformat standard numbers and codes.
@@ -37,10 +35,12 @@
parsing, validation, formatting or conversion functions.
"""
+from __future__ import annotations
+
from stdnum.util import get_cc_module
__all__ = ('get_cc_module', '__version__')
# the version number of the library
-__version__ = '1.14'
+__version__ = '2.2'
diff --git a/stdnum/ad/__init__.py b/stdnum/ad/__init__.py
index 09ccf97c..5d475e2a 100644
--- a/stdnum/ad/__init__.py
+++ b/stdnum/ad/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Andorran numbers."""
+from __future__ import annotations
+
# Provide aliases.
from stdnum.ad import nrt as vat # noqa: F401
diff --git a/stdnum/ad/nrt.py b/stdnum/ad/nrt.py
index 00185c90..2d986796 100644
--- a/stdnum/ad/nrt.py
+++ b/stdnum/ad/nrt.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""NRT (Número de Registre Tributari, Andorra tax number).
@@ -42,13 +40,15 @@
InvalidComponent: ...
>>> format('D059888N')
'D-059888-N'
-"""
+""" # noqa: E501
+
+from __future__ import annotations
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation.
This strips the number of any valid separators and removes surrounding
@@ -57,10 +57,10 @@ def compact(number):
return clean(number, ' -.').upper().strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid Andorra NRT number.
- This checks the length, formatting and other contraints. It does not check
+ This checks the length, formatting and other constraints. It does not check
for control letter.
"""
number = compact(number)
@@ -79,7 +79,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid Andorra NRT number."""
try:
return bool(validate(number))
@@ -87,7 +87,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '-'.join([number[0], number[1:-1], number[-1]])
diff --git a/stdnum/al/__init__.py b/stdnum/al/__init__.py
index 25d7cd18..b36d0455 100644
--- a/stdnum/al/__init__.py
+++ b/stdnum/al/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Albanian numbers."""
+from __future__ import annotations
+
# provide vat as an alias
from stdnum.al import nipt as vat # noqa: F401
diff --git a/stdnum/al/nipt.py b/stdnum/al/nipt.py
index 9091ac7e..11c8e8a7 100644
--- a/stdnum/al/nipt.py
+++ b/stdnum/al/nipt.py
@@ -1,9 +1,9 @@
-# nipt.py - functions for handling Albanian VAT numbers
+# nipt.py - functions for handling Albanian tax numbers
# coding: utf-8
#
# Copyright (C) 2008-2011 Cédric Krier
# Copyright (C) 2008-2011 B2CK
-# Copyright (C) 2015 Arthur de Jong
+# Copyright (C) 2015-2023 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -16,14 +16,23 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
-"""NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number).
+"""NIPT, NUIS (Numri i Identifikimit për Personin e Tatueshëm, Albanian tax number).
The Albanian NIPT is a 10-digit number with the first and last character
-being letters.
+being letters. The number is assigned to individuals and organisations for
+tax purposes.
+
+The first letter indicates the decade the number was assigned or date birth
+date for individuals, followed by a digit for the year. The next two digits
+contain the month (and gender for individuals and region for organisations)
+followed by two digits for the day of the month. The remainder is a serial
+followed by a check letter (check digit algorithm unknown).
+
+More information:
+
+* https://www.tatime.gov.al/eng/c/4/103/business-lifecycle
>>> validate('AL J 91402501 L')
'J91402501L'
@@ -39,6 +48,8 @@
InvalidFormat: ...
"""
+from __future__ import annotations
+
import re
from stdnum.exceptions import *
@@ -46,10 +57,10 @@
# regular expression for matching number
-_nipt_re = re.compile(r'^[JKL][0-9]{8}[A-Z]$')
+_nipt_re = re.compile(r'^[A-M][0-9]{8}[A-Z]$')
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' ').upper().strip()
@@ -60,7 +71,7 @@ def compact(number):
return number
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length and
formatting."""
number = compact(number)
@@ -71,7 +82,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
diff --git a/stdnum/ar/__init__.py b/stdnum/ar/__init__.py
index 6e99d4e9..70c04c1b 100644
--- a/stdnum/ar/__init__.py
+++ b/stdnum/ar/__init__.py
@@ -14,12 +14,12 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Argentinian numbers."""
+from __future__ import annotations
+
# provide aliases
from stdnum.ar import cuit as vat # noqa: F401
from stdnum.ar import dni as personalid # noqa: F401
diff --git a/stdnum/ar/cbu.py b/stdnum/ar/cbu.py
index 08f6f98d..6f34abaf 100644
--- a/stdnum/ar/cbu.py
+++ b/stdnum/ar/cbu.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CBU (Clave Bancaria Uniforme, Argentine bank account number).
@@ -39,17 +37,19 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit."""
weights = (3, 1, 7, 9)
check = sum(int(n) * weights[i % 4]
@@ -57,7 +57,7 @@ def calc_check_digit(number):
return str((10 - check) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid CBU."""
number = compact(number)
if len(number) != 22:
@@ -71,7 +71,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid CBU."""
try:
return bool(validate(number))
@@ -79,7 +79,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return ' '.join((number[:8], number[8:]))
diff --git a/stdnum/ar/cuit.py b/stdnum/ar/cuit.py
index 89522b2d..acb98242 100644
--- a/stdnum/ar/cuit.py
+++ b/stdnum/ar/cuit.py
@@ -18,9 +18,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CUIT (Código Único de Identificación Tributaria, Argentinian tax number).
@@ -41,17 +39,19 @@
'20-26756539-3'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit."""
weights = (5, 4, 3, 2, 7, 6, 5, 4, 3, 2)
check = sum(w * int(n) for w, n in zip(weights, number)) % 11
@@ -66,7 +66,7 @@ def calc_check_digit(number):
)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid CUIT."""
number = compact(number)
if len(number) != 11:
@@ -80,7 +80,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid CUIT."""
try:
return bool(validate(number))
@@ -88,7 +88,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return (number[0:2] + '-' + number[2:10] + '-' + number[10:])
diff --git a/stdnum/ar/dni.py b/stdnum/ar/dni.py
index f97cb7a2..fb3f820c 100644
--- a/stdnum/ar/dni.py
+++ b/stdnum/ar/dni.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""DNI (Documento Nacional de Identidad, Argentinian national identity nr.).
@@ -38,17 +36,19 @@
'20.123.456'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' .').strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid DNI."""
number = compact(number)
if not isdigits(number):
@@ -58,7 +58,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid DNI."""
try:
return bool(validate(number))
@@ -66,7 +66,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '.'.join((number[:-6], number[-6:-3], number[-3:]))
diff --git a/stdnum/at/__init__.py b/stdnum/at/__init__.py
index 3ee90adb..5cb55dcb 100644
--- a/stdnum/at/__init__.py
+++ b/stdnum/at/__init__.py
@@ -14,12 +14,12 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Austrian numbers."""
+from __future__ import annotations
+
# provide aliases
from stdnum.at import postleitzahl as postal_code # noqa: F401
from stdnum.at import uid as vat # noqa: F401
diff --git a/stdnum/at/businessid.py b/stdnum/at/businessid.py
index 04fc5644..83d94f8e 100644
--- a/stdnum/at/businessid.py
+++ b/stdnum/at/businessid.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Austrian Company Register Numbers.
@@ -38,6 +36,8 @@
InvalidFormat: ...
"""
+from __future__ import annotations
+
import re
from stdnum.exceptions import *
@@ -47,7 +47,7 @@
_businessid_re = re.compile('^[0-9]+[a-z]$')
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace.
Preceding "FN" is also removed."""
@@ -57,7 +57,7 @@ def compact(number):
return number
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid company register number. This only
checks the formatting."""
number = compact(number)
@@ -66,7 +66,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid company register number."""
try:
return bool(validate(number))
diff --git a/stdnum/at/postleitzahl.dat b/stdnum/at/postleitzahl.dat
index 47023f46..4e08d067 100644
--- a/stdnum/at/postleitzahl.dat
+++ b/stdnum/at/postleitzahl.dat
@@ -1,5 +1,5 @@
-# generated from PLZ_Verzeichnis_JAN20.xls downloaded from
-# https://www.post.at/en/business_advertise_products_and_services_addresses_postcodes.php
+# generated from https://data.rtr.at/api/v1/tables/plz.json
+# version 53882 published 2025-12-03T14:17:00+01:00
1010 location="Wien" region="Wien"
1020 location="Wien" region="Wien"
1030 location="Wien" region="Wien"
@@ -247,6 +247,7 @@
2551 location="Enzesfeld-Lindabrunn" region="Niederösterreich"
2552 location="Hirtenberg" region="Niederösterreich"
2560 location="Berndorf" region="Niederösterreich"
+2561 location="Hernstein" region="Niederösterreich"
2563 location="Pottenstein" region="Niederösterreich"
2564 location="Weissenbach an der Triesting" region="Niederösterreich"
2565 location="Neuhaus" region="Niederösterreich"
@@ -296,6 +297,7 @@
2811 location="Wiesmath" region="Niederösterreich"
2812 location="Hollenthon" region="Niederösterreich"
2813 location="Lichtenegg" region="Niederösterreich"
+2820 location="Walpersbach" region="Niederösterreich"
2821 location="Lanzenkirchen" region="Niederösterreich"
2822 location="Bad Erlach" region="Niederösterreich"
2823 location="Pitten" region="Niederösterreich"
@@ -460,9 +462,11 @@
3384 location="Groß Sierning" region="Niederösterreich"
3385 location="Prinzersdorf" region="Niederösterreich"
3386 location="Hafnerbach" region="Niederösterreich"
+3388 location="Markersdorf-Haindorf" region="Niederösterreich"
3390 location="Melk" region="Niederösterreich"
-3392 location="Schönbühel an der Donau" region="Niederösterreich"
+3392 location="Dunkelsteinerwald" region="Niederösterreich"
3393 location="Matzleinsdorf" region="Niederösterreich"
+3394 location="Schönbühel-Aggsbach" region="Niederösterreich"
3400 location="Klosterneuburg" region="Niederösterreich"
3413 location="Hintersdorf" region="Niederösterreich"
3420 location="Kritzendorf" region="Niederösterreich"
@@ -722,6 +726,7 @@
4210 location="Gallneukirchen" region="Oberösterreich"
4211 location="Alberndorf in der Riedmark" region="Oberösterreich"
4212 location="Neumarkt im Mühlkreis" region="Oberösterreich"
+4213 location="Unterweitersdorf" region="Oberösterreich"
4221 location="Steyregg" region="Oberösterreich"
4222 location="St. Georgen an der Gusen" region="Oberösterreich"
4223 location="Katsdorf" region="Oberösterreich"
@@ -1040,6 +1045,7 @@
5121 location="Ostermiething" region="Oberösterreich"
5122 location="Ach" region="Oberösterreich"
5123 location="Überackern" region="Oberösterreich"
+5124 location="Haigermoos" region="Oberösterreich"
5131 location="Franking" region="Oberösterreich"
5132 location="Geretsberg" region="Oberösterreich"
5133 location="Gilgenberg am Weilhart" region="Oberösterreich"
@@ -1523,6 +1529,7 @@
7022 location="Schattendorf" region="Burgenland"
7023 location="Zemendorf" region="Burgenland"
7024 location="Hirm" region="Burgenland"
+7025 location="Pöttelsdorf" region="Burgenland"
7031 location="Krensdorf" region="Burgenland"
7032 location="Sigleß" region="Burgenland"
7033 location="Pöttsching" region="Burgenland"
@@ -1592,6 +1599,7 @@
7410 location="Loipersdorf-Kitzladen" region="Burgenland"
7411 location="Markt Allhau" region="Burgenland"
7412 location="Wolfau" region="Burgenland"
+7420 location="Neustift an der Lafnitz" region="Burgenland"
7421 location="Tauchen-Schaueregg" region="Steiermark"
7422 location="Riedlingsdorf" region="Burgenland"
7423 location="Pinkafeld" region="Burgenland"
@@ -1633,8 +1641,13 @@
7542 location="Gerersdorf bei Güssing" region="Burgenland"
7543 location="Kukmirn" region="Burgenland"
7544 location="Tobaj" region="Burgenland"
+7545 location="Neustift bei Güssing" region="Burgenland"
+7546 location="Moschendorf" region="Burgenland"
+7550 location="Wörterberg" region="Burgenland"
7551 location="Stegersbach" region="Burgenland"
7552 location="Stinatz" region="Burgenland"
+7553 location="Bocksdorf" region="Burgenland"
+7554 location="Rohr im Burgenland" region="Burgenland"
7561 location="Heiligenkreuz im Lafnitztal" region="Burgenland"
7562 location="Eltendorf" region="Burgenland"
7563 location="Königsdorf" region="Burgenland"
@@ -1697,6 +1710,7 @@
8160 location="Weiz" region="Steiermark"
8162 location="Passail" region="Steiermark"
8163 location="Fladnitz an der Teichalm" region="Steiermark"
+8164 location="Gutenberg" region="Steiermark"
8171 location="St. Kathrein am Offenegg" region="Steiermark"
8172 location="Heilbrunn" region="Steiermark"
8181 location="St. Ruprecht an der Raab" region="Steiermark"
@@ -1709,6 +1723,7 @@
8200 location="Gleisdorf" region="Steiermark"
8211 location="Ilztal" region="Steiermark"
8212 location="Pischelsdorf am Kulm" region="Steiermark"
+8213 location="Gersdorf an der Feistritz" region="Steiermark"
8221 location="Hirnsdorf" region="Steiermark"
8222 location="St. Johann bei Herberstein" region="Steiermark"
8223 location="Stubenberg am See" region="Steiermark"
@@ -1739,7 +1754,7 @@
8273 location="Ebersdorf" region="Steiermark"
8274 location="Buch" region="Steiermark"
8280 location="Fürstenfeld" region="Steiermark"
-8282 location="Loipersdorf bei Fürstenfeld" region="Steiermark"
+8282 location="Bad Loipersdorf" region="Steiermark"
8283 location="Bad Blumau" region="Steiermark"
8291 location="Burgau" region="Steiermark"
8292 location="Neudau" region="Steiermark"
@@ -1803,7 +1818,6 @@
8461 location="Ehrenhausen" region="Steiermark"
8462 location="Gamlitz" region="Steiermark"
8463 location="Leutschach" region="Steiermark"
-8471 location="Spielfeld" region="Steiermark"
8472 location="Straß in Steiermark" region="Steiermark"
8473 location="Weitersfeld an der Mur" region="Steiermark"
8480 location="Mureck" region="Steiermark"
@@ -1837,7 +1851,6 @@
8562 location="Mooskirchen" region="Steiermark"
8563 location="Ligist" region="Steiermark"
8564 location="Krottendorf-Gaisfeld" region="Steiermark"
-8565 location="St. Johann ob Hohenburg" region="Steiermark"
8570 location="Voitsberg" region="Steiermark"
8572 location="Bärnbach" region="Steiermark"
8573 location="Kainach bei Voitsberg" region="Steiermark"
diff --git a/stdnum/at/postleitzahl.py b/stdnum/at/postleitzahl.py
index feafa843..59c49241 100644
--- a/stdnum/at/postleitzahl.py
+++ b/stdnum/at/postleitzahl.py
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Postleitzahl (Austrian postal code).
@@ -45,17 +43,19 @@
InvalidFormat: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number).strip()
-def info(number):
+def info(number: str) -> dict[str, str]:
"""Return a dictionary of data about the supplied number. This typically
returns the location."""
number = compact(number)
@@ -63,7 +63,7 @@ def info(number):
return numdb.get('at/postleitzahl').info(number)[0][1]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid postal code."""
number = compact(number)
if not isdigits(number):
@@ -75,7 +75,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid postal code."""
try:
return bool(validate(number))
diff --git a/stdnum/at/tin.py b/stdnum/at/tin.py
index 88f0037e..1edb6da3 100644
--- a/stdnum/at/tin.py
+++ b/stdnum/at/tin.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
r"""Abgabenkontonummer (Austrian tax identification number).
@@ -44,17 +42,19 @@
'59-119/9013'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -./,').strip()
-def _min_fa(office):
+def _min_fa(office: str) -> str:
"""Convert the tax office name to something that we can use for
comparison without running into encoding issues."""
return ''.join(
@@ -62,7 +62,7 @@ def _min_fa(office):
if x in 'bcdefghijklmnopqrstvwxyz')
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit."""
number = compact(number)
s = sum(
@@ -71,7 +71,7 @@ def calc_check_digit(number):
return str((10 - s) % 10)
-def info(number):
+def info(number: str) -> dict[str, str]:
"""Return a dictionary of data about the supplied number. This typically
returns the the tax office and region."""
number = compact(number)
@@ -79,7 +79,7 @@ def info(number):
return numdb.get('at/fa').info(number[:2])[0][1]
-def validate(number, office=None):
+def validate(number: str, office: str | None = None) -> str:
"""Check if the number is a valid tax identification number. This checks
the length and formatting. The tax office can be supplied to check that
the number was issued in the specified tax office."""
@@ -93,12 +93,12 @@ def validate(number, office=None):
i = info(number)
if not i:
raise InvalidComponent()
- if office and _min_fa(i.get('office')) != _min_fa(office):
+ if office and _min_fa(i.get('office', '')) != _min_fa(office):
raise InvalidComponent()
return number
-def is_valid(number, office=None):
+def is_valid(number: str, office: str | None = None) -> bool:
"""Check if the number is a valid tax identification number. This checks
the length, formatting and check digit."""
try:
@@ -107,7 +107,7 @@ def is_valid(number, office=None):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '%s-%s/%s' % (number[:2], number[2:5], number[5:])
diff --git a/stdnum/at/uid.py b/stdnum/at/uid.py
index 0ed537bb..07983b5b 100644
--- a/stdnum/at/uid.py
+++ b/stdnum/at/uid.py
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number).
@@ -32,12 +30,14 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum import luhn
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -./').upper().strip()
@@ -46,13 +46,13 @@ def compact(number):
return number
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should not have the
check digit included."""
return str((6 - luhn.checksum(number[1:])) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -65,7 +65,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
diff --git a/stdnum/at/vnr.py b/stdnum/at/vnr.py
index 73745a03..e1a2ee6f 100644
--- a/stdnum/at/vnr.py
+++ b/stdnum/at/vnr.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""VNR, SVNR, VSNR (Versicherungsnummer, Austrian social security number).
@@ -37,24 +35,26 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ')
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The fourth digit in the number is
ignored."""
weights = (3, 7, 9, 0, 5, 8, 4, 2, 1, 6)
return str(sum(w * int(n) for w, n in zip(weights, number)) % 11)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -67,7 +67,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
diff --git a/stdnum/au/__init__.py b/stdnum/au/__init__.py
index 1713e56b..eea4d7c8 100644
--- a/stdnum/au/__init__.py
+++ b/stdnum/au/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Australian numbers."""
+from __future__ import annotations
+
# provide aliases
-from stdnum.au import tfn as vat # noqa: F401
+from stdnum.au import abn as vat # noqa: F401
diff --git a/stdnum/au/abn.py b/stdnum/au/abn.py
index a0d47247..e2a863cf 100644
--- a/stdnum/au/abn.py
+++ b/stdnum/au/abn.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""ABN (Australian Business Number).
@@ -39,17 +37,19 @@
'51 824 753 556'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').strip()
-def calc_check_digits(number):
+def calc_check_digits(number: str) -> str:
"""Calculate the check digits that should be prepended to make the number
valid."""
weights = (3, 5, 7, 9, 11, 13, 15, 17, 19)
@@ -57,7 +57,7 @@ def calc_check_digits(number):
return str(11 + (s - 1) % 89)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid ABN. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -70,7 +70,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid ABN."""
try:
return bool(validate(number))
@@ -78,7 +78,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return ' '.join((number[0:2], number[2:5], number[5:8], number[8:]))
diff --git a/stdnum/au/acn.py b/stdnum/au/acn.py
index 77e62272..9e63c549 100644
--- a/stdnum/au/acn.py
+++ b/stdnum/au/acn.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""ACN (Australian Company Number).
@@ -41,22 +39,24 @@
'43002724334'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the checksum."""
return str((sum(int(n) * (i - 8) for i, n in enumerate(number))) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid ACN. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -69,7 +69,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid ACN."""
try:
return bool(validate(number))
@@ -77,13 +77,13 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return ' '.join((number[0:3], number[3:6], number[6:]))
-def to_abn(number):
+def to_abn(number: str) -> str:
"""Convert the number to an Australian Business Number (ABN)."""
from stdnum.au import abn
number = compact(number)
diff --git a/stdnum/au/tfn.py b/stdnum/au/tfn.py
index d515bac2..6fd319bb 100644
--- a/stdnum/au/tfn.py
+++ b/stdnum/au/tfn.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""TFN (Australian Tax File Number).
@@ -42,23 +40,25 @@
'123 456 782'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').strip()
-def checksum(number):
+def checksum(number: str) -> int:
"""Calculate the checksum."""
weights = (1, 4, 3, 7, 5, 8, 6, 9, 10)
return sum(w * int(n) for w, n in zip(weights, number)) % 11
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid TFN. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -71,7 +71,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid TFN."""
try:
return bool(validate(number))
@@ -79,7 +79,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return ' '.join((number[0:3], number[3:6], number[6:]))
diff --git a/stdnum/az/__init__.py b/stdnum/az/__init__.py
new file mode 100644
index 00000000..b7415cf1
--- /dev/null
+++ b/stdnum/az/__init__.py
@@ -0,0 +1,24 @@
+# __init__.py - collection of Azerbaijan numbers
+# coding: utf-8
+#
+# Copyright (C) 2022 Leandro Regueiro
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""Collection of Azerbaijan numbers."""
+
+from __future__ import annotations
+
+# provide aliases
+from stdnum.az import voen as vat # noqa: F401
diff --git a/stdnum/az/voen.py b/stdnum/az/voen.py
new file mode 100644
index 00000000..d8b98a3b
--- /dev/null
+++ b/stdnum/az/voen.py
@@ -0,0 +1,89 @@
+# voen.py - functions for handling Azerbaijan VOEN numbers
+# coding: utf-8
+#
+# Copyright (C) 2022 Leandro Regueiro
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""VÖEN (Vergi ödəyicisinin eyniləşdirmə nömrəsi, Azerbaijan tax number).
+
+The Vergi ödəyicisinin eyniləşdirmə nömrəsi is issued by the Azerbaijan state
+tax authorities to individuals and legal entities.
+
+This number consists of 10 digits. The first two digits are the code for the
+territorial administrative unit. The following six digits are a serial
+number. The ninth digit is a check digit. The tenth digit represents the
+legal status of a taxpayer: 1 for legal persons and 2 for natural persons.
+
+More information:
+
+* https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Azerbaijan-TIN.pdf
+* https://www.e-taxes.gov.az/ebyn/payerOrVoenChecker.jsp
+
+>>> validate('140 155 5071')
+'1401555071'
+>>> validate('140 155 5081')
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+>>> validate('1400057424')
+Traceback (most recent call last):
+ ...
+InvalidComponent: ...
+""" # noqa: E501
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation.
+
+ This strips the number of any valid separators and removes surrounding
+ whitespace.
+ """
+ number = clean(number, ' ')
+ if len(number) == 9:
+ number = '0' + number
+ return number
+
+
+def _calc_check_digit(number: str) -> str:
+ """Calculate the check digit for the VÖEN."""
+ weights = [4, 1, 8, 6, 2, 7, 5, 3]
+ return str(sum(w * int(n) for w, n in zip(weights, number)) % 11)
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid Azerbaijan VÖEN number."""
+ number = compact(number)
+ if len(number) != 10:
+ raise InvalidLength()
+ if not isdigits(number):
+ raise InvalidFormat()
+ if number[-1] not in ('1', '2'):
+ raise InvalidComponent()
+ if number[-2:-1] != _calc_check_digit(number):
+ raise InvalidChecksum()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid Azerbaijan VÖEN number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
diff --git a/stdnum/be/__init__.py b/stdnum/be/__init__.py
index 83af30b9..fb6b3575 100644
--- a/stdnum/be/__init__.py
+++ b/stdnum/be/__init__.py
@@ -14,11 +14,12 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Belgian numbers."""
+from __future__ import annotations
+
# provide businessid as an alias
+from stdnum.be import nn as personalid # noqa: F401
from stdnum.be import vat as businessid # noqa: F401
diff --git a/stdnum/be/banks.dat b/stdnum/be/banks.dat
index 464f5f6b..fb87c22c 100644
--- a/stdnum/be/banks.dat
+++ b/stdnum/be/banks.dat
@@ -1,64 +1,60 @@
-# generated from current_codes.xls downloaded from
-# https://www.nbb.be/doc/be/be/protocol/current_codes.xls
-# version 24/07/2020
-000-000 bic="BPOTBEB1" bank="bpost bank"
-001-049 bic="GEBABEBB" bank="BNP Paribas Fortis"
-050-099 bic="GKCCBEBB" bank="BELFIUS BANK"
-100-101 bic="NBBEBEBB203" bank="Nationale Bank van België"
-102-102 bank="Uitwisselingscentrum en Verrekening (U.C.V.)"
+# generated from grouped_list_current.xlsx downloaded from
+# https://www.nbb.be/doc/be/be/protocol/grouped_list_current.xlsx
+# version 01/01/2026.
+000-049 bic="GEBABEBB" bank="BNP Paribas Fortis"
+050-099 bic="GKCCBEBB" bank="BELFIUS BANQUE"
+100-100 bic="NBBEBEBB203" bank="Belgische Nationalbank"
+101-101 bic="NBBEBEBBHCC" bank="Belgische Nationalbank (Hauptkasse)"
+102-102 bank="Centre d'Echange et de Compensation (C.E.C.)"
103-108 bic="NICABEBB" bank="Crelan"
109-110 bic="CTBKBEBX" bank="Beobank"
111-111 bic="ABERBE22" bank="Bank J. Van Breda & C°"
113-114 bic="CTBKBEBX" bank="Beobank"
+115-115 bic="PAUIBE22" bank="HR Pay Solutions"
+116-116 bic="ATMNBE32XXX" bank="Atlantic Money NV/SA"
119-124 bic="CTBKBEBX" bank="Beobank"
125-126 bic="CPHBBE75" bank="Banque CPH"
127-127 bic="CTBKBEBX" bank="Beobank"
129-129 bic="CTBKBEBX" bank="Beobank"
+130-130 bic="DIGEBEB2" bank="Digiteal SA"
131-131 bic="CTBKBEBX" bank="Beobank"
-132-132 bic="BNAGBEBB" bank="Bank Nagelmackers"
+132-132 bic="BNAGBEBB" bank="Banque Nagelmackers"
133-134 bic="CTBKBEBX" bank="Beobank"
137-137 bic="GEBABEBB" bank="BNP Paribas Fortis"
140-149 bic="GEBABEBB" bank="BNP Paribas Fortis"
150-150 bic="BCMCBEBB" bank="Bancontact Payconiq Company"
171-171 bic="CPHBBE75" bank="Banque CPH"
-172-173 bic="RABOBE23" bank="Coöperatieve Rabobank U.A."
175-175 bank="Systèmes Technologiques d'Echange et de Traitement - STET"
-176-176 bic="BSCHBEBBRET" bank="Santander Consumer Bank"
-178-179 bic="COBABEBX" bank="Commerzbank"
-183-183 bic="BARBBEBB" bank="Bank of Baroda"
+176-176 bic="BSCHBEBBRET" bank="Santander Consumer Finance – Succursale en Belgique/Bijkantoor in België"
185-185 bic="BBRUBEBB" bank="ING België"
189-189 bic="SMBCBEBB" bank="Sumitomo Mitsui Banking Corporation (SMBC)"
190-199 bic="CREGBEBB" bank="CBC Banque et Assurances"
200-214 bic="GEBABEBB" bank="BNP Paribas Fortis"
-220-298 bic="GEBABEBB" bank="BNP Paribas Fortis"
-299-299 bic="BPOTBEB1" bank="bpost bank"
-300-399 bic="BBRUBEBB" bank="ING België"
+220-299 bic="GEBABEBB" bank="BNP Paribas Fortis"
+300-399 bic="BBRUBEBB" bank="ING Belgium"
400-499 bic="KREDBEBB" bank="KBC Bank"
-500-500 bic="MTPSBEBB" bank="Moneytrans Payment Services"
501-501 bic="DHBNBEBB" bank="Demir-Halk Bank (Nederland) (DHB)"
-504-504 bic="PANXBEB1" bank="PAY-NXT"
+504-504 bic="PANXBEB1" bank="Unifiedpost Payments"
507-507 bic="DIERBE21" bank="Dierickx, Leys & Cie Effectenbank"
-508-508 bic="PARBBEBZMDC" bank="BNP Paribas Securities Services"
+508-508 bic="PARBBEBZMDC" bank="BNP Paribas SA, Belgium Branch – Securities Services business"
509-509 bic="ABNABE2AIPC" bank="ABN AMRO Bank N.V."
-510-510 bic="VAPEBE22" bank="VAN DE PUT & CO Privaatbankiers"
+510-510 bic="VAPEBE22" bank="VAN DE PUT & CO Private Bankers"
512-512 bic="DNIBBE21" bank="NIBC BANK"
513-513 bic="ABNABE2AIPC" bank="ABN AMRO Bank N.V."
-514-514 bic="PUILBEBB" bank="Puilaetco Dewaay Private Bankers"
+514-514 bic="PUILBEBB" bank="Puilaetco Branch of Quintet Private Bank SA"
515-515 bic="IRVTBEBB" bank="The Bank of New York Mellon NV/SA"
521-521 bic="FVLBBE22" bank="F. van Lanschot Bankiers"
522-522 bic="UTWBBEBB" bank="United Taiwan Bank"
-523-523 bic="TRIOBEBB" bank="Triodos Bank"
+523-523 bic="TRIOBEBB" bank="Banque Triodos"
524-524 bic="WAFABEBB" bank="Attijariwafa bank Europe"
-525-525 bic="FVLBBE2E" bank="F. van Lanschot Bankiers"
-530-530 bic="SHIZBEBB" bank="Shizuoka Bank (Europe)"
-535-535 bic="FBHLBE22" bank="CREDIT EUROPE BANK NV"
+525-525 bic="FVLBBE22" bank="F. van Lanschot Bankiers"
538-538 bank="Hoist Finance AB"
541-541 bic="BKIDBE22" bank="BANK OF INDIA"
546-546 bic="WAFABEBB" bank="Attijariwafa bank Europe"
548-548 bic="LOCYBEBB" bank="Lombard Odier (Europe)"
-549-549 bic="CHASBEBX" bank="JP Morgan Chase Bank"
-550-560 bic="GKCCBEBB" bank="BELFIUS BANK"
-562-569 bic="GKCCBEBB" bank="BELFIUS BANK"
+549-549 bic="CHASBEBX" bank="J.P. Morgan SE -Brussels Branch"
+550-560 bic="GKCCBEBB" bank="BELFIUS BANQUE"
+562-569 bic="GKCCBEBB" bank="BELFIUS BANQUE"
570-579 bic="CITIBEBX" bank="Citibank Europe Plc - Belgium Branch"
581-581 bic="MHCBBEBB" bank="Mizuho Bank Europe N.V. Brussels Branch"
583-583 bic="DEGRBEBB" bank="Banque Degroof Petercam Luxembourg"
@@ -66,57 +62,60 @@
586-586 bic="CFFRBEB1" bank="Crédit Foncier de France"
587-587 bic="BIBLBE21" bank="BinckBank"
588-588 bic="CMCIBEB1BTB" bank="Banque Transatlantique Belgium"
-590-594 bic="BSCHBEBB" bank="Santander Consumer Bank"
+590-594 bic="BSCHBEBB" bank="Santander Consumer Finance – Succursale en Belgique/Bijkantoor in België"
595-601 bic="CTBKBEBX" bank="Beobank"
-605-605 bic="BKCHBEBB" bank="Bank of China (Luxembourg) S.A., Brussels Branch"
+603-604 bic="SWNBBEB2" bank="SWAN SAS"
+605-605 bic="BKCHBEBB" bank="Bank of China (Europe) SA Brussels Branch"
607-607 bic="ICBKBEBB" bank="Industrial and Commercial Bank of China (Europe)"
-609-609 bank="Elavon Financial Services Designated Activity Company"
610-613 bic="DEUTBEBE" bank="Deutsche Bank AG"
-624-625 bic="GKCCBEBB" bank="BELFIUS BANK"
-630-631 bic="BBRUBEBB" bank="ING België"
-634-636 bic="BNAGBEBB" bank="Bank Nagelmackers"
-638-638 bic="GKCCBEBB" bank="BELFIUS BANK"
+624-625 bic="GKCCBEBB" bank="BELFIUS BANQUE"
+630-631 bic="BBRUBEBB" bank="ING Belgium"
+634-636 bic="BNAGBEBB" bank="Banque Nagelmackers"
+638-638 bic="GKCCBEBB" bank="BELFIUS BANQUE"
640-640 bic="ADIABE22" bank="KBC Bank N.V. Business Center Diamant"
642-642 bic="BBVABEBB" bank="Banco Bilbao Vizcaya Argentaria"
-643-643 bic="BMPBBEBB" bank="Aion"
+643-643 bic="BMPBBEBB" bank="UniCredit SA/NV"
644-644 bank="FCA Bank S.p.A."
645-645 bic="JVBABE22" bank="Bank J. Van Breda & C°"
-646-647 bic="BNAGBEBB" bank="Bank Nagelmackers"
-648-648 bic="BMPBBEBBVOD" bank="Aion"
-649-649 bank="Caisse d'Epargne et de Prévoyance Hauts de France"
+646-647 bic="BNAGBEBB" bank="Banque Nagelmackers"
+648-648 bic="BMPBBEBBVOD" bank="UniCredit SA/NV"
+649-649 bic="CEPABEB2" bank="Caisse d'Epargne et de Prévoyance Hauts de France"
+650-650 bic="REVOBEB2XXX" bank="Revolut Bank UAB Belgian branch"
651-651 bic="KEYTBEBB" bank="Arkéa Direct Bank (nom commercial / commerciële naam: Keytrade Bank)"
652-652 bic="BBRUBEBB" bank="ING België"
-653-653 bank="Barclays Bank Ireland Plc Brussels Branch"
+653-653 bic="BARCBEBB" bank="Barclays Bank Ireland Plc Brussels Branch"
654-654 bank="Crédit foncier et communal d'Alsace et de Lorraine - Banque"
-657-657 bic="GKCCBEBB" bank="BELFIUS BANK"
+657-657 bic="GKCCBEBB" bank="BELFIUS BANQUE"
658-658 bic="HABBBEBB" bank="Habib Bank"
663-663 bic="BMEUBEB1" bank="BMCE Euro Services"
664-664 bic="BCDMBEBB" bank="Banque Chaabi du Maroc"
-666-666 bank="WORLDLINE NV"
+666-666 bank="WORLDLINE SA"
667-667 bic="CMCIBEB1CIC" bank="Crédit Industriel et Commercial - Succursale de Bruxelles"
668-668 bic="SBINBE2X" bank="State Bank of India"
-669-669 bank="WORLDLINE NV"
+669-669 bank="WORLDLINE SA"
670-670 bank="CNH Industrial Capital EUROPE"
671-671 bic="EURBBE99" bank="Europabank"
-672-672 bic="GKCCBEBB" bank="BELFIUS BANK"
+672-672 bic="GKCCBEBB" bank="BELFIUS BANQUE"
673-673 bic="BBRUBEBB" bank="ING België"
674-674 bic="ABNABE2AIDJ" bank="ABN AMRO Bank N.V."
675-675 bic="BYBBBEBB" bank="Byblos Bank Europe"
676-676 bic="DEGRBEBB" bank="Bank Degroof Petercam"
-677-677 bic="CBPXBE99" bank="Compagnie de Banque Privée Quilvest"
+677-677 bic="CBPXBE99" bank="Intesa Sanpaolo Wealth Management"
678-678 bic="DELEBE22" bank="Delen Private Bank"
679-679 bic="PCHQBEBB" bank="bpost"
-680-680 bic="GKCCBEBB" bank="BELFIUS BANK"
-682-683 bic="GKCCBEBB" bank="BELFIUS BANK"
+680-680 bic="GKCCBEBB" bank="BELFIUS BANQUE"
+682-683 bic="GKCCBEBB" bank="BELFIUS BANQUE"
684-684 bic="SGABBEB2" bank="Société Générale"
-685-686 bic="BOFABE3X" bank="Bank of Amerika Merrill Lynch International DAC - Brussels Branch"
+685-686 bic="BOFABE3X" bank="Bank of America Europe DAC - Brussels Branch"
687-687 bic="MGTCBEBE" bank="Euroclear Bank"
688-688 bic="SGABBEB2" bank="Société Générale"
+689-689 bic="BOFABE3X" bank="Bank of America Europe DAC - Brussels Branch"
693-693 bic="BOTKBEBX" bank="MUFG Bank (Europe)"
694-694 bic="DEUTBEBE" bank="Deutsche Bank AG"
+695-695 bic="MGTCBEBE" bank="Euroclear Bank"
696-696 bic="CRLYBEBB" bank="Crédit Agricole Corporate & Investment Bank"
-698-698 bic="NATXBEB1" bank="Natixis Bank"
-700-709 bic="AXABBE22" bank="AXA Bank Belgium"
+699-699 bic="MGTCBEBE" bank="Euroclear Bank"
+700-709 bic="AXABBE22" bank="Crelan"
719-719 bic="ABNABE2AXXX" bank="ABN AMRO Bank N.V."
722-722 bic="ABNABE2AIPC" bank="ABN AMRO Bank N.V."
725-727 bic="KREDBEBB" bank="KBC Bank"
@@ -126,75 +125,72 @@
733-741 bic="KREDBEBB" bank="KBC Bank"
742-742 bic="CREGBEBB" bank="CBC Banque et Assurances"
743-749 bic="KREDBEBB" bank="KBC Bank"
-750-774 bic="AXABBE22" bank="AXA Bank Belgium"
-775-799 bic="GKCCBEBB" bank="BELFIUS BANK"
-800-816 bic="AXABBE22" bank="AXA Bank Belgium"
+750-765 bic="AXABBE22" bank="Crelan"
+772-774 bic="AXABBE22" bank="Crelan"
+775-799 bic="GKCCBEBB" bank="BELFIUS BANQUE"
+800-806 bic="AXABBE22" bank="Crelan"
817-817 bic="ISAEBEBB" bank="CACEIS Bank Belgian Branch"
823-823 bic="BLUXBEBB" bank="Banque de Luxembourg"
824-824 bank="ING Bank"
825-826 bic="DEUTBEBE" bank="Deutsche Bank AG"
828-828 bic="BBRUBEBB" bank="ING België"
-830-839 bic="GKCCBEBB" bank="BELFIUS BANK"
+830-839 bic="GKCCBEBB" bank="BELFIUS BANQUE"
840-840 bic="PRIBBEBB" bank="Edmond de Rothschild (Europe)"
-844-844 bic="RABOBE22" bank="Rabobank.be"
845-845 bic="DEGRBEBB" bank="Bank Degroof Petercam"
850-853 bic="NICABEBB" bank="Crelan"
859-860 bic="NICABEBB" bank="Crelan"
862-863 bic="NICABEBB" bank="Crelan"
865-866 bic="NICABEBB" bank="Crelan"
868-868 bic="KREDBEBB" bank="KBC Bank"
-871-871 bic="BNAGBEBB" bank="Bank Nagelmackers"
+871-871 bic="BNAGBEBB" bank="Banque Nagelmackers"
873-873 bic="PCHQBEBB" bank="bpost"
876-876 bic="MBWMBEBB" bank="MeDirect Bank S.A."
-877-879 bic="BNAGBEBB" bank="Bank Nagelmackers"
+877-879 bic="BNAGBEBB" bank="Banque Nagelmackers"
880-881 bic="BBRUBEBB" bank="ING België"
883-884 bic="BBRUBEBB" bank="ING België"
887-888 bic="BBRUBEBB" bank="ING België"
890-899 bic="VDSPBE91" bank="vdk bank"
+903-905 bic="TRWIBEB1" bank="Wise Europe SA"
906-906 bic="CEKVBE88" bank="Centrale Kredietverlening (C.K.V.)"
+907-907 bank="Mollie B.V."
908-908 bic="CEKVBE88" bank="Centrale Kredietverlening (C.K.V.)"
910-910 bic="BBRUBEBB" bank="ING België"
-911-911 bic="TUNZBEB1" bank="Ingenico Financial Solutions"
-912-912 bank="Hi - Media Porte Monnaie Electronique"
+911-911 bic="TUNZBEB1" bank="Worldline Financial Solutions nv/SA"
913-913 bic="EPBFBEBB" bank="EPBF"
-914-914 bic="FXBBBEBB" bank="FX4BIZ"
-915-915 bic="OONXBEBB" bank="Oonex"
+914-914 bic="FXBBBEBB" bank="Ibanfirst"
+915-915 bic="OONXBEBB" bank="Equals Money Europe SA"
916-916 bic="GOCFBEB1" bank="GOLD COMMODITIES FOREX (G.C.F.)"
917-917 bank="Buy Way Personal Finance"
920-920 bic="BBRUBEBB" bank="ING België"
922-923 bic="BBRUBEBB" bank="ING België"
924-924 bic="FMMSBEB1" bank="Fimaser"
926-926 bic="EBPBBEB1" bank="Ebury Partners Belgium"
-928-928 bic="VPAYBE21" bank="VIVA Payment Services"
929-931 bic="BBRUBEBB" bank="ING België"
934-934 bic="BBRUBEBB" bank="ING België"
936-936 bic="BBRUBEBB" bank="ING België"
939-939 bic="BBRUBEBB" bank="ING België"
940-940 bic="CLIQBEB1" bank="Banque Centrale de Compensation (Clearnet)"
941-941 bic="CVMCBEBB" bank="C A Indosuez Wealth (Europe)"
-942-942 bic="PUILBEBB" bank="Puilaetco Dewaay Private Bankers"
-943-943 bank="CNH Industrial Financial Services SAS"
-944-944 bank="J.P. Morgan Europe Ltd ."
-945-945 bic="JPMGBEBB" bank="J.P. Morgan Bank Luxembourg - Brussels Branch"
-946-946 bank="J.P. Morgan AG"
-948-948 bank="HomeSend"
-949-949 bic="HSBCBEBB" bank="HSBC France Belgian Branch"
+942-942 bic="PUILBEBB" bank="Puilaetco Branch of Quintet Private Bank SA"
+943-943 bank="IC Financial Services SA – Belgian Branch"
+945-945 bic="JPMGBEBB" bank="J.P. Morgan SE – Brussels Branch"
+948-948 bic="HOMNBEB2" bank="Mastercard Transaction Services (Europe) NV/SA"
+949-949 bic="HSBCBEBB" bank="HSBC Continental Europe Belgium"
950-959 bic="CTBKBEBX" bank="Beobank"
960-960 bic="ABNABE2AIPC" bank="ABN AMRO Bank N.V."
961-961 bic="BBRUBEBB" bank="ING België"
-963-963 bic="AXABBE22" bank="AXA Bank Belgium"
-966-966 bic="NEECBEB2" bank="NewB"
-967-967 bic="TRWIBEB1" bank="TransferWise"
+963-963 bic="AXABBE22" bank="Crelan"
+964-964 bic="FPEBBEB2" bank="FINANCIERE DES PAIEMENTS ELECTRONIQUES SAS - NICKEL BELGIUM"
+967-967 bic="TRWIBEB1" bank="Wise Europe SA"
968-968 bic="ENIBBEBB" bank="Banque Eni"
-969-969 bic="PUILBEBB" bank="Puilaetco Dewaay Private Bankers"
+969-969 bic="PUILBEBB" bank="Puilaetco Branch of Quintet Private Bank SA"
971-971 bic="BBRUBEBB" bank="ING België"
-973-973 bic="ARSPBE22" bank="Argenta Spaarbank (ASPA)"
+973-973 bic="ARSPBE22" bank="Argenta Banque d'Epargne (ASPA)"
974-974 bic="PESOBEB1" bank="PPS EU SA"
-975-975 bic="AXABBE22" bank="AXA Bank Belgium"
+975-975 bic="AXABBE22" bank="Crelan"
976-976 bic="BBRUBEBB" bank="ING België"
-977-977 bank="Paynovate"
-978-980 bic="ARSPBE22" bank="Argenta Spaarbank (ASPA)"
+977-977 bic="PAYVBEB2" bank="Paynovate"
+978-980 bic="ARSPBE22" bank="Argenta Banque d'Epargne (ASPA)"
981-984 bic="PCHQBEBB" bank="bpost"
-985-988 bic="BPOTBEB1" bank="bpost bank"
989-989 bank="bpost"
-990-999 bank="Bpost"
+990-999 bank="Numéros réservés aux paiements par chèques circulaires et assignations"
diff --git a/stdnum/be/bis.py b/stdnum/be/bis.py
new file mode 100644
index 00000000..5bc9f660
--- /dev/null
+++ b/stdnum/be/bis.py
@@ -0,0 +1,128 @@
+# bis.py - functions for handling Belgian BIS numbers
+# coding: utf-8
+#
+# Copyright (C) 2023 Jeff Horemans
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""BIS (Belgian BIS number).
+
+
+The BIS number (BIS-nummer, Numéro BIS) is a unique identification number
+for individuals who are not registered in the National Register, but who
+still have a relationship with the Belgian government.
+This includes frontier workers, persons who own property in Belgium,
+persons with Belgian social security rights but who do not reside in Belgium, etc.
+
+The number is issued by the Belgian Crossroads Bank for Social Security (Banque
+Carrefour de la sécurité sociale, Kruispuntbank voor Sociale Zekerheid) and is
+constructed much in the same way as the Belgian National Number, i.e. consisting of
+11 digits, encoding the person's date of birth and gender, a checksum, etc.
+Other than with the national number though, the month of birth of the BIS number
+is increased by 20 or 40, depending on whether the sex of the person was known
+at the time or not.
+
+
+More information:
+
+* https://sma-help.bosa.belgium.be/en/faq/where-can-i-find-my-bis-number#7326
+* https://www.socialsecurity.be/site_nl/employer/applics/belgianidpro/index.htm
+* https://nl.wikipedia.org/wiki/Rijksregisternummer
+* https://fr.wikipedia.org/wiki/Numéro_de_registre_national
+
+>>> compact('98.47.28-997.65')
+'98472899765'
+>>> validate('98 47 28 997 65')
+'98472899765'
+>>> validate('01 49 07 001 85')
+'01490700185'
+>>> validate('12345678901')
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+>>> format('98472899765')
+'98.47.28-997.65'
+>>> get_birth_date('98.47.28-997.65')
+datetime.date(1998, 7, 28)
+>>> get_birth_year('98.47.28-997.65')
+1998
+>>> get_birth_month('98.47.28-997.65')
+7
+>>> get_gender('98.47.28-997.65')
+'M'
+"""
+
+from __future__ import annotations
+
+import datetime
+
+from stdnum.be import nn
+from stdnum.exceptions import *
+from stdnum.util import isdigits
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the number
+ of any valid separators and removes surrounding whitespace."""
+ return nn.compact(number)
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid BIS Number."""
+ number = compact(number)
+ if not isdigits(number) or int(number) <= 0:
+ raise InvalidFormat()
+ if len(number) != 11:
+ raise InvalidLength()
+ nn._get_birth_date_parts(number)
+ if not 20 <= int(number[2:4]) <= 32 and not 40 <= int(number[2:4]) <= 52:
+ raise InvalidComponent('Month must be in 20..32 or 40..52 range')
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid BIS Number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def format(number: str) -> str:
+ """Reformat the number to the standard presentation format."""
+ return nn.format(number)
+
+
+def get_birth_year(number: str) -> int | None:
+ """Return the year of the birth date."""
+ return nn.get_birth_year(number)
+
+
+def get_birth_month(number: str) -> int | None:
+ """Return the month of the birth date."""
+ return nn.get_birth_month(number)
+
+
+def get_birth_date(number: str) -> datetime.date | None:
+ """Return the date of birth."""
+ return nn.get_birth_date(number)
+
+
+def get_gender(number: str) -> str | None:
+ """Get the person's gender ('M' or 'F'), which for BIS
+ numbers is only known if the month was incremented with 40."""
+ number = compact(number)
+ if int(number[2:4]) >= 40:
+ return nn.get_gender(number)
+ return None
diff --git a/stdnum/be/eid.py b/stdnum/be/eid.py
new file mode 100644
index 00000000..8c553ea0
--- /dev/null
+++ b/stdnum/be/eid.py
@@ -0,0 +1,99 @@
+# eid.py - functions for handling Belgian Identity Card Number.
+# coding: utf-8
+#
+# Copyright (C) 2024 Jeff Horemans
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""eID Number (Belgian electronic Identity Card Number).
+
+The eID is an electronic identity card (with chip), issued to Belgian citizens
+over 12 years old.
+The card number applies only to the card in question and should not be confused
+with the Belgian National Number (Rijksregisternummer, Numéro National),
+that is also included on the card.
+
+The card number consists of 12 digits in the form xxx-xxxxxxx-yy where
+yy is a check digit calculated as the remainder of dividing xxxxxxxxxx by 97.
+If the remainder is 0, the check number is set to 97.
+
+More information:
+
+* https://www.ibz.rrn.fgov.be/nl/identiteitsdocumenten/eid/
+* https://eid.belgium.be/en/what-eid
+* https://www.ibz.rrn.fgov.be/fileadmin/user_upload/nl/rr/instructies/IT-lijst/IT195_Identiteitsbewijs_20240115.pdf
+
+>>> compact('000-0011032-71')
+'000001103271'
+>>> compact('591-1917064-58')
+'591191706458'
+>>> validate('000-0011032-71')
+'000001103271'
+>>> validate('591-1917064-58')
+'591191706458'
+>>> validate('591-2010999-97')
+'591201099997'
+>>> validate('000-0011032-25')
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+>>> format('591191706458')
+'591-1917064-58'
+"""
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the
+ number of any valid separators and removes surrounding whitespace."""
+ return clean(number, ' -./').upper().strip()
+
+
+def _calc_check_digits(number: str) -> str:
+ """Calculate the expected check digits for the number, calculated as
+ the remainder of dividing the first 10 digits of the number by 97.
+ If the remainder is 0, the check number is set to 97.
+ """
+ return '%02d' % ((int(number[:10]) % 97) or 97)
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid ID card number.
+ This checks the length, formatting and check digit."""
+ number = compact(number)
+ if not isdigits(number) or int(number) <= 0:
+ raise InvalidFormat()
+ if len(number) != 12:
+ raise InvalidLength()
+ if _calc_check_digits(number[:-2]) != number[-2:]:
+ raise InvalidChecksum()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid Belgian ID Card number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def format(number: str) -> str:
+ """Reformat the number to the standard presentation format."""
+ number = compact(number)
+ return '-'.join((number[:3], number[3:10], number[10:]))
diff --git a/stdnum/be/iban.py b/stdnum/be/iban.py
index ca740db3..906b7ffb 100644
--- a/stdnum/be/iban.py
+++ b/stdnum/be/iban.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Belgian IBAN (International Bank Account Number).
@@ -47,6 +45,8 @@
True
"""
+from __future__ import annotations
+
from stdnum import iban
from stdnum.exceptions import *
@@ -58,13 +58,13 @@
format = iban.format
-def _calc_check_digits(number):
+def _calc_check_digits(number: str) -> str:
"""Calculate the check digits over the provided part of the number."""
check = int(number) % 97
return '%02d' % (check or 97)
-def info(number):
+def info(number: str) -> dict[str, str]:
"""Return a dictionary of data about the supplied number. This typically
returns the name of the bank and a BIC if it is valid."""
number = compact(number)
@@ -72,14 +72,12 @@ def info(number):
return numdb.get('be/banks').info(number[4:7])[0][1]
-def to_bic(number):
+def to_bic(number: str) -> str | None:
"""Return the BIC for the bank that this number refers to."""
- bic = info(number).get('bic')
- if bic:
- return str(bic)
+ return info(number).get('bic')
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid Belgian IBAN."""
number = iban.validate(number, check_country=False)
if not number.startswith('BE'):
@@ -91,7 +89,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid Belgian IBAN."""
try:
return bool(validate(number))
diff --git a/stdnum/be/nn.py b/stdnum/be/nn.py
new file mode 100644
index 00000000..39eafb93
--- /dev/null
+++ b/stdnum/be/nn.py
@@ -0,0 +1,195 @@
+# nn.py - function for handling Belgian national numbers
+# coding: utf-8
+#
+# Copyright (C) 2021-2022 Cédric Krier
+# Copyright (C) 2023 Jeff Horemans
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""NN, NISS, RRN (Belgian national number).
+
+The national registration number (Rijksregisternummer, Numéro de registre
+national, Nationalregisternummer) is a unique identification number of
+natural persons who are registered in Belgium.
+
+The number consists of 11 digits and includes the person's date of birth and
+gender. It encodes the date of birth in the first 6 digits in the format
+YYMMDD. The following 3 digits represent a counter of people born on the same
+date, seperated by sex (odd for male and even for females respectively). The
+final 2 digits form a check number based on the 9 preceding digits.
+
+Special cases include:
+
+* Counter exhaustion:
+ When the even or uneven day counter range for a specific date of birth runs
+ out, (e.g. from 001 tot 997 for males), the first 2 digits will represent
+ the birth year as normal, while the next 4 digits (birth month and day) are
+ taken to be zeroes. The remaining 3 digits still represent a day counter
+ which will then restart.
+ When those ranges would run out also, the sixth digit is incremented with 1
+ and the day counter will restart again.
+
+* Incomplete date of birth
+ When the exact month or day of the birth date were not known at the time of
+ assignment, incomplete parts are taken to be zeroes, similarly as with
+ counter exhaustion.
+ Note that a month with zeroes can thus both mean the date of birth was not
+ exactly known, or the person was born on a day were at least 500 persons of
+ the same gender got a number assigned already.
+
+* Unknown date of birth
+ When no part of the date of birth was known, a fictitious date is used
+ depending on the century (i.e. 1900/00/01 or 2000/00/01).
+
+More information:
+
+* https://nl.wikipedia.org/wiki/Rijksregisternummer
+* https://fr.wikipedia.org/wiki/Numéro_de_registre_national
+* https://www.ibz.rrn.fgov.be/fileadmin/user_upload/nl/rr/instructies/IT-lijst/IT000_Rijksregisternummer.pdf
+
+>>> compact('85.07.30-033 28')
+'85073003328'
+>>> validate('85 07 30 033 28')
+'85073003328'
+>>> validate('17 07 30 033 84')
+'17073003384'
+>>> validate('12345678901')
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+>>> format('85073003328')
+'85.07.30-033.28'
+>>> get_birth_date('85.07.30-033 28')
+datetime.date(1985, 7, 30)
+>>> get_birth_year('85.07.30-033 28')
+1985
+>>> get_birth_month('85.07.30-033 28')
+7
+>>> get_gender('85.07.30-033 28')
+'M'
+"""
+
+from __future__ import annotations
+
+import calendar
+import datetime
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the number
+ of any valid separators and removes surrounding whitespace."""
+ number = clean(number, ' -.').strip()
+ return number
+
+
+def _checksum(number: str) -> int:
+ """Calculate the checksum and return the detected century."""
+ numbers = [number]
+ if int(number[:2]) + 2000 <= datetime.date.today().year:
+ numbers.append('2' + number)
+ for century, n in zip((1900, 2000), numbers):
+ if 97 - (int(n[:-2]) % 97) == int(n[-2:]):
+ return century
+ raise InvalidChecksum()
+
+
+def _get_birth_date_parts(number: str) -> tuple[int | None, int | None, int | None]:
+ """Check if the number's encoded birth date is valid, and return the contained
+ birth year, month and day of month, accounting for unknown values."""
+ century = _checksum(number)
+
+ # If the fictitious dates 1900/00/01 or 2000/00/01 are detected,
+ # the birth date (including the year) was not known when the number
+ # was issued.
+ if number[:6] in ('000001', '002001', '004001'):
+ return (None, None, None)
+
+ year = int(number[:2]) + century
+ month = int(number[2:4]) % 20
+ day = int(number[4:6])
+ # When the month is zero, it was either unknown when the number was issued,
+ # or the day counter ran out. In both cases, the month and day are not known
+ # reliably.
+ if month == 0:
+ return (year, None, None)
+
+ # Verify range of month
+ if month > 12:
+ raise InvalidComponent('Month must be in 1..12')
+
+ # Case when only the day of the birth date is unknown
+ if day == 0 or day > calendar.monthrange(year, month)[1]:
+ return (year, month, None)
+
+ return (year, month, day)
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid National Number."""
+ number = compact(number)
+ if not isdigits(number) or int(number) <= 0:
+ raise InvalidFormat()
+ if len(number) != 11:
+ raise InvalidLength()
+ _get_birth_date_parts(number)
+ if not 0 <= int(number[2:4]) <= 12:
+ raise InvalidComponent('Month must be in 1..12')
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid National Number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def format(number: str) -> str:
+ """Reformat the number to the standard presentation format."""
+ number = compact(number)
+ return (
+ '.'.join(number[i:i + 2] for i in range(0, 6, 2)) +
+ '-' + '.'.join([number[6:9], number[9:11]]))
+
+
+def get_birth_year(number: str) -> int | None:
+ """Return the year of the birth date."""
+ year, month, day = _get_birth_date_parts(compact(number))
+ return year
+
+
+def get_birth_month(number: str) -> int | None:
+ """Return the month of the birth date."""
+ year, month, day = _get_birth_date_parts(compact(number))
+ return month
+
+
+def get_birth_date(number: str) -> datetime.date | None:
+ """Return the date of birth."""
+ year, month, day = _get_birth_date_parts(compact(number))
+ if year and month and day:
+ return datetime.date(year, month, day)
+ return None
+
+
+def get_gender(number: str) -> str:
+ """Get the person's gender ('M' or 'F')."""
+ number = compact(number)
+ if int(number[6:9]) % 2:
+ return 'M'
+ return 'F'
diff --git a/stdnum/be/ogm_vcs.py b/stdnum/be/ogm_vcs.py
new file mode 100644
index 00000000..31a1dc22
--- /dev/null
+++ b/stdnum/be/ogm_vcs.py
@@ -0,0 +1,79 @@
+# ogm_vcs.py - functions for handling Belgian OGM-VCS
+# coding: utf-8
+#
+# Copyright (C) 2025 Cédric Krier
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""Belgian OGM-VCS.
+
+The OGM-VCS is used in bank transfer as structured communication.
+
+* https://febelfin.be/en/publications/2023/febelfin-banking-standards-for-online-banking
+
+>>> validate('+++010/8068/17183+++')
+'010806817183'
+>>> validate('010/8068/17180')
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+>>> format('010806817183')
+'010/8068/17183'
+>>> calc_check_digits('0108068171')
+'83'
+"""
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the number
+ of any invalid separators and removes surrounding whitespace."""
+ return clean(number, ' +/').strip()
+
+
+def calc_check_digits(number: str) -> str:
+ """Calculate the check digit that should be added."""
+ number = compact(number)
+ return '%02d' % ((int(number[:10]) % 97) or 97)
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid OGM-VCS."""
+ number = compact(number)
+ if not isdigits(number) or int(number) <= 0:
+ raise InvalidFormat()
+ if len(number) != 12:
+ raise InvalidLength()
+ if calc_check_digits(number) != number[-2:]:
+ raise InvalidChecksum()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid VAT number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def format(number: str) -> str:
+ """Format the number provided for output."""
+ number = compact(number)
+ number = number.rjust(12, '0')
+ return f'{number[:3]}/{number[3:7]}/{number[7:]}'
diff --git a/stdnum/be/ssn.py b/stdnum/be/ssn.py
new file mode 100644
index 00000000..0166d819
--- /dev/null
+++ b/stdnum/be/ssn.py
@@ -0,0 +1,159 @@
+# coding: utf-8
+# ssn.py - function for handling Belgian social security numbers
+#
+# Copyright (C) 2023-2024 Jeff Horemans
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""SSN, INSZ, NISS (Belgian social security number).
+
+The Belgian social security identification number, also known as the INSZ
+number (Identificatienummer van de sociale zekerheid), NISS number (Numéro
+d'identification de la sécurité sociale) or ENSS number (Erkennungsnummer
+der sozialen Sicherheit), is the unique identification number of a person
+working in or covered for social benefits in Belgium.
+
+For Belgian residents, the number is identical to their Belgian National
+Number (Rijksregisternummer, Numéro National).
+For non-residents, the number is identical to their Belgian BIS number.
+
+Both numbers consists of 11 digits and encode a person's date of birth and
+gender. It encodes the date of birth in the first 6 digits in the format
+YYMMDD. The following 3 digits represent a counter of people born on the same
+date, separated by sex (odd for male and even for females respectively). The
+final 2 digits form a check number based on the 9 preceding digits.
+
+
+More information:
+
+* https://www.socialsecurity.be/site_nl/employer/applics/belgianidpro/index.htm
+* https://overheid.vlaanderen.be/personeel/regelgeving/insz-nummer
+* https://www.ksz-bcss.fgov.be/nl/project/rijksregisterksz-registers
+
+>>> compact('85.07.30-033 28')
+'85073003328'
+>>> compact('98.47.28-997.65')
+'98472899765'
+>>> validate('85 07 30 033 28')
+'85073003328'
+>>> validate('98 47 28 997 65')
+'98472899765'
+>>> validate('17 07 30 033 84')
+'17073003384'
+>>> validate('01 49 07 001 85')
+'01490700185'
+>>> validate('12345678901')
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+
+>>> guess_type('85.07.30-033 28')
+'nn'
+>>> guess_type('98.47.28-997.65')
+'bis'
+
+>>> format('85073003328')
+'85.07.30-033.28'
+>>> get_birth_date('85.07.30-033 28')
+datetime.date(1985, 7, 30)
+>>> get_birth_year('85.07.30-033 28')
+1985
+>>> get_birth_month('85.07.30-033 28')
+7
+>>> get_gender('85.07.30-033 28')
+'M'
+
+>>> format('98472899765')
+'98.47.28-997.65'
+>>> get_birth_date('98.47.28-997.65')
+datetime.date(1998, 7, 28)
+>>> get_birth_year('98.47.28-997.65')
+1998
+>>> get_birth_month('98.47.28-997.65')
+7
+>>> get_gender('98.47.28-997.65')
+'M'
+
+"""
+
+from __future__ import annotations
+
+import datetime
+
+from stdnum.be import bis, nn
+from stdnum.exceptions import *
+
+
+_ssn_modules = (nn, bis)
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the
+ number of any valid separators and removes surrounding whitespace."""
+ return nn.compact(number)
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid Belgian SSN. This searches for
+ the proper sub-type and validates using that."""
+ try:
+ return bis.validate(number)
+ except InvalidComponent:
+ # Only try NN validation in case of an invalid component,
+ # other validation errors are shared between BIS and NN
+ return nn.validate(number)
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid Belgian SSN number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def guess_type(number: str) -> str | None:
+ """Return the Belgian SSN type for which this number is valid."""
+ for mod in _ssn_modules:
+ if mod.is_valid(number):
+ return mod.__name__.rsplit('.', 1)[-1]
+ return None
+
+
+def format(number: str) -> str:
+ """Reformat the number to the standard presentation format."""
+ return nn.format(number)
+
+
+def get_birth_year(number: str) -> int | None:
+ """Return the year of the birth date."""
+ return nn.get_birth_year(number)
+
+
+def get_birth_month(number: str) -> int | None:
+ """Return the month of the birth date."""
+ return nn.get_birth_month(number)
+
+
+def get_birth_date(number: str) -> datetime.date | None:
+ """Return the date of birth."""
+ return nn.get_birth_date(number)
+
+
+def get_gender(number: str) -> str | None:
+ """Get the person's gender ('M' or 'F')."""
+ for mod in _ssn_modules:
+ if mod.is_valid(number):
+ return mod.get_gender(number) # type: ignore[no-any-return]
+ return None
diff --git a/stdnum/be/vat.py b/stdnum/be/vat.py
index e7bbfb93..f46a30ce 100644
--- a/stdnum/be/vat.py
+++ b/stdnum/be/vat.py
@@ -1,6 +1,6 @@
# vat.py - functions for handling Belgian VAT numbers
#
-# Copyright (C) 2012-2016 Arthur de Jong
+# Copyright (C) 2012-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""BTW, TVA, NWSt, ondernemingsnummer (Belgian enterprise number).
@@ -35,11 +33,13 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -./').upper().strip()
@@ -52,25 +52,27 @@ def compact(number):
return number
-def checksum(number):
+def checksum(number: str) -> int:
"""Calculate the checksum."""
return (int(number[:-2]) + int(number[-2:])) % 97
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length,
formatting and check digit."""
number = compact(number)
- if not isdigits(number):
+ if not isdigits(number) or int(number) <= 0:
raise InvalidFormat()
if len(number) != 10:
raise InvalidLength()
+ if not number[0] in '01':
+ raise InvalidComponent()
if checksum(number) != 0:
raise InvalidChecksum()
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
diff --git a/stdnum/bg/__init__.py b/stdnum/bg/__init__.py
index ca12a417..e89c2e7d 100644
--- a/stdnum/bg/__init__.py
+++ b/stdnum/bg/__init__.py
@@ -14,8 +14,6 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Bulgarian numbers."""
diff --git a/stdnum/bg/egn.py b/stdnum/bg/egn.py
index 9591182b..8bcecdb5 100644
--- a/stdnum/bg/egn.py
+++ b/stdnum/bg/egn.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes).
@@ -41,26 +39,28 @@
InvalidComponent: ...
"""
+from __future__ import annotations
+
import datetime
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -.').upper().strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should not have the
check digit included."""
weights = (2, 4, 8, 5, 10, 9, 7, 3, 6)
return str(sum(w * int(n) for w, n in zip(weights, number)) % 11 % 10)
-def get_birth_date(number):
+def get_birth_date(number: str) -> datetime.date:
"""Split the date parts from the number and return the birth date."""
number = compact(number)
year = int(number[0:2]) + 1900
@@ -78,7 +78,7 @@ def get_birth_date(number):
raise InvalidComponent()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid national identification number. This
checks the length, formatting, embedded date and check digit."""
number = compact(number)
@@ -95,7 +95,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid national identification number."""
try:
return bool(validate(number))
diff --git a/stdnum/bg/pnf.py b/stdnum/bg/pnf.py
index 9486371e..5fa0f1f6 100644
--- a/stdnum/bg/pnf.py
+++ b/stdnum/bg/pnf.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner).
@@ -35,24 +33,26 @@
InvalidFormat: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -.').upper().strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should not have the
check digit included."""
weights = (21, 19, 17, 13, 11, 9, 7, 3, 1)
return str(sum(w * int(n) for w, n in zip(weights, number)) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid national identification number. This
checks the length, formatting, embedded date and check digit."""
number = compact(number)
@@ -65,7 +65,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid national identification number."""
try:
return bool(validate(number))
diff --git a/stdnum/bg/vat.py b/stdnum/bg/vat.py
index c3717c73..1f45198e 100644
--- a/stdnum/bg/vat.py
+++ b/stdnum/bg/vat.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""VAT (Идентификационен номер по ДДС, Bulgarian VAT number).
@@ -34,12 +32,14 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.bg import egn, pnf
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -.').upper().strip()
@@ -48,7 +48,7 @@ def compact(number):
return number
-def calc_check_digit_legal(number):
+def calc_check_digit_legal(number: str) -> str:
"""Calculate the check digit for legal entities. The number passed
should not have the check digit included."""
check = sum((i + 1) * int(n) for i, n in enumerate(number)) % 11
@@ -57,14 +57,14 @@ def calc_check_digit_legal(number):
return str(check % 10)
-def calc_check_digit_other(number):
+def calc_check_digit_other(number: str) -> str:
"""Calculate the check digit for others. The number passed should not
have the check digit included."""
weights = (4, 3, 2, 7, 6, 5, 4, 3, 2)
return str((11 - sum(w * int(n) for w, n in zip(weights, number))) % 11)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -84,7 +84,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
diff --git a/stdnum/bic.py b/stdnum/bic.py
index a4f2a500..7f4b69f4 100644
--- a/stdnum/bic.py
+++ b/stdnum/bic.py
@@ -1,7 +1,7 @@
# bic.py - functions for handling ISO 9362 Business identifier codes
#
# Copyright (C) 2015 Lifealike Ltd
-# Copyright (C) 2017-2018 Arthur de Jong
+# Copyright (C) 2017-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""BIC (ISO 9362 Business identifier codes).
@@ -28,6 +26,10 @@
and a 2 character location code, optionally followed by a three character
branch code.
+More information:
+
+* https://en.wikipedia.org/wiki/ISO_9362
+
>>> validate('AGRIFRPP882')
'AGRIFRPP882'
>>> validate('ABNA BE 2A')
@@ -47,22 +49,52 @@
"""
+from __future__ import annotations
+
import re
from stdnum.exceptions import *
from stdnum.util import clean
-_bic_re = re.compile(r'^[A-Z]{6}[0-9A-Z]{2}([0-9A-Z]{3})?$')
-
-
-def compact(number):
+_bic_re = re.compile(r'^[A-Z]{4}(?P[A-Z]{2})[0-9A-Z]{2}([0-9A-Z]{3})?$')
+
+
+# Valid BIC country codes are ISO 3166-1 alpha-2 with the addition of
+# XK for the Republic of Kosovo
+# It seems that some of the countries included here don't currently have
+# any banks with a BIC code (e.g. Antarctica, Iran, Myanmar)
+_country_codes = {
+ 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU',
+ 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL',
+ 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC',
+ 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV',
+ 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG',
+ 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD',
+ 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT',
+ 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM',
+ 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH',
+ 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK',
+ 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH',
+ 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW',
+ 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR',
+ 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR',
+ 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC',
+ 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS',
+ 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL',
+ 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY',
+ 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'XK', 'YE', 'YT',
+ 'ZA', 'ZM', 'ZW',
+}
+
+
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any surrounding whitespace."""
return clean(number, ' -').strip().upper()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid routing number. This checks the length
and characters in each position."""
number = compact(number)
@@ -71,10 +103,12 @@ def validate(number):
match = _bic_re.search(number)
if not match:
raise InvalidFormat()
+ if match.group('country_code') not in _country_codes:
+ raise InvalidComponent()
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid BIC."""
try:
return bool(validate(number))
@@ -82,6 +116,6 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
return compact(number)
diff --git a/stdnum/bitcoin.py b/stdnum/bitcoin.py
index 9e855127..4cf2bd90 100644
--- a/stdnum/bitcoin.py
+++ b/stdnum/bitcoin.py
@@ -13,14 +13,12 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Bitcoin address.
A Bitcoin address is an identifier that is used as destination in a Bitcoin
-transaction. It is based on a hash of the public portion of a keypair.
+transaction. It is based on a hash of the public portion of a key pair.
There are currently three address formats in use:
@@ -42,15 +40,18 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
import hashlib
import struct
+from collections.abc import Iterable
from functools import reduce
from stdnum.exceptions import *
from stdnum.util import clean
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' ').strip()
@@ -63,7 +64,7 @@ def compact(number):
_base58_alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
-def b58decode(s):
+def b58decode(s: str) -> bytes:
"""Decode a Base58 encoded string to a bytestring."""
value = reduce(lambda a, c: a * 58 + _base58_alphabet.index(c), s, 0)
result = b''
@@ -84,18 +85,18 @@ def b58decode(s):
(1 << 3, 0x3d4233dd), (1 << 4, 0x2a1462b3))
-def bech32_checksum(values):
+def bech32_checksum(values: Iterable[int]) -> int:
"""Calculate the Bech32 checksum."""
chk = 1
for value in values:
top = chk >> 25
chk = (chk & 0x1ffffff) << 5 | value
- for t, v in _bech32_generator:
- chk ^= v if top & t else 0
+ for test, val in _bech32_generator:
+ chk ^= val if top & test else 0
return chk
-def b32decode(data):
+def b32decode(data: Iterable[int]) -> bytes:
"""Decode a list of Base32 values to a bytestring."""
acc, bits = 0, 0
result = b''
@@ -110,12 +111,12 @@ def b32decode(data):
return result
-def _expand_hrp(hrp):
+def _expand_hrp(hrp: str) -> list[int]:
"""Convert the human-readable part to format for checksum calculation."""
return [ord(c) >> 5 for c in hrp] + [0] + [ord(c) & 31 for c in hrp]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is valid. This checks the length and
check digit."""
number = compact(number)
@@ -150,7 +151,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is valid. This checks the length and
check digit."""
try:
diff --git a/stdnum/br/__init__.py b/stdnum/br/__init__.py
index 3b2d22fa..2b87a56d 100644
--- a/stdnum/br/__init__.py
+++ b/stdnum/br/__init__.py
@@ -14,9 +14,10 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Brazilian numbers."""
+
+from __future__ import annotations
+
from stdnum.br import cnpj as vat # noqa: F401
diff --git a/stdnum/br/cnpj.py b/stdnum/br/cnpj.py
index e2fbcdbe..27ed419e 100644
--- a/stdnum/br/cnpj.py
+++ b/stdnum/br/cnpj.py
@@ -1,7 +1,7 @@
# cnpj.py - functions for handling CNPJ numbers
# coding: utf-8
#
-# Copyright (C) 2015 Arthur de Jong
+# Copyright (C) 2015-2026 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,18 +14,18 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CNPJ (Cadastro Nacional da Pessoa Jurídica, Brazilian company identifier).
-Numbers from the national register of legal entities have 14 digits. The
-first 8 digits identify the company, the following 4 digits identify a
+Numbers from the national register of legal entities have 14 alphanumeric digits.
+The first 8 digits identify the company, the following 4 digits identify a
business unit and the last 2 digits are check digits.
>>> validate('16.727.230/0001-97')
'16727230000197'
+>>> validate('12. ABC.345 /01DE–35') # new format from July 2026 onwards
+'12ABC34501DE35'
>>> validate('16.727.230.0001-98')
Traceback (most recent call last):
...
@@ -38,31 +38,41 @@
'16.727.230/0001-97'
"""
+from __future__ import annotations
+
+import re
+
from stdnum.exceptions import *
-from stdnum.util import clean, isdigits
+from stdnum.util import clean
+
+# Minimal regex of valid characters
+_cnpj_re = re.compile(r'^[\dA-Z]+$')
-def compact(number):
+
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
- return clean(number, ' -./').strip()
+ return clean(number, ' -./').strip().upper()
-def calc_check_digits(number):
+def calc_check_digits(number: str) -> str:
"""Calculate the check digits for the number."""
- d1 = (11 - sum(((3 - i) % 8 + 2) * int(n)
- for i, n in enumerate(number[:12]))) % 11 % 10
- d2 = (11 - sum(((4 - i) % 8 + 2) * int(n)
- for i, n in enumerate(number[:12])) -
- 2 * d1) % 11 % 10
- return '%d%d' % (d1, d2)
+ number = compact(number)
+ values = [ord(n) - 48 for n in number[:12]]
+ weights = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]
+ d1 = (11 - sum(w * v for w, v in zip(weights, values))) % 11 % 10
+ values.append(d1)
+ weights = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]
+ d2 = (11 - sum(w * v for w, v in zip(weights, values))) % 11 % 10
+ return f'{d1}{d2}'
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid CNPJ. This checks the length and
whether the check digits are correct."""
number = compact(number)
- if not isdigits(number) or int(number) <= 0:
+ if not _cnpj_re.match(number) or number.startswith('000000000000'):
raise InvalidFormat()
if len(number) != 14:
raise InvalidLength()
@@ -71,7 +81,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid CNPJ."""
try:
return bool(validate(number))
@@ -79,7 +89,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return (number[0:2] + '.' + number[2:5] + '.' + number[5:8] + '/' +
diff --git a/stdnum/br/cpf.py b/stdnum/br/cpf.py
index d0e5dbb8..9dc06610 100644
--- a/stdnum/br/cpf.py
+++ b/stdnum/br/cpf.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CPF (Cadastro de Pessoas Físicas, Brazilian national identifier).
@@ -42,17 +40,19 @@
'231.002.999-00'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -.').strip()
-def _calc_check_digits(number):
+def _calc_check_digits(number: str) -> str:
"""Calculate the check digits for the number."""
d1 = sum((10 - i) * int(number[i]) for i in range(9))
d1 = (11 - d1) % 11 % 10
@@ -61,7 +61,7 @@ def _calc_check_digits(number):
return '%d%d' % (d1, d2)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid CPF. This checks the length and whether
the check digit is correct."""
number = compact(number)
@@ -74,7 +74,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid CPF."""
try:
return bool(validate(number))
@@ -82,7 +82,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return number[:3] + '.' + number[3:6] + '.' + number[6:-2] + '-' + number[-2:]
diff --git a/stdnum/by/__init__.py b/stdnum/by/__init__.py
index 893f3864..bcfcf006 100644
--- a/stdnum/by/__init__.py
+++ b/stdnum/by/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Belarusian numbers."""
+from __future__ import annotations
+
# provide aliases
from stdnum.by import unp as vat # noqa: F401
diff --git a/stdnum/by/portal.nalog.gov.by.crt b/stdnum/by/portal.nalog.gov.by.crt
deleted file mode 100644
index edb4954e..00000000
--- a/stdnum/by/portal.nalog.gov.by.crt
+++ /dev/null
@@ -1,47 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
-MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
-DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow
-SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT
-GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF
-q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8
-SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0
-Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA
-a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj
-/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T
-AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG
-CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv
-bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k
-c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw
-VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC
-ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz
-MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu
-Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF
-AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo
-uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/
-wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu
-X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG
-PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6
-KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
-MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
-DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
-PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
-Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
-rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
-OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
-xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
-7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
-aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
-HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
-SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
-ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
-AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
-R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
-JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
-Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
------END CERTIFICATE-----
diff --git a/stdnum/by/unp.py b/stdnum/by/unp.py
index 14b7a0ec..f17cc967 100644
--- a/stdnum/by/unp.py
+++ b/stdnum/by/unp.py
@@ -1,7 +1,7 @@
# unp.py - functions for handling Belarusian UNP numbers
# coding: utf-8
#
-# Copyright (C) 2020 Arthur de Jong
+# Copyright (C) 2020-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""УНП, UNP (Учетный номер плательщика, the Belarus VAT number).
@@ -41,32 +39,31 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
-from stdnum.util import clean, isdigits, to_unicode
+from stdnum.util import clean, isdigits
# Mapping of Cyrillic letters to Latin letters
_cyrillic_to_latin = dict(zip(
- u'АВЕКМНОРСТ',
- u'ABEKMHOPCT',
+ 'АВЕКМНОРСТ',
+ 'ABEKMHOPCT',
))
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' ').upper().strip()
- for prefix in ('УНП', u'УНП', 'UNP', u'UNP'):
- if type(number) == type(prefix) and number.startswith(prefix):
+ for prefix in ('УНП', 'UNP'):
+ if number.startswith(prefix):
number = number[len(prefix):]
# Replace Cyrillic letters with Latin letters
- cleaned = ''.join(_cyrillic_to_latin.get(x, x) for x in to_unicode(number))
- if type(cleaned) != type(number): # pragma: no cover (Python2 only)
- cleaned = cleaned.encode('utf-8')
- return cleaned
+ return ''.join(_cyrillic_to_latin.get(x, x) for x in number)
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit for the number."""
number = compact(number)
alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -79,7 +76,7 @@ def calc_check_digit(number):
return str(c)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid number. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -96,7 +93,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid number."""
try:
return bool(validate(number))
@@ -104,19 +101,27 @@ def is_valid(number):
return False
-def check_nalog(number, timeout=30): # pragma: no cover (not part of normal test suite)
+def check_nalog(
+ number: str,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> dict[str, str | None] | None: # pragma: no cover (not part of normal test suite)
"""Retrieve registration information from the portal.nalog.gov.by web site.
+ The `timeout` argument specifies the network timeout in seconds.
+
+ The `verify` argument is either a boolean that determines whether the
+ server's certificate is validate or a string which must be a path the CA
+ certificate bundle to use for verification.
+
This basically returns the JSON response from the web service as a dict.
Will return ``None`` if the number is invalid or unknown.
"""
# this function isn't automatically tested because it would require
# network access for the tests and unnecessarily load the web service
- import requests
- from pkg_resources import resource_filename
# Since the nalog.gov.by web site currently provides an incomplete
# certificate chain, we provide our own.
- certificate = resource_filename(__name__, 'portal.nalog.gov.by.crt')
+ import requests
response = requests.get(
'https://www.portal.nalog.gov.by/grp/getData',
params={
@@ -124,6 +129,7 @@ def check_nalog(number, timeout=30): # pragma: no cover (not part of normal tes
'charset': 'UTF-8',
'type': 'json'},
timeout=timeout,
- verify=certificate)
- if response.ok:
- return response.json()['ROW']
+ verify=verify)
+ if response.ok and response.content:
+ return response.json()['row'] # type: ignore[no-any-return]
+ return None
diff --git a/stdnum/ca/__init__.py b/stdnum/ca/__init__.py
index 5d44d1e4..f1b06218 100644
--- a/stdnum/ca/__init__.py
+++ b/stdnum/ca/__init__.py
@@ -14,9 +14,10 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Canadian numbers."""
+
+from __future__ import annotations
+
from stdnum.ca import bn as vat # noqa: F401
diff --git a/stdnum/ca/bc_phn.py b/stdnum/ca/bc_phn.py
new file mode 100644
index 00000000..e273258d
--- /dev/null
+++ b/stdnum/ca/bc_phn.py
@@ -0,0 +1,102 @@
+# bc_phn.py - functions for handling British Columbia Personal Health Numbers (PHNs)
+# coding: utf-8
+#
+# Copyright (C) 2023 Ömer Boratav
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""BC PHN (British Columbia Personal Health Number).
+
+A unique, numerical, lifetime identifier used in the specific identification
+of an individual client or patient who has had any interaction with the
+British Columbia health system. It is assigned only to and used by one person
+and will not be assigned to any other person.
+
+The existence of a PHN does not imply eligibility for health care services in
+BC or provide any indication of an individual’s benefit status.
+
+The PNH is a 10-digit number where the first digit is always 9, and the last
+digit is a MOD-11 check digit.
+
+More information:
+
+* https://www2.gov.bc.ca/gov/content/health/health-drug-coverage/msp/bc-residents/personal-health-identification
+* https://www2.gov.bc.ca/assets/gov/health/practitioner-pro/software-development-guidelines/conformance-standards/vol-4b-app-rules-client-registry.pdf
+
+
+>>> validate('9698 658 215')
+'9698658215'
+>>> format('9698658215')
+'9698 658 215'
+>>> validate('9698648215')
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+>>> validate('5736504210')
+Traceback (most recent call last):
+ ...
+InvalidComponent: ...
+>>> validate('9736A04212')
+Traceback (most recent call last):
+ ...
+InvalidFormat: ...
+""" # noqa: E501
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the
+ number of any valid separators and removes surrounding whitespace."""
+ return clean(number, '- ').strip()
+
+
+def calc_check_digit(number: str) -> str:
+ """Calculate the check digit. The number passed should not have the check
+ digit included."""
+ weights = (2, 4, 8, 5, 10, 9, 7, 3)
+ s = sum((w * int(n)) % 11 for w, n in zip(weights, number))
+ return str((11 - s) % 11)
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid PHN. This checks the length,
+ formatting and check digit."""
+ number = compact(number)
+ if len(number) != 10:
+ raise InvalidLength()
+ if not isdigits(number):
+ raise InvalidFormat()
+ if number[0] != '9':
+ raise InvalidComponent()
+ if number[9] != calc_check_digit(number[1:9]):
+ raise InvalidChecksum()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid PHN."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def format(number: str) -> str:
+ """Reformat the number to the standard presentation format."""
+ number = compact(number)
+ return ' '.join((number[0:4], number[4:7], number[7:]))
diff --git a/stdnum/ca/bn.py b/stdnum/ca/bn.py
index 0345d835..bf7625dd 100644
--- a/stdnum/ca/bn.py
+++ b/stdnum/ca/bn.py
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""BN (Canadian Business Number).
@@ -43,18 +41,20 @@
InvalidFormat: ...
"""
+from __future__ import annotations
+
from stdnum import luhn
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, '- ').strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid BN or BN15. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -71,7 +71,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid BN or BN15."""
try:
return bool(validate(number))
diff --git a/stdnum/ca/sin.py b/stdnum/ca/sin.py
index 9d07e5be..66b72942 100644
--- a/stdnum/ca/sin.py
+++ b/stdnum/ca/sin.py
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""SIN (Canadian Social Insurance Number).
@@ -39,22 +37,28 @@
Traceback (most recent call last):
...
InvalidFormat: ...
+>>> validate('823456785')
+Traceback (most recent call last):
+ ...
+InvalidComponent: ...
>>> format('123456782')
'123-456-782'
"""
+from __future__ import annotations
+
from stdnum import luhn
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, '- ').strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid SIN. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -62,10 +66,12 @@ def validate(number):
raise InvalidLength()
if not isdigits(number):
raise InvalidFormat()
+ if number[0] in '08':
+ raise InvalidComponent()
return luhn.validate(number)
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid SIN."""
try:
return bool(validate(number))
@@ -73,7 +79,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '-'.join((number[0:3], number[3:6], number[6:]))
diff --git a/stdnum/casrn.py b/stdnum/casrn.py
index acd5d7f4..b4bdd275 100644
--- a/stdnum/casrn.py
+++ b/stdnum/casrn.py
@@ -1,6 +1,6 @@
# casrn.py - functions for handling CAS Registry Numbers
#
-# Copyright (C) 2017 Arthur de Jong
+# Copyright (C) 2017-2022 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CAS RN (Chemical Abstracts Service Registry Number).
@@ -32,13 +30,24 @@
Traceback (most recent call last):
...
InvalidChecksum: ...
+>>> validate('012770-26-2')
+Traceback (most recent call last):
+ ...
+InvalidFormat: ...
"""
+from __future__ import annotations
+
+import re
+
from stdnum.exceptions import *
-from stdnum.util import clean, isdigits
+from stdnum.util import clean
-def compact(number):
+_cas_re = re.compile(r'^[1-9][0-9]{1,6}-[0-9]{2}-[0-9]$')
+
+
+def compact(number: str) -> str:
"""Convert the number to the minimal representation."""
number = clean(number, ' ').strip()
if '-' not in number:
@@ -46,7 +55,7 @@ def compact(number):
return number
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit for the number. The passed number should not
have the check digit included."""
number = number.replace('-', '')
@@ -54,21 +63,19 @@ def calc_check_digit(number):
sum((i + 1) * int(n) for i, n in enumerate(reversed(number))) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid CAS RN."""
number = compact(number)
if not 7 <= len(number) <= 12:
raise InvalidLength()
- if not isdigits(number[:-5]) or not isdigits(number[-4:-2]):
- raise InvalidFormat()
- if number[-2] != '-' or number[-5] != '-':
+ if not _cas_re.match(number):
raise InvalidFormat()
if number[-1] != calc_check_digit(number[:-1]):
raise InvalidChecksum()
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid CAS RN."""
try:
return bool(validate(number))
diff --git a/stdnum/cfi.dat b/stdnum/cfi.dat
new file mode 100644
index 00000000..8710909d
--- /dev/null
+++ b/stdnum/cfi.dat
@@ -0,0 +1,1532 @@
+# generated from cfi-20210507-current.xlsx, downloaded from
+# https://www.six-group.com/en/products-services/financial-information/data-standards.html
+C category="CIVs"
+ B group="Real estate investment trust"
+ C v="Closed-end"
+ M v="Others"
+ O v="Open-end"
+ A-Z a="Closed/open-end"
+ G v="Accumulation funds"
+ I v="Income funds"
+ J v="Mixed funds"
+ A-Z a="Distribution policy"
+ A-Z
+ Q v="Shares for QI"
+ S v="Shares"
+ U v="Units"
+ Y v="Units for QI"
+ A-Z a="Security type and investor restrictions"
+ E group="Exchange traded funds"
+ C v="Closed-end"
+ M v="Others"
+ O v="Open-end"
+ A-Z a="Closed/open-end"
+ G v="Accumulation funds"
+ I v="Income funds"
+ J v="Mixed funds"
+ A-Z a="Distribution policy"
+ B v="Debt instruments"
+ C v="Commodities"
+ D v="Derivatives"
+ E v="Equities"
+ F v="Referential instruments excluding commodities"
+ K v="Credits"
+ L v="Mixed"
+ M v="Others"
+ R v="Real estate"
+ V v="Convertible securities"
+ A-Z a="Assets"
+ S v="Shares"
+ U v="Units"
+ A-Z a="Security type and investor restrictions"
+ F group="Funds of funds"
+ C v="Closed-end"
+ M v="Others"
+ O v="Open-end"
+ A-Z a="Closed/open-end"
+ G v="Accumulation funds"
+ I v="Income funds"
+ J v="Mixed funds"
+ A-Z a="Distribution policy"
+ B v="REITs"
+ E v="ETFs"
+ H v="Hedge funds"
+ I v="Standard"
+ M v="Others"
+ M v="Others"
+ P v="Private equity funds"
+ A-Z a="Type of funds"
+ Q v="Shares for QI"
+ S v="Shares"
+ U v="Units"
+ Y v="Units for QI"
+ A-Z a="Security type and investor restrictions"
+ H group="Hedge funds"
+ A v="Arbitrage"
+ D v="Directional"
+ E v="Event-driven"
+ L v="Asset-based lending"
+ M v="Others"
+ N v="Multi-strategy"
+ R v="Relative value"
+ S v="Security selection"
+ A-Z a="Investment strategy"
+ A-Z
+ A-Z
+ A-Z
+ I group="Standard"
+ C v="Closed-end"
+ M v="Others"
+ O v="Open-end"
+ A-Z a="Closed/open-end"
+ G v="Accumulation funds"
+ I v="Income funds"
+ J v="Mixed funds"
+ A-Z a="Distribution policy"
+ B v="Debt instruments"
+ C v="Commodities"
+ D v="Derivatives"
+ E v="Equities"
+ F v="Referential instruments excluding commodities"
+ K v="Credits"
+ L v="Mixed"
+ M v="Others"
+ R v="Real estate"
+ V v="Convertible securities"
+ A-Z a="Assets"
+ Q v="Shares for QI"
+ S v="Shares"
+ U v="Units"
+ Y v="Units for QI"
+ A-Z a="Security type and investor restrictions"
+ M group="Others"
+ A-Z
+ A-Z
+ A-Z
+ Q v="Shares for QI"
+ S v="Shares"
+ U v="Units"
+ Y v="Units for QI"
+ A-Z a="Security type and investor restrictions"
+ P group="Private equity funds"
+ C v="Closed-end"
+ M v="Others"
+ O v="Open-end"
+ A-Z a="Closed/open-end"
+ G v="Accumulation funds"
+ I v="Income funds"
+ J v="Mixed funds"
+ A-Z a="Distribution policy"
+ B v="Debt instruments"
+ C v="Commodities"
+ D v="Derivatives"
+ E v="Equities"
+ F v="Referential instruments excluding commodities"
+ K v="Credits"
+ L v="Mixed"
+ M v="Others"
+ R v="Real estate"
+ V v="Convertible securities"
+ A-Z a="Assets"
+ Q v="Shares for QI"
+ S v="Shares"
+ U v="Units"
+ Y v="Units for QI"
+ A-Z a="Security type and investor restrictions"
+ S group="Pension funds"
+ C v="Closed"
+ M v="Others"
+ O v="Open"
+ A-Z a="Closed/open"
+ B v="Balanced/conservative"
+ G v="Growth"
+ L v="Life style"
+ M v="Others"
+ A-Z a="Strategy/style"
+ B v="Defined contribution"
+ M v="Others"
+ R v="Defined benefit"
+ A-Z a="Type"
+ S v="Shares"
+ U v="Units"
+ A-Z a="Security type and investor restrictions"
+D category="Debt instruments"
+ A group="Asset-backed securities"
+ F v="Fixed rate"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="Government guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A v="Amortization plan"
+ B v="Amortization plan with call feature"
+ C v="Fixed maturity with put feature"
+ D v="Fixed maturity with put and call"
+ E v="Extendible"
+ F v="Fixed maturity"
+ G v="Fixed maturity with call feature"
+ L v="Amortization plan with put and call"
+ P v="Perpetual"
+ Q v="Perpetual with call feature"
+ R v="Perpetual with put feature"
+ T v="Amortization plan with put feature"
+ A-Z a="Redemption/reimbursement"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ B group="Bonds"
+ C v="Cash payment"
+ F v="Fixed rate"
+ K v="Payment in kind"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest or cash payment"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="Government guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A v="Amortization plan"
+ B v="Amortization plan with call feature"
+ C v="Fixed maturity with put feature"
+ D v="Fixed maturity with put and call"
+ E v="Extendible"
+ F v="Fixed maturity"
+ G v="Fixed maturity with call feature"
+ L v="Amortization plan with put and call"
+ P v="Perpetual"
+ Q v="Perpetual with call feature"
+ R v="Perpetual with put feature"
+ T v="Amortization plan with put feature"
+ A-Z a="Redemption/reimbursement"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ C group="Convertible bonds"
+ F v="Fixed rate"
+ K v="Payment in kind"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="Government guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A v="Amortization plan"
+ B v="Amortization plan with call feature"
+ C v="Fixed maturity with put feature"
+ D v="Fixed maturity with put and call"
+ E v="Extendible"
+ F v="Fixed maturity"
+ G v="Fixed maturity with call feature"
+ L v="Amortization plan with put and call"
+ P v="Perpetual"
+ Q v="Perpetual with call feature"
+ R v="Perpetual with put feature"
+ T v="Amortization plan with put feature"
+ A-Z a="Redemption/reimbursement"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ D group="Depositary receipts on debt instruments"
+ A v="Asset-backed securities"
+ B v="Bonds"
+ C v="Convertible bonds"
+ G v="Mortgage-backed securities"
+ M v="Others"
+ N v="Municipal bonds"
+ T v="Medium-term notes"
+ W v="Bonds with warrants attached"
+ Y v="Money market instruments"
+ A-Z a="Instrument dependency"
+ C v="Cash payment"
+ F v="Fixed rate"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest/cash payment"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="Government guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A v="Amortization plan"
+ B v="Amortization plan with call feature"
+ C v="Fixed maturity with put feature"
+ D v="Fixed maturity with put and call"
+ E v="Extendible"
+ F v="Fixed maturity"
+ G v="Fixed maturity with call feature"
+ L v="Amortization plan with put and call"
+ P v="Perpetual"
+ Q v="Perpetual with call feature"
+ R v="Perpetual with put feature"
+ T v="Amortization plan with put feature"
+ A-Z a="Redemption/reimbursement"
+ E group="Structured instruments"
+ A v="Discount certificate"
+ B v="Barrier discount certificate"
+ C v="Reverse convertible"
+ D v="Barrier reverse convertible"
+ E v="Express certificate"
+ M v="Others"
+ A-Z a="Type"
+ D v="Dividend payments"
+ F v="Fixed interest payments"
+ M v="Others"
+ V v="Variable interest payments"
+ Y v="No payments"
+ A-Z a="Distribution"
+ C v="Repayment in assets and cash"
+ M v="Others"
+ R v="Repayment in cash"
+ S v="Repayment in assets"
+ T v="Repayment in assets or cash"
+ A-Z a="Repayment"
+ B v="Baskets"
+ C v="Currencies"
+ D v="Debt instruments"
+ I v="Indices"
+ M v="Others"
+ N v="Interest rates"
+ S v="Equities"
+ T v="Commodities"
+ A-Z a="Underlying assets"
+ G group="Mortgage-backed securities"
+ F v="Fixed rate"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="Government guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A v="Amortization plan"
+ B v="Amortization plan with call feature"
+ C v="Fixed maturity with put feature"
+ D v="Fixed maturity with put and call"
+ E v="Extendible"
+ F v="Fixed maturity"
+ G v="Fixed maturity with call feature"
+ L v="Amortization plan with put and call"
+ P v="Perpetual"
+ Q v="Perpetual with call feature"
+ R v="Perpetual with put feature"
+ T v="Amortization plan with put feature"
+ A-Z a="Redemption/reimbursement"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ M group="Others"
+ B v="Bank loan"
+ M v="Others"
+ P v="Promissory note"
+ A-Z a="Type"
+ A-Z
+ A-Z
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ N group="Municipal bonds"
+ F v="Fixed rate"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="State guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A v="Amortization plan"
+ B v="Amortization plan with call feature"
+ C v="Fixed maturity with put feature"
+ D v="Fixed maturity with put and call"
+ E v="Extendible"
+ F v="Fixed maturity"
+ G v="Fixed maturity with call feature"
+ L v="Amortization plan with put and call"
+ P v="Perpetual"
+ Q v="Perpetual with call feature"
+ R v="Perpetual with put feature"
+ T v="Amortization plan with put feature"
+ A-Z a="Redemption/reimbursement"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ S group="Structured instruments"
+ A v="Capital protection certificate with participation"
+ B v="Capital protection convertible certificate"
+ C v="Barrier capital protection certificate"
+ D v="Capital protection certificate with coupons"
+ M v="Others"
+ A-Z a="Type"
+ D v="Dividend payments"
+ F v="Fixed interest payments"
+ M v="Others"
+ V v="Variable interest payments"
+ Y v="No payments"
+ A-Z a="Distribution"
+ F v="Fixed cash repayment"
+ M v="Others"
+ V v="Variable cash repayment"
+ A-Z a="Repayment"
+ B v="Baskets"
+ C v="Currencies"
+ D v="Debt instruments"
+ I v="Indices"
+ M v="Others"
+ N v="Interest rates"
+ S v="Equities"
+ T v="Commodities"
+ A-Z a="Underlying assets"
+ T group="Medium-term notes"
+ F v="Fixed rate"
+ K v="Payment in kind"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="Government guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A v="Amortization plan"
+ B v="Amortization plan with call feature"
+ C v="Fixed maturity with put feature"
+ D v="Fixed maturity with put and call"
+ E v="Extendible"
+ F v="Fixed maturity"
+ G v="Fixed maturity with call feature"
+ L v="Amortization plan with put and call"
+ P v="Perpetual"
+ Q v="Perpetual with call feature"
+ R v="Perpetual with put feature"
+ T v="Amortization plan with put feature"
+ A-Z a="Redemption/reimbursement"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ W group="Bonds with warrants attached"
+ F v="Fixed rate"
+ K v="Payment in kind"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="Government guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A v="Amortization plan"
+ B v="Amortization plan with call feature"
+ C v="Fixed maturity with put feature"
+ D v="Fixed maturity with put and call"
+ E v="Extendible"
+ F v="Fixed maturity"
+ G v="Fixed maturity with call feature"
+ L v="Amortization plan with put and call"
+ P v="Perpetual"
+ Q v="Perpetual with call feature"
+ R v="Perpetual with put feature"
+ T v="Amortization plan with put feature"
+ A-Z a="Redemption/reimbursement"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ Y group="Money market instruments"
+ F v="Fixed rate"
+ K v="Payment in kind"
+ V v="Variable"
+ Z v="Zero rate/discounted"
+ A-Z a="Type of interest"
+ C v="Supranational"
+ G v="Joint guarantee"
+ J v="Junior subordinated"
+ N v="Senior"
+ O v="Senior subordinated"
+ P v="Negative pledge"
+ Q v="Junior"
+ S v="Secured"
+ T v="Government guarantee"
+ U v="Unsecured/unguaranteed"
+ A-Z a="Guarantee or ranking"
+ A-Z
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+E category="Equities"
+ C group="Common/ordinary convertible shares"
+ E v="Enhanced voting"
+ N v="Non-voting"
+ R v="Restricted voting"
+ V v="Voting"
+ A-Z a="Voting right"
+ T v="Restrictions"
+ U v="Free"
+ A-Z a="Ownership/transfer/sales restrictions"
+ F v="Fully paid"
+ O v="Nil paid"
+ P v="Partly paid"
+ A-Z a="Payment status"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ D group="Depositary receipts on equities"
+ C v="Common/ordinary convertible shares"
+ F v="Preferred/preference convertible shares"
+ L v="Limited partnership units"
+ M v="Others"
+ P v="Preferred/preference shares"
+ S v="Common/ordinary shares"
+ A-Z a="Instrument dependency"
+ B v="Convertible"
+ D v="Convertible/redeemable"
+ N v="Perpetual"
+ R v="Redeemable"
+ A-Z a="Redemption/conversion of the underlying assets"
+ A v="Adjustable/variable rate income"
+ C v="Cumulative, fixed rate income"
+ D v="Dividends"
+ F v="Fixed rate income"
+ N v="Normal rate income"
+ P v="Participating income"
+ Q v="Cumulative, participating income"
+ U v="Auction rate income"
+ A-Z a="Income"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ F group="Preferred/preference convertible shares"
+ E v="Enhanced voting"
+ N v="Non-voting"
+ R v="Restricted voting"
+ V v="Voting"
+ A-Z a="Voting right"
+ A v="Redeemable/exchangeable/extendible"
+ C v="Redeemable/exchangeable"
+ E v="Extendible"
+ G v="Exchangeable"
+ N v="Perpetual"
+ R v="Redeemable"
+ T v="Redeemable/extendible"
+ A-Z a="Redemption"
+ A v="Adjustable/variable rate income"
+ C v="Cumulative, fixed rate income"
+ F v="Fixed rate income"
+ N v="Normal rate income"
+ P v="Participating income"
+ Q v="Cumulative, participating income"
+ U v="Auction rate income"
+ A-Z a="Income"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ L group="Limited partnership units"
+ E v="Enhanced voting"
+ N v="Non-voting"
+ R v="Restricted voting"
+ V v="Voting"
+ A-Z a="Voting right"
+ T v="Restrictions"
+ U v="Free"
+ A-Z a="Ownership/transfer/sales restrictions"
+ F v="Fully paid"
+ O v="Nil paid"
+ P v="Partly paid"
+ A-Z a="Payment status"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ M group="Others"
+ A-Z
+ A-Z
+ A-Z
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ P group="Preferred/preference shares"
+ E v="Enhanced voting"
+ N v="Non-voting"
+ R v="Restricted voting"
+ V v="Voting"
+ A-Z a="Voting right"
+ A v="Redeemable/exchangeable/extendible"
+ C v="Redeemable/exchangeable"
+ E v="Extendible"
+ G v="Exchangeable"
+ N v="Perpetual"
+ R v="Redeemable"
+ T v="Redeemable/extendible"
+ A-Z a="Redemption"
+ A v="Adjustable/variable rate income"
+ C v="Cumulative, fixed rate income"
+ F v="Fixed rate income"
+ N v="Normal rate income"
+ P v="Participating income"
+ Q v="Cumulative, participating income"
+ U v="Auction rate income"
+ A-Z a="Income"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ S group="Common/ordinary shares"
+ E v="Enhanced voting"
+ N v="Non-voting"
+ R v="Restricted voting"
+ V v="Voting"
+ A-Z a="Voting right"
+ T v="Restrictions"
+ U v="Free"
+ A-Z a="Ownership/transfer/sales restrictions"
+ F v="Fully paid"
+ O v="Nil paid"
+ P v="Partly paid"
+ A-Z a="Payment status"
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ Y group="Structured instruments"
+ A v="Tracker certificate"
+ B v="Outperformance certificate"
+ C v="Bonus certificate"
+ D v="Outperformance bonus certificate"
+ E v="Twin-win-certificate"
+ M v="Others"
+ A-Z a="Type"
+ D v="Dividend payments"
+ M v="Others"
+ Y v="No payments"
+ A-Z a="Distribution"
+ E v="Elect at settlement"
+ F v="Cash repayment"
+ M v="Others"
+ V v="Physical repayment"
+ A-Z a="Repayment"
+ B v="Baskets"
+ C v="Currencies"
+ D v="Debt instruments"
+ G v="Derivatives"
+ I v="Indices"
+ M v="Others"
+ N v="Interest rates"
+ S v="Equities"
+ T v="Commodities"
+ A-Z a="Underlying assets"
+F category="Futures"
+ C group="Commodities futures"
+ A v="Agriculture"
+ E v="Extraction resources"
+ H v="Generated resources"
+ I v="Industrial products"
+ M v="Others"
+ N v="Environmental"
+ P v="Polypropylene products"
+ S v="Services"
+ A-Z a="Underlying assets"
+ C v="Cash"
+ N v="Non-deliverable"
+ P v="Physical"
+ A-Z a="Delivery"
+ N v="Non-standardized"
+ S v="Standardized"
+ A-Z a="Standardized/non-standardized"
+ A-Z
+ F group="Financial futures"
+ B v="Baskets"
+ C v="Currencies"
+ D v="Debt instruments"
+ F v="Futures"
+ I v="Indices"
+ M v="Others"
+ N v="Interest rates"
+ O v="Options"
+ S v="Stock-equities"
+ V v="Stock dividends"
+ W v="Swaps"
+ A-Z a="Underlying assets"
+ C v="Cash"
+ N v="Non-deliverable"
+ P v="Physical"
+ A-Z a="Delivery"
+ N v="Non-standardized"
+ S v="Standardized"
+ A-Z a="Standardized/non-standardized"
+ A-Z
+H category="Non-listed and complex listed options"
+ C group="Credit"
+ I v="CDS on an index"
+ M v="Others"
+ U v="CDS on a single name"
+ V v="CDS on an index tranche"
+ W v="Swaps"
+ A-Z a="Underlying assets"
+ A v="European-Call"
+ B v="American-Call"
+ C v="Bermudan-Call"
+ D v="European-Put"
+ E v="American-Put"
+ F v="Bermudan-Put"
+ G v="European-Chooser"
+ H v="American-Chooser"
+ I v="Bermudan-Chooser"
+ A-Z a="Option style and type"
+ A v="Asian"
+ B v="Barrier"
+ D v="Digital"
+ G v="Digital barrier"
+ L v="Lookback"
+ M v="Others"
+ P v="Other path dependent"
+ V v="Vanilla"
+ A-Z a="Valuation method or trigger"
+ C v="Cash"
+ E v="Elect at settlement"
+ P v="Physical"
+ A-Z a="Delivery"
+ E group="Equity"
+ B v="Basket"
+ F v="Futures"
+ I v="Index"
+ M v="Others"
+ O v="Options"
+ R v="Forwards"
+ S v="Single stock"
+ A-Z a="Underlying assets"
+ A v="European-Call"
+ B v="American-Call"
+ C v="Bermudan-Call"
+ D v="European-Put"
+ E v="American-Put"
+ F v="Bermudan-Put"
+ G v="European-Chooser"
+ H v="American-Chooser"
+ I v="Bermudan-Chooser"
+ A-Z a="Option style and type"
+ A v="Asian"
+ B v="Barrier"
+ D v="Digital"
+ G v="Digital barrier"
+ L v="Lookback"
+ M v="Others"
+ P v="Other path dependent"
+ V v="Vanilla"
+ A-Z a="Valuation method or trigger"
+ C v="Cash"
+ E v="Elect at settlement"
+ P v="Physical"
+ A-Z a="Delivery"
+ F group="Foreign exchange"
+ B v="Forwards – Currency Index"
+ C v="Futures – Currency Index"
+ D v="Spot – Currency Index"
+ E v="Volatility – Currency Index"
+ F v="Futures – Single Currency Pair"
+ M v="Others"
+ Q v="Forwards – Custom Basket of Currencies"
+ R v="Forwards – Single Currency Pair"
+ T v="Spot – Single Currency Pair"
+ U v="Futures – Custom Basket of Currencies"
+ V v="Volatility – Single Currency Pair"
+ W v="Spot – Custom Basket of Currencies"
+ Y v="Volatility – Custom Basket of Currencies"
+ A-Z a="Underlying assets"
+ J v="European"
+ K v="American"
+ L v="Bermudan"
+ A-Z a="Option style and type"
+ A v="Asian"
+ B v="Barrier"
+ D v="Digital"
+ G v="Digital barrier"
+ L v="Lookback"
+ M v="Others"
+ P v="Other path dependent"
+ V v="Vanilla"
+ A-Z a="Valuation method or trigger"
+ C v="Cash"
+ E v="Elect at settlement"
+ P v="Physical"
+ A-Z a="Delivery"
+ M group="Others"
+ M v="Others"
+ P v="Commercial property"
+ A-Z a="Underlying assets"
+ A v="European-Call"
+ B v="American-Call"
+ C v="Bermudan-Call"
+ D v="European-Put"
+ E v="American-Put"
+ F v="Bermudan-Put"
+ G v="European-Chooser"
+ H v="American-Chooser"
+ I v="Bermudan-Chooser"
+ J v="European"
+ K v="American"
+ L v="Bermudan"
+ A-Z a="Option style and type"
+ A v="Asian"
+ B v="Barrier"
+ D v="Digital"
+ G v="Digital barrier"
+ L v="Lookback"
+ M v="Others"
+ P v="Other path dependent"
+ V v="Vanilla"
+ A-Z a="Valuation method or trigger"
+ A v="Auction"
+ C v="Cash"
+ E v="Elect at exercise"
+ N v="Non-deliverable"
+ P v="Physical"
+ A-Z a="Delivery"
+ R group="Rates"
+ A v="Basis swap"
+ C v="Fixed-floating swap"
+ D v="Fixed-fixed swap"
+ E v="Interest rate index"
+ F v="Futures"
+ G v="Inflation rate index"
+ H v="OIS"
+ M v="Others"
+ O v="Options"
+ R v="Forwards"
+ A-Z a="Underlying assets"
+ A v="European-Call"
+ B v="American-Call"
+ C v="Bermudan-Call"
+ D v="European-Put"
+ E v="American-Put"
+ F v="Bermudan-Put"
+ G v="European-Chooser"
+ H v="American-Chooser"
+ I v="Bermudan-Chooser"
+ A-Z a="Option style and type"
+ A v="Asian"
+ B v="Barrier"
+ C v="Cap"
+ D v="Digital"
+ F v="Floor"
+ G v="Digital barrier"
+ L v="Lookback"
+ M v="Others"
+ P v="Other path dependent"
+ V v="Vanilla"
+ A-Z a="Valuation method or trigger"
+ C v="Cash"
+ E v="Elect at settlement"
+ P v="Physical"
+ A-Z a="Delivery"
+ T group="Commodities"
+ A v="Agriculture"
+ B v="Basket – single-commodity"
+ C v="Basket – multi-commodity"
+ F v="Futures"
+ G v="Freight"
+ H v="Index – multi-commodity"
+ I v="Index – single-commodity"
+ J v="Energy"
+ K v="Metals"
+ M v="Others"
+ N v="Environmental"
+ O v="Options"
+ P v="Polypropylene products"
+ R v="Forwards"
+ S v="Fertilizer"
+ T v="Paper"
+ W v="Swaps"
+ A-Z a="Underlying assets"
+ A v="European-Call"
+ B v="American-Call"
+ C v="Bermudan-Call"
+ D v="European-Put"
+ E v="American-Put"
+ F v="Bermudan-Put"
+ G v="European-Chooser"
+ H v="American-Chooser"
+ I v="Bermudan-Chooser"
+ A-Z a="Option style and type"
+ A v="Asian"
+ B v="Barrier"
+ D v="Digital"
+ G v="Digital barrier"
+ L v="Lookback"
+ M v="Others"
+ P v="Other path dependent"
+ V v="Vanilla"
+ A-Z a="Valuation method or trigger"
+ C v="Cash"
+ E v="Elect at settlement"
+ P v="Physical"
+ A-Z a="Delivery"
+I category="Spot"
+ F group="Foreign exchange"
+ A-Z
+ A-Z
+ A-Z
+ P v="Physical"
+ A-Z a="Delivery"
+ T group="Commodities"
+ A v="Agriculture"
+ J v="Energy"
+ K v="Metals"
+ M v="Others"
+ N v="Environmental"
+ P v="Polypropylene products"
+ S v="Fertilizer"
+ T v="Paper"
+ A-Z a="Underlying assets"
+ A-Z
+ A-Z
+ A-Z
+J category="Forwards"
+ C group="Credit"
+ A v="Single name"
+ B v="Basket"
+ C v="CDS on a single name"
+ D v="CDS on an index"
+ G v="CDS on a basket"
+ I v="Index"
+ O v="Options"
+ A-Z a="Underlying assets"
+ A-Z
+ C v="CFD"
+ F v="Forward price of underlying instrument"
+ S v="Spread-bet"
+ A-Z a="Return or payout trigger"
+ C v="Cash"
+ P v="Physical"
+ A-Z a="Delivery"
+ E group="Equity"
+ B v="Basket"
+ F v="Futures"
+ I v="Index"
+ O v="Options"
+ S v="Single stock"
+ A-Z a="Underlying assets"
+ A-Z
+ C v="CFD"
+ F v="Forward price of underlying instrument"
+ S v="Spread-bet"
+ A-Z a="Return or payout trigger"
+ C v="Cash"
+ P v="Physical"
+ A-Z a="Delivery"
+ F group="Foreign exchange"
+ F v="Futures – Single Currency Pair"
+ J v="Options – Currency Index"
+ K v="Options – Custom Basket of Currencies"
+ L v="Futures – Currency Index"
+ N v="Futures – Custom Basket of Currencies"
+ O v="Options – Single Currency Pair"
+ R v="Forward – Single Currency Pair"
+ S v="Forward – Currency Index"
+ T v="Spot – Single Currency Pair"
+ U v="Spot – Currency Index"
+ V v="Spot – Custom Basket of Currencies"
+ W v="Forward – Custom Basket of Currencies"
+ A-Z a="Underlying assets"
+ A-Z
+ C v="CFD"
+ F v="Forward price of underlying instrument"
+ R v="Rolling spot"
+ S v="Spread-bet"
+ A-Z a="Return or payout trigger"
+ C v="Cash"
+ P v="Physical"
+ A-Z a="Delivery"
+ R group="Rates"
+ I v="Interest rate index"
+ M v="Others"
+ O v="Options"
+ A-Z a="Underlying assets"
+ A-Z
+ C v="CFD"
+ F v="Forward price of underlying instrument"
+ S v="Spread-bet"
+ A-Z a="Return or payout trigger"
+ C v="Cash"
+ P v="Physical"
+ A-Z a="Delivery"
+ T group="Commodities"
+ A v="Agriculture"
+ B v="Basket – single-commodity"
+ C v="Basket – multi-commodity"
+ G v="Freight"
+ H v="Index – multi-commodity"
+ I v="Index – single-commodity"
+ J v="Energy"
+ K v="Metals"
+ M v="Others"
+ N v="Environmental"
+ P v="Polypropylene products"
+ S v="Fertilizer"
+ T v="Paper"
+ A-Z a="Underlying assets"
+ A-Z
+ C v="CFD"
+ F v="Forward price of underlying instrument"
+ S v="Spread-bet"
+ A-Z a="Return or payout trigger"
+ C v="Cash"
+ P v="Physical"
+ A-Z a="Delivery"
+K category="Strategies"
+ C group="Credit"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ E group="Equity"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ F group="Foreign exchange"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ M group="Others"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ R group="Rates"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ T group="Commodities"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ Y group="Mixed assets"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+L category="Financing"
+ L group="Loan-lease"
+ A v="Agriculture"
+ B v="Baskets"
+ J v="Energy"
+ K v="Metals"
+ M v="Others"
+ N v="Environmental"
+ P v="Polypropylene products"
+ S v="Fertilizer"
+ T v="Paper"
+ A-Z a="Underlying assets"
+ A-Z
+ A-Z
+ C v="Cash"
+ P v="Physical"
+ A-Z a="Delivery"
+ R group="Repurchase agreements"
+ C v="Cash collateral"
+ G v="General collateral"
+ S v="Specific security collateral"
+ A-Z a="Underlying assets"
+ F v="Flexible"
+ N v="Overnight"
+ O v="Open"
+ T v="Term"
+ A-Z a="Termination"
+ A-Z
+ D v="Delivery versus payment"
+ H v="Hold-in-custody"
+ T v="Tri-party"
+ A-Z a="Delivery"
+ S group="Securities lending"
+ C v="Cash collateral"
+ D v="Certificate of deposit"
+ E v="Equity"
+ G v="Government bonds"
+ K v="Money market instruments"
+ L v="Letter of credit"
+ M v="Others"
+ P v="Corporate bonds"
+ T v="Convertible bonds"
+ W v="Warrants"
+ A-Z a="Underlying assets"
+ N v="Overnight"
+ O v="Open"
+ T v="Term"
+ A-Z a="Termination"
+ A-Z
+ D v="Delivery versus payment"
+ F v="Free of payment"
+ H v="Hold-in-custody"
+ T v="Tri-party"
+ A-Z a="Delivery"
+M category="Others (miscellaneous)"
+ C group="Combined instruments"
+ A v="Share and warrant"
+ B v="Combination of bonds"
+ H v="Share and bond"
+ M v="Others"
+ S v="Combination of shares"
+ U v="Fund unit and other components"
+ W v="Warrant and warrant"
+ A-Z a="Components"
+ T v="Restrictions"
+ U v="Free"
+ A-Z a="Ownership/transfer/sales restrictions"
+ A-Z
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ M group="Other assets"
+ E v="Escrow receipts"
+ I v="Insurance policies"
+ M v="Others"
+ N v="Carbon credit"
+ P v="Precious metal receipts"
+ R v="Real estate deeds"
+ S v="Other OTC derivative products"
+ T v="Trade finance instruments"
+ A-Z a="Further grouping"
+ A-Z
+ A-Z
+ A-Z
+O category="Listed options"
+ C group="Call options"
+ A v="American"
+ B v="Bermudan"
+ E v="European"
+ A-Z a="Exercise option style"
+ B v="Baskets"
+ C v="Currencies"
+ D v="Debt instruments"
+ F v="Futures"
+ I v="Indices"
+ M v="Others"
+ N v="Interest rates"
+ O v="Options"
+ S v="Stock-equities"
+ T v="Commodities"
+ W v="Swaps"
+ A-Z a="Underlying assets"
+ C v="Cash"
+ E v="Elect at exercise"
+ N v="Non-deliverable"
+ P v="Physical"
+ A-Z a="Delivery"
+ N v="Non-standardized"
+ S v="Standardized"
+ A-Z a="Standardized/non-standardized"
+ M group="Others"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ P group="Put options"
+ A v="American"
+ B v="Bermudan"
+ E v="European"
+ A-Z a="Exercise option style"
+ B v="Baskets"
+ C v="Currencies"
+ D v="Debt instruments"
+ F v="Futures"
+ I v="Indices"
+ M v="Others"
+ N v="Interest rates"
+ O v="Options"
+ S v="Stock-equities"
+ T v="Commodities"
+ W v="Swaps"
+ A-Z a="Underlying assets"
+ C v="Cash"
+ E v="Elect at exercise"
+ N v="Non-deliverable"
+ P v="Physical"
+ A-Z a="Delivery"
+ N v="Non-standardized"
+ S v="Standardized"
+ A-Z a="Standardized/non-standardized"
+R category="Entitlement (rights)"
+ A group="Allotment"
+ A-Z
+ A-Z
+ A-Z
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ D group="Depositary receipts on entitlements"
+ A v="Allotment"
+ M v="Others"
+ P v="Purchase rights"
+ S v="Subscription rights"
+ W v="Warrants"
+ A-Z a="Instrument dependency"
+ A-Z
+ A-Z
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ F group="Mini-future certificates, constant leverage certificates"
+ B v="Baskets"
+ C v="Currencies"
+ D v="Debt instruments/interest rates"
+ I v="Indices"
+ M v="Others"
+ S v="Equities"
+ T v="Commodities"
+ A-Z a="Underlying assets"
+ M v="Others"
+ N v="Barrier instrument based"
+ T v="Barrier underlying based"
+ A-Z a="Barrier dependency type"
+ C v="Long"
+ M v="Others"
+ P v="Short"
+ A-Z a="Long/short"
+ A v="American"
+ B v="Bermudan"
+ E v="European"
+ M v="Others"
+ A-Z a="Exercise option style"
+ M group="Others"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ P group="Purchase rights"
+ B v="Bonds"
+ C v="Common/ordinary convertible shares"
+ F v="Preferred/preference convertible shares"
+ I v="Combined instruments"
+ M v="Others"
+ P v="Preferred/preference shares"
+ S v="Common/ordinary shares"
+ A-Z a="Assets"
+ A-Z
+ A-Z
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ S group="Subscription rights"
+ B v="Bonds"
+ C v="Common/ordinary convertible shares"
+ F v="Preferred/preference convertible shares"
+ I v="Combined instruments"
+ M v="Others"
+ P v="Preferred/preference shares"
+ S v="Common/ordinary shares"
+ A-Z a="Assets"
+ A-Z
+ A-Z
+ B v="Bearer"
+ M v="Others"
+ N v="Bearer/registered"
+ R v="Registered"
+ A-Z a="Form"
+ W group="Warrants"
+ B v="Baskets"
+ C v="Currencies"
+ D v="Debt instruments/interest rates"
+ I v="Indices"
+ M v="Others"
+ S v="Equities"
+ T v="Commodities"
+ A-Z a="Underlying assets"
+ C v="Covered warrants"
+ N v="Naked warrants"
+ T v="Traditional warrants"
+ A-Z a="Type"
+ B v="Call and put"
+ C v="Call"
+ P v="Put"
+ A-Z a="Call/put"
+ A v="American"
+ B v="Bermudan"
+ E v="European"
+ M v="Others"
+ A-Z a="Exercise option style"
+S category="Swaps"
+ C group="Credit"
+ B v="Basket"
+ I v="Index"
+ M v="Others"
+ U v="Single name"
+ V v="Index tranche"
+ A-Z a="Underlying assets"
+ C v="Credit default"
+ M v="Others"
+ T v="Total return"
+ A-Z a="Return or payout trigger"
+ C v="Corporate entity"
+ L v="Local"
+ S v="Sovereign entity"
+ A-Z a="Underlying issuer type"
+ A v="Auction"
+ C v="Cash"
+ P v="Physical"
+ A-Z a="Delivery"
+ E group="Equity"
+ B v="Basket"
+ I v="Index"
+ M v="Others"
+ S v="Single stock"
+ A-Z a="Underlying assets"
+ C v="CFD"
+ D v="Dividend"
+ L v="Volatility"
+ M v="Others"
+ P v="Price"
+ T v="Total return"
+ V v="Variance"
+ A-Z a="Return or payout trigger"
+ A-Z
+ C v="Cash"
+ E v="Elect at settlement"
+ P v="Physical"
+ A-Z a="Delivery"
+ F group="Foreign exchange"
+ A v="Spot-forward swap"
+ C v="Forward-forward swap"
+ M v="Others"
+ A-Z a="Underlying assets"
+ A-Z
+ A-Z
+ C v="Cash"
+ P v="Physical"
+ A-Z a="Delivery"
+ M group="Others"
+ M v="Others"
+ P v="Commercial property"
+ A-Z a="Underlying assets"
+ A-Z
+ A-Z
+ C v="Cash"
+ E v="Elect at settlement"
+ P v="Physical"
+ A-Z a="Delivery"
+ R group="Rates"
+ A v="Basis swap"
+ C v="Fixed-floating"
+ D v="Fixed-fixed"
+ G v="Inflation swap"
+ H v="Overnight index swap"
+ M v="Others"
+ Z v="Zero coupon"
+ A-Z a="Underlying assets"
+ C v="Constant"
+ D v="Amortizing"
+ I v="Accreting"
+ Y v="Custom"
+ A-Z a="Notional"
+ C v="Cross-currency"
+ S v="Single currency"
+ A-Z a="Single or multi-currency"
+ D v="Deliverable"
+ N v="Non-deliverable"
+ A-Z a="Delivery"
+ T group="Commodities"
+ A v="Agriculture"
+ B v="Basket – single-commodity"
+ C v="Basket – multi-commodity"
+ G v="Freight"
+ H v="Index – multi-commodity"
+ I v="Index – single-commodity"
+ J v="Energy"
+ K v="Metals"
+ M v="Others"
+ N v="Environmental"
+ P v="Polypropylene products"
+ Q v="Multi-commodity"
+ S v="Fertilizer"
+ T v="Paper"
+ A-Z a="Underlying assets"
+ C v="Contract for difference"
+ T v="Total return"
+ A-Z a="Return or payout trigger"
+ A-Z
+ C v="Cash"
+ E v="Elect at settlement"
+ P v="Physical"
+ A-Z a="Delivery"
+T category="Referential instruments"
+ B group="Baskets"
+ C v="Currencies"
+ D v="Debt instruments"
+ E v="Equities"
+ F v="CIVs"
+ I v="Indices"
+ M v="Others"
+ T v="Commodities"
+ A-Z a="Composition"
+ A-Z
+ A-Z
+ A-Z
+ C group="Currencies"
+ C v="Bullion coins"
+ L v="Legacy currency"
+ M v="Others"
+ N v="National currency"
+ A-Z a="Type"
+ A-Z
+ A-Z
+ A-Z
+ D group="Stock dividends"
+ C v="Common/ordinary convertible shares"
+ F v="Preferred/preference convertible shares"
+ K v="CIVs"
+ L v="Limited partnership units"
+ M v="Others"
+ P v="Preferred/preference shares"
+ S v="Common/ordinary shares"
+ A-Z a="Type of equity"
+ A-Z
+ A-Z
+ A-Z
+ I group="Indices"
+ C v="Currencies"
+ D v="Debt instruments"
+ E v="Equities"
+ F v="CIVs"
+ M v="Others"
+ R v="Real estate"
+ T v="Commodities"
+ A-Z a="Asset classes"
+ C v="Capitalization weighted"
+ E v="Equal weighted"
+ F v="Modified market capitalization weighted"
+ M v="Other weighting"
+ P v="Price weighted"
+ A-Z a="Weighting types"
+ G v="Gross total return"
+ M v="Others"
+ N v="Net total return"
+ P v="Price return"
+ A-Z a="Index return types"
+ A-Z
+ M group="Others"
+ A-Z
+ A-Z
+ A-Z
+ A-Z
+ R group="Interest rates"
+ F v="Fixed"
+ M v="Others"
+ N v="Nominal"
+ R v="Real"
+ V v="Variable"
+ A-Z a="Type of interest rates"
+ A v="Annually"
+ D v="Daily"
+ M v="Others"
+ N v="Monthly"
+ Q v="Quarterly"
+ S v="Semi-annually"
+ W v="Weekly"
+ A-Z a="Frequency of calculation"
+ A-Z
+ A-Z
+ T group="Commodities"
+ A v="Agriculture"
+ E v="Extraction resources"
+ H v="Generated resources"
+ I v="Industrial products"
+ M v="Others"
+ N v="Environmental"
+ P v="Polypropylene products"
+ S v="Services"
+ A-Z a="Type of commodity"
+ A-Z
+ A-Z
+ A-Z
diff --git a/stdnum/cfi.py b/stdnum/cfi.py
new file mode 100644
index 00000000..56b9b85b
--- /dev/null
+++ b/stdnum/cfi.py
@@ -0,0 +1,100 @@
+# cfi.py - functions for handling ISIN numbers
+#
+# Copyright (C) 2022 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""CFI (ISO 10962 Classification of Financial Instruments).
+
+The CFI is a 6-character code used to classify financial instruments. It is
+issued alongside an ISIN and describes category such as equity or future and
+category-specific properties such as underlying asset type or payment status.
+
+More information:
+
+* https://en.wikipedia.org/wiki/ISO_10962
+* https://www.iso.org/standard/73564.html
+* https://www.six-group.com/en/products-services/financial-information/data-standards.html
+
+>>> validate('ELNUFR')
+'ELNUFR'
+>>> validate('ELNUFQ')
+Traceback (most recent call last):
+ ...
+InvalidComponent: ...
+>>> import json
+>>> print(json.dumps(info('ELNUFR'), indent=2, sort_keys=True))
+{
+ "Form": "Registered",
+ "Ownership/transfer/sales restrictions": "Free",
+ "Payment status": "Fully paid",
+ "Voting right": "Non-voting",
+ "category": "Equities",
+ "group": "Limited partnership units"
+}
+"""
+
+from __future__ import annotations
+
+from stdnum import numdb
+from stdnum.exceptions import *
+from stdnum.util import clean
+
+
+# our open copy of the CFI database
+_cfidb = numdb.get('cfi')
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the
+ number of any valid separators and removes surrounding whitespace."""
+ return clean(number, ' -').strip().upper()
+
+
+def info(number: str) -> dict[str, str]:
+ """Look up information about the number."""
+ number = compact(number)
+ info = _cfidb.info(number)
+ if len(info) != 6:
+ raise InvalidComponent()
+ properties = {}
+ properties.update(info[0][1])
+ properties.update(info[1][1])
+ for nr, found in info[2:]:
+ if nr != 'X' and 'v' not in found:
+ raise InvalidComponent()
+ if 'v' in found:
+ properties[found['a']] = found['v']
+ return properties
+
+
+def validate(number: str) -> str:
+ """Check if the number provided is valid. This checks the length and
+ format."""
+ number = compact(number)
+ if not all(x in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' for x in number):
+ raise InvalidFormat()
+ if len(number) != 6:
+ raise InvalidLength()
+ info(number)
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number provided is valid. This checks the length and
+ check digit."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
diff --git a/stdnum/ch/__init__.py b/stdnum/ch/__init__.py
index cea35648..72e300bc 100644
--- a/stdnum/ch/__init__.py
+++ b/stdnum/ch/__init__.py
@@ -14,8 +14,6 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Swiss numbers."""
diff --git a/stdnum/ch/esr.py b/stdnum/ch/esr.py
index 862df783..eb363e15 100644
--- a/stdnum/ch/esr.py
+++ b/stdnum/ch/esr.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""ESR, ISR, QR-reference (reference number on Swiss payment slips).
@@ -49,17 +47,19 @@
'00 00000 00000 00000 00018 78583'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips
surrounding whitespace and separators."""
return clean(number, ' ').lstrip('0')
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit for number. The number passed should
not have the check digit included."""
_digits = (0, 9, 4, 6, 8, 2, 7, 1, 3, 5)
@@ -69,7 +69,7 @@ def calc_check_digit(number):
return str((10 - c) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid ESR. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -82,7 +82,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid ESR."""
try:
return bool(validate(number))
@@ -90,9 +90,8 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
- number = 27 * '0' + compact(number)
- number = number[-27:]
+ number = compact(number).zfill(27)
return number[:2] + ' ' + ' '.join(
number[i:i + 5] for i in range(2, len(number), 5))
diff --git a/stdnum/ch/ssn.py b/stdnum/ch/ssn.py
index a59dc4fe..131e1d4a 100644
--- a/stdnum/ch/ssn.py
+++ b/stdnum/ch/ssn.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Swiss social security number ("Sozialversicherungsnummer").
@@ -46,24 +44,26 @@
'756.9217.0769.85'
"""
+from __future__ import annotations
+
from stdnum import ean
from stdnum.exceptions import *
from stdnum.util import clean
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' .').strip()
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '.'.join((number[:3], number[3:7], number[7:11], number[11:]))
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid Swiss Sozialversicherungsnummer."""
number = compact(number)
if len(number) != 13:
@@ -73,7 +73,7 @@ def validate(number):
return ean.validate(number)
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid Swiss Sozialversicherungsnummer."""
try:
return bool(validate(number))
diff --git a/stdnum/ch/uid.py b/stdnum/ch/uid.py
index 0e5fb2c8..be2f327f 100644
--- a/stdnum/ch/uid.py
+++ b/stdnum/ch/uid.py
@@ -1,7 +1,7 @@
# uid.py - functions for handling Swiss business identifiers
# coding: utf-8
#
-# Copyright (C) 2015 Arthur de Jong
+# Copyright (C) 2015-2024 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""UID (Unternehmens-Identifikationsnummer, Swiss business identifier).
@@ -26,6 +24,8 @@
This module only supports the "new" format that was introduced in 2011 which
completely replaced the "old" 6-digit format in 2014.
+Stripped numbers without the CHE prefix are allowed and validated,
+but are returned with the prefix prepended.
More information:
@@ -34,6 +34,8 @@
>>> validate('CHE-100.155.212')
'CHE100155212'
+>>> validate('100.155.212')
+'CHE100155212'
>>> validate('CHE-100.155.213')
Traceback (most recent call last):
...
@@ -42,17 +44,27 @@
'CHE-100.155.212'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
-from stdnum.util import clean, isdigits
+from stdnum.util import clean, get_soap_client, isdigits
+
+TYPE_CHECKING = False
+if TYPE_CHECKING: # pragma: no cover (typechecking only import)
+ from typing import Any
-def compact(number):
+
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips
surrounding whitespace and separators."""
- return clean(number, ' -.').strip().upper()
+ number = clean(number, ' -.').strip().upper()
+ if len(number) == 9 and isdigits(number):
+ number = 'CHE' + number
+ return number
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit for organisations. The number passed should
not have the check digit included."""
weights = (5, 4, 3, 2, 7, 6, 5, 4)
@@ -60,7 +72,7 @@ def calc_check_digit(number):
return str((11 - s) % 11)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid UID. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -75,7 +87,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid UID."""
try:
return bool(validate(number))
@@ -83,8 +95,77 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return number[:3] + '-' + '.'.join(
number[i:i + 3] for i in range(3, len(number), 3))
+
+
+uid_wsdl = 'https://www.uid-wse.admin.ch/V5.0/PublicServices.svc?wsdl'
+
+
+def check_uid(
+ number: str,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> dict[str, Any] | None: # pragma: no cover
+ """Look up information via the Swiss Federal Statistical Office web service.
+
+ This uses the UID registry web service run by the the Swiss Federal
+ Statistical Office to provide more details on the provided number.
+
+ The `timeout` argument specifies the network timeout in seconds.
+
+ The `verify` argument is either a boolean that determines whether the
+ server's certificate is validate or a string which must be a path the CA
+ certificate bundle to use for verification.
+
+ Returns a dict-like object for valid numbers with the following structure::
+
+ {
+ 'organisation': {
+ 'organisationIdentification': {
+ 'uid': {'uidOrganisationIdCategorie': 'CHE', 'uidOrganisationId': 113690319},
+ 'OtherOrganisationId': [
+ {'organisationIdCategory': 'CH.ESTVID', 'organisationId': '052.0111.1006'},
+ ],
+ 'organisationName': 'Staatssekretariat für Migration SEM Vermietung von Parkplätzen',
+ 'legalForm': '0220',
+ },
+ 'address': [
+ {
+ 'addressCategory': 'LEGAL',
+ 'street': 'Quellenweg',
+ 'houseNumber': '6',
+ 'town': 'Wabern',
+ 'countryIdISO2': 'CH',
+ },
+ ],
+ },
+ 'uidregInformation': {
+ 'uidregStatusEnterpriseDetail': '3',
+ ...
+ },
+ 'vatRegisterInformation': {
+ 'vatStatus': '2',
+ 'vatEntryStatus': '1',
+ ...
+ },
+ }
+
+ See the following document for more details on the GetByUID return value
+ https://www.bfs.admin.ch/bfs/en/home/registers/enterprise-register/enterprise-identification/uid-register/uid-interfaces.html
+ """
+ # this function isn't always tested because it would require network access
+ # for the tests and might unnecessarily load the web service
+ number = compact(number)
+ client = get_soap_client(uid_wsdl, timeout=timeout, verify=verify)
+ try:
+ return client.GetByUID( # type: ignore[no-any-return]
+ uid={'uidOrganisationIdCategorie': number[:3], 'uidOrganisationId': number[3:]},
+ )[0]
+ except Exception: # noqa: B902 (exception type depends on SOAP client)
+ # Error responses by the server seem to result in exceptions raised
+ # by the SOAP client implementation
+ return None
diff --git a/stdnum/ch/vat.py b/stdnum/ch/vat.py
index d6501f6d..42f2fa68 100644
--- a/stdnum/ch/vat.py
+++ b/stdnum/ch/vat.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""VAT, MWST, TVA, IVA, TPV (Mehrwertsteuernummer, the Swiss VAT number).
@@ -43,17 +41,19 @@
'CHE-107.787.577 IVA'
"""
+from __future__ import annotations
+
from stdnum.ch import uid
from stdnum.exceptions import *
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips
surrounding whitespace and separators."""
return uid.compact(number)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -65,7 +65,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
@@ -73,7 +73,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return uid.format(number[:12]) + ' ' + number[12:]
diff --git a/stdnum/cl/__init__.py b/stdnum/cl/__init__.py
index f31595e6..8bdf85e9 100644
--- a/stdnum/cl/__init__.py
+++ b/stdnum/cl/__init__.py
@@ -14,12 +14,13 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Chilean numbers."""
+from __future__ import annotations
+
+
# provide vat and run as an alias
from stdnum.cl import rut as vat # noqa: F401, isort:skip
from stdnum.cl import rut as run # noqa: F401, isort:skip
diff --git a/stdnum/cl/rut.py b/stdnum/cl/rut.py
index d15dba42..353be116 100644
--- a/stdnum/cl/rut.py
+++ b/stdnum/cl/rut.py
@@ -16,9 +16,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""RUT (Rol Único Tributario, Chilean national tax number).
@@ -42,11 +40,13 @@
'12.531.909-2'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -.').upper().strip()
@@ -55,14 +55,14 @@ def compact(number):
return number
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should not have the
check digit included."""
s = sum(int(n) * (4 + (5 - i) % 6) for i, n in enumerate(number[::-1]))
return '0123456789K'[s % 11]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid RUT. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -75,7 +75,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid RUT."""
try:
return bool(validate(number))
@@ -83,7 +83,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return (number[:-7] + '.' + number[-7:-4] + '.' +
diff --git a/stdnum/cn/__init__.py b/stdnum/cn/__init__.py
index 93a6f5e4..d5b67a8d 100644
--- a/stdnum/cn/__init__.py
+++ b/stdnum/cn/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of China (PRC) numbers."""
+from __future__ import annotations
+
# Provide vat as an alias.
from stdnum.cn import uscc as vat # noqa: F401
diff --git a/stdnum/cn/loc.dat b/stdnum/cn/loc.dat
index 8ae03e5d..fbd0c548 100644
--- a/stdnum/cn/loc.dat
+++ b/stdnum/cn/loc.dat
@@ -1,3380 +1,6928 @@
-# generated from National Bureau of Statistics of the People's
-# Republic of China, downloaded from https://github.com/cn/GB2260
-# 2020-08-09 15:08:26.469948
-110101 county="东城区" prefecture="市辖区" province="北京市"
-110102 county="西城区" prefecture="市辖区" province="北京市"
-110103 county="崇文区" prefecture="市辖区" province="北京市"
-110104 county="宣武区" prefecture="市辖区" province="北京市"
-110105 county="朝阳区" prefecture="市辖区" province="北京市"
-110106 county="丰台区" prefecture="市辖区" province="北京市"
-110107 county="石景山区" prefecture="市辖区" province="北京市"
-110108 county="海淀区" prefecture="市辖区" province="北京市"
-110109 county="门头沟区" prefecture="市辖区" province="北京市"
-110111 county="房山区" prefecture="市辖区" province="北京市"
-110112 county="通州区" prefecture="市辖区" province="北京市"
-110113 county="顺义区" prefecture="市辖区" province="北京市"
-110114 county="昌平区" prefecture="市辖区" province="北京市"
-110115 county="大兴区" prefecture="市辖区" province="北京市"
-110116 county="怀柔区" prefecture="市辖区" province="北京市"
-110117 county="平谷区" prefecture="市辖区" province="北京市"
-110228 county="密云县" prefecture="县" province="北京市"
-110229 county="延庆县" prefecture="县" province="北京市"
-120101 county="和平区" prefecture="市辖区" province="天津市"
-120102 county="河东区" prefecture="市辖区" province="天津市"
-120103 county="河西区" prefecture="市辖区" province="天津市"
-120104 county="南开区" prefecture="市辖区" province="天津市"
-120105 county="河北区" prefecture="市辖区" province="天津市"
-120106 county="红桥区" prefecture="市辖区" province="天津市"
-120107 county="塘沽区" prefecture="市辖区" province="天津市"
-120108 county="汉沽区" prefecture="市辖区" province="天津市"
-120109 county="大港区" prefecture="市辖区" province="天津市"
-120110 county="东丽区" prefecture="市辖区" province="天津市"
-120111 county="西青区" prefecture="市辖区" province="天津市"
-120112 county="津南区" prefecture="市辖区" province="天津市"
-120113 county="北辰区" prefecture="市辖区" province="天津市"
-120114 county="武清区" prefecture="市辖区" province="天津市"
-120115 county="宝坻区" prefecture="市辖区" province="天津市"
-120116 county="滨海新区" prefecture="市辖区" province="天津市"
-120221 county="宁河县" prefecture="县" province="天津市"
-120223 county="静海县" prefecture="县" province="天津市"
-120225 county="蓟县" prefecture="县" province="天津市"
-130101 county="市辖区" prefecture="石家庄市" province="河北省"
-130102 county="长安区" prefecture="石家庄市" province="河北省"
-130103 county="桥东区" prefecture="石家庄市" province="河北省"
-130104 county="桥西区" prefecture="石家庄市" province="河北省"
-130105 county="新华区" prefecture="石家庄市" province="河北省"
-130107 county="井陉矿区" prefecture="石家庄市" province="河北省"
-130108 county="裕华区" prefecture="石家庄市" province="河北省"
-130109 county="藁城区" prefecture="石家庄市" province="河北省"
-130110 county="鹿泉区" prefecture="石家庄市" province="河北省"
-130111 county="栾城区" prefecture="石家庄市" province="河北省"
-130121 county="井陉县" prefecture="石家庄市" province="河北省"
-130123 county="正定县" prefecture="石家庄市" province="河北省"
-130124 county="栾城县" prefecture="石家庄市" province="河北省"
-130125 county="行唐县" prefecture="石家庄市" province="河北省"
-130126 county="灵寿县" prefecture="石家庄市" province="河北省"
-130127 county="高邑县" prefecture="石家庄市" province="河北省"
-130128 county="深泽县" prefecture="石家庄市" province="河北省"
-130129 county="赞皇县" prefecture="石家庄市" province="河北省"
-130130 county="无极县" prefecture="石家庄市" province="河北省"
-130131 county="平山县" prefecture="石家庄市" province="河北省"
-130132 county="元氏县" prefecture="石家庄市" province="河北省"
-130133 county="赵县" prefecture="石家庄市" province="河北省"
-130181 county="辛集市" prefecture="石家庄市" province="河北省"
-130182 county="藁城市" prefecture="石家庄市" province="河北省"
-130183 county="晋州市" prefecture="石家庄市" province="河北省"
-130184 county="新乐市" prefecture="石家庄市" province="河北省"
-130185 county="鹿泉市" prefecture="石家庄市" province="河北省"
-130201 county="市辖区" prefecture="唐山市" province="河北省"
-130202 county="路南区" prefecture="唐山市" province="河北省"
-130203 county="路北区" prefecture="唐山市" province="河北省"
-130204 county="古冶区" prefecture="唐山市" province="河北省"
-130205 county="开平区" prefecture="唐山市" province="河北省"
-130207 county="丰南区" prefecture="唐山市" province="河北省"
-130208 county="丰润区" prefecture="唐山市" province="河北省"
-130209 county="曹妃甸区" prefecture="唐山市" province="河北省"
-130223 county="滦县" prefecture="唐山市" province="河北省"
-130224 county="滦南县" prefecture="唐山市" province="河北省"
-130225 county="乐亭县" prefecture="唐山市" province="河北省"
-130227 county="迁西县" prefecture="唐山市" province="河北省"
-130229 county="玉田县" prefecture="唐山市" province="河北省"
-130230 county="唐海县" prefecture="唐山市" province="河北省"
-130281 county="遵化市" prefecture="唐山市" province="河北省"
-130283 county="迁安市" prefecture="唐山市" province="河北省"
-130301 county="市辖区" prefecture="秦皇岛市" province="河北省"
-130302 county="海港区" prefecture="秦皇岛市" province="河北省"
-130303 county="山海关区" prefecture="秦皇岛市" province="河北省"
-130304 county="北戴河区" prefecture="秦皇岛市" province="河北省"
-130321 county="青龙满族自治县" prefecture="秦皇岛市" province="河北省"
-130322 county="昌黎县" prefecture="秦皇岛市" province="河北省"
-130323 county="抚宁县" prefecture="秦皇岛市" province="河北省"
-130324 county="卢龙县" prefecture="秦皇岛市" province="河北省"
-130401 county="市辖区" prefecture="邯郸市" province="河北省"
-130402 county="邯山区" prefecture="邯郸市" province="河北省"
-130403 county="丛台区" prefecture="邯郸市" province="河北省"
-130404 county="复兴区" prefecture="邯郸市" province="河北省"
-130406 county="峰峰矿区" prefecture="邯郸市" province="河北省"
-130421 county="邯郸县" prefecture="邯郸市" province="河北省"
-130423 county="临漳县" prefecture="邯郸市" province="河北省"
-130424 county="成安县" prefecture="邯郸市" province="河北省"
-130425 county="大名县" prefecture="邯郸市" province="河北省"
-130426 county="涉县" prefecture="邯郸市" province="河北省"
-130427 county="磁县" prefecture="邯郸市" province="河北省"
-130428 county="肥乡县" prefecture="邯郸市" province="河北省"
-130429 county="永年县" prefecture="邯郸市" province="河北省"
-130430 county="邱县" prefecture="邯郸市" province="河北省"
-130431 county="鸡泽县" prefecture="邯郸市" province="河北省"
-130432 county="广平县" prefecture="邯郸市" province="河北省"
-130433 county="馆陶县" prefecture="邯郸市" province="河北省"
-130434 county="魏县" prefecture="邯郸市" province="河北省"
-130435 county="曲周县" prefecture="邯郸市" province="河北省"
-130481 county="武安市" prefecture="邯郸市" province="河北省"
-130501 county="市辖区" prefecture="邢台市" province="河北省"
-130502 county="桥东区" prefecture="邢台市" province="河北省"
-130503 county="桥西区" prefecture="邢台市" province="河北省"
-130521 county="邢台县" prefecture="邢台市" province="河北省"
-130522 county="临城县" prefecture="邢台市" province="河北省"
-130523 county="内丘县" prefecture="邢台市" province="河北省"
-130524 county="柏乡县" prefecture="邢台市" province="河北省"
-130525 county="隆尧县" prefecture="邢台市" province="河北省"
-130526 county="任县" prefecture="邢台市" province="河北省"
-130527 county="南和县" prefecture="邢台市" province="河北省"
-130528 county="宁晋县" prefecture="邢台市" province="河北省"
-130529 county="巨鹿县" prefecture="邢台市" province="河北省"
-130530 county="新河县" prefecture="邢台市" province="河北省"
-130531 county="广宗县" prefecture="邢台市" province="河北省"
-130532 county="平乡县" prefecture="邢台市" province="河北省"
-130533 county="威县" prefecture="邢台市" province="河北省"
-130534 county="清河县" prefecture="邢台市" province="河北省"
-130535 county="临西县" prefecture="邢台市" province="河北省"
-130581 county="南宫市" prefecture="邢台市" province="河北省"
-130582 county="沙河市" prefecture="邢台市" province="河北省"
-130601 county="市辖区" prefecture="保定市" province="河北省"
-130602 county="新市区" prefecture="保定市" province="河北省"
-130603 county="北市区" prefecture="保定市" province="河北省"
-130604 county="南市区" prefecture="保定市" province="河北省"
-130621 county="满城县" prefecture="保定市" province="河北省"
-130622 county="清苑县" prefecture="保定市" province="河北省"
-130623 county="涞水县" prefecture="保定市" province="河北省"
-130624 county="阜平县" prefecture="保定市" province="河北省"
-130625 county="徐水县" prefecture="保定市" province="河北省"
-130626 county="定兴县" prefecture="保定市" province="河北省"
-130627 county="唐县" prefecture="保定市" province="河北省"
-130628 county="高阳县" prefecture="保定市" province="河北省"
-130629 county="容城县" prefecture="保定市" province="河北省"
-130630 county="涞源县" prefecture="保定市" province="河北省"
-130631 county="望都县" prefecture="保定市" province="河北省"
-130632 county="安新县" prefecture="保定市" province="河北省"
-130633 county="易县" prefecture="保定市" province="河北省"
-130634 county="曲阳县" prefecture="保定市" province="河北省"
-130635 county="蠡县" prefecture="保定市" province="河北省"
-130636 county="顺平县" prefecture="保定市" province="河北省"
-130637 county="博野县" prefecture="保定市" province="河北省"
-130638 county="雄县" prefecture="保定市" province="河北省"
-130681 county="涿州市" prefecture="保定市" province="河北省"
-130682 county="定州市" prefecture="保定市" province="河北省"
-130683 county="安国市" prefecture="保定市" province="河北省"
-130684 county="高碑店市" prefecture="保定市" province="河北省"
-130701 county="市辖区" prefecture="张家口市" province="河北省"
-130702 county="桥东区" prefecture="张家口市" province="河北省"
-130703 county="桥西区" prefecture="张家口市" province="河北省"
-130705 county="宣化区" prefecture="张家口市" province="河北省"
-130706 county="下花园区" prefecture="张家口市" province="河北省"
-130721 county="宣化县" prefecture="张家口市" province="河北省"
-130722 county="张北县" prefecture="张家口市" province="河北省"
-130723 county="康保县" prefecture="张家口市" province="河北省"
-130724 county="沽源县" prefecture="张家口市" province="河北省"
-130725 county="尚义县" prefecture="张家口市" province="河北省"
-130726 county="蔚县" prefecture="张家口市" province="河北省"
-130727 county="阳原县" prefecture="张家口市" province="河北省"
-130728 county="怀安县" prefecture="张家口市" province="河北省"
-130729 county="万全县" prefecture="张家口市" province="河北省"
-130730 county="怀来县" prefecture="张家口市" province="河北省"
-130731 county="涿鹿县" prefecture="张家口市" province="河北省"
-130732 county="赤城县" prefecture="张家口市" province="河北省"
-130733 county="崇礼县" prefecture="张家口市" province="河北省"
-130801 county="市辖区" prefecture="承德市" province="河北省"
-130802 county="双桥区" prefecture="承德市" province="河北省"
-130803 county="双滦区" prefecture="承德市" province="河北省"
-130804 county="鹰手营子矿区" prefecture="承德市" province="河北省"
-130821 county="承德县" prefecture="承德市" province="河北省"
-130822 county="兴隆县" prefecture="承德市" province="河北省"
-130823 county="平泉县" prefecture="承德市" province="河北省"
-130824 county="滦平县" prefecture="承德市" province="河北省"
-130825 county="隆化县" prefecture="承德市" province="河北省"
-130826 county="丰宁满族自治县" prefecture="承德市" province="河北省"
-130827 county="宽城满族自治县" prefecture="承德市" province="河北省"
-130828 county="围场满族蒙古族自治县" prefecture="承德市" province="河北省"
-130901 county="市辖区" prefecture="沧州市" province="河北省"
-130902 county="新华区" prefecture="沧州市" province="河北省"
-130903 county="运河区" prefecture="沧州市" province="河北省"
-130921 county="沧县" prefecture="沧州市" province="河北省"
-130922 county="青县" prefecture="沧州市" province="河北省"
-130923 county="东光县" prefecture="沧州市" province="河北省"
-130924 county="海兴县" prefecture="沧州市" province="河北省"
-130925 county="盐山县" prefecture="沧州市" province="河北省"
-130926 county="肃宁县" prefecture="沧州市" province="河北省"
-130927 county="南皮县" prefecture="沧州市" province="河北省"
-130928 county="吴桥县" prefecture="沧州市" province="河北省"
-130929 county="献县" prefecture="沧州市" province="河北省"
-130930 county="孟村回族自治县" prefecture="沧州市" province="河北省"
-130981 county="泊头市" prefecture="沧州市" province="河北省"
-130982 county="任丘市" prefecture="沧州市" province="河北省"
-130983 county="黄骅市" prefecture="沧州市" province="河北省"
-130984 county="河间市" prefecture="沧州市" province="河北省"
-131001 county="市辖区" prefecture="廊坊市" province="河北省"
-131002 county="安次区" prefecture="廊坊市" province="河北省"
-131003 county="广阳区" prefecture="廊坊市" province="河北省"
-131022 county="固安县" prefecture="廊坊市" province="河北省"
-131023 county="永清县" prefecture="廊坊市" province="河北省"
-131024 county="香河县" prefecture="廊坊市" province="河北省"
-131025 county="大城县" prefecture="廊坊市" province="河北省"
-131026 county="文安县" prefecture="廊坊市" province="河北省"
-131028 county="大厂回族自治县" prefecture="廊坊市" province="河北省"
-131081 county="霸州市" prefecture="廊坊市" province="河北省"
-131082 county="三河市" prefecture="廊坊市" province="河北省"
-131101 county="市辖区" prefecture="衡水市" province="河北省"
-131102 county="桃城区" prefecture="衡水市" province="河北省"
-131121 county="枣强县" prefecture="衡水市" province="河北省"
-131122 county="武邑县" prefecture="衡水市" province="河北省"
-131123 county="武强县" prefecture="衡水市" province="河北省"
-131124 county="饶阳县" prefecture="衡水市" province="河北省"
-131125 county="安平县" prefecture="衡水市" province="河北省"
-131126 county="故城县" prefecture="衡水市" province="河北省"
-131127 county="景县" prefecture="衡水市" province="河北省"
-131128 county="阜城县" prefecture="衡水市" province="河北省"
-131181 county="冀州市" prefecture="衡水市" province="河北省"
-131182 county="深州市" prefecture="衡水市" province="河北省"
-140101 county="市辖区" prefecture="太原市" province="山西省"
-140105 county="小店区" prefecture="太原市" province="山西省"
-140106 county="迎泽区" prefecture="太原市" province="山西省"
-140107 county="杏花岭区" prefecture="太原市" province="山西省"
-140108 county="尖草坪区" prefecture="太原市" province="山西省"
-140109 county="万柏林区" prefecture="太原市" province="山西省"
-140110 county="晋源区" prefecture="太原市" province="山西省"
-140121 county="清徐县" prefecture="太原市" province="山西省"
-140122 county="阳曲县" prefecture="太原市" province="山西省"
-140123 county="娄烦县" prefecture="太原市" province="山西省"
-140181 county="古交市" prefecture="太原市" province="山西省"
-140201 county="市辖区" prefecture="大同市" province="山西省"
-140202 county="城区" prefecture="大同市" province="山西省"
-140203 county="矿区" prefecture="大同市" province="山西省"
-140211 county="南郊区" prefecture="大同市" province="山西省"
-140212 county="新荣区" prefecture="大同市" province="山西省"
-140221 county="阳高县" prefecture="大同市" province="山西省"
-140222 county="天镇县" prefecture="大同市" province="山西省"
-140223 county="广灵县" prefecture="大同市" province="山西省"
-140224 county="灵丘县" prefecture="大同市" province="山西省"
-140225 county="浑源县" prefecture="大同市" province="山西省"
-140226 county="左云县" prefecture="大同市" province="山西省"
-140227 county="大同县" prefecture="大同市" province="山西省"
-140301 county="市辖区" prefecture="阳泉市" province="山西省"
-140302 county="城区" prefecture="阳泉市" province="山西省"
-140303 county="矿区" prefecture="阳泉市" province="山西省"
-140311 county="郊区" prefecture="阳泉市" province="山西省"
-140321 county="平定县" prefecture="阳泉市" province="山西省"
-140322 county="盂县" prefecture="阳泉市" province="山西省"
-140401 county="市辖区" prefecture="长治市" province="山西省"
-140402 county="城区" prefecture="长治市" province="山西省"
-140411 county="郊区" prefecture="长治市" province="山西省"
-140421 county="长治县" prefecture="长治市" province="山西省"
-140423 county="襄垣县" prefecture="长治市" province="山西省"
-140424 county="屯留县" prefecture="长治市" province="山西省"
-140425 county="平顺县" prefecture="长治市" province="山西省"
-140426 county="黎城县" prefecture="长治市" province="山西省"
-140427 county="壶关县" prefecture="长治市" province="山西省"
-140428 county="长子县" prefecture="长治市" province="山西省"
-140429 county="武乡县" prefecture="长治市" province="山西省"
-140430 county="沁县" prefecture="长治市" province="山西省"
-140431 county="沁源县" prefecture="长治市" province="山西省"
-140481 county="潞城市" prefecture="长治市" province="山西省"
-140501 county="市辖区" prefecture="晋城市" province="山西省"
-140502 county="城区" prefecture="晋城市" province="山西省"
-140521 county="沁水县" prefecture="晋城市" province="山西省"
-140522 county="阳城县" prefecture="晋城市" province="山西省"
-140524 county="陵川县" prefecture="晋城市" province="山西省"
-140525 county="泽州县" prefecture="晋城市" province="山西省"
-140581 county="高平市" prefecture="晋城市" province="山西省"
-140601 county="市辖区" prefecture="朔州市" province="山西省"
-140602 county="朔城区" prefecture="朔州市" province="山西省"
-140603 county="平鲁区" prefecture="朔州市" province="山西省"
-140621 county="山阴县" prefecture="朔州市" province="山西省"
-140622 county="应县" prefecture="朔州市" province="山西省"
-140623 county="右玉县" prefecture="朔州市" province="山西省"
-140624 county="怀仁县" prefecture="朔州市" province="山西省"
-140701 county="市辖区" prefecture="晋中市" province="山西省"
-140702 county="榆次区" prefecture="晋中市" province="山西省"
-140721 county="榆社县" prefecture="晋中市" province="山西省"
-140722 county="左权县" prefecture="晋中市" province="山西省"
-140723 county="和顺县" prefecture="晋中市" province="山西省"
-140724 county="昔阳县" prefecture="晋中市" province="山西省"
-140725 county="寿阳县" prefecture="晋中市" province="山西省"
-140726 county="太谷县" prefecture="晋中市" province="山西省"
-140727 county="祁县" prefecture="晋中市" province="山西省"
-140728 county="平遥县" prefecture="晋中市" province="山西省"
-140729 county="灵石县" prefecture="晋中市" province="山西省"
-140781 county="介休市" prefecture="晋中市" province="山西省"
-140801 county="市辖区" prefecture="运城市" province="山西省"
-140802 county="盐湖区" prefecture="运城市" province="山西省"
-140821 county="临猗县" prefecture="运城市" province="山西省"
-140822 county="万荣县" prefecture="运城市" province="山西省"
-140823 county="闻喜县" prefecture="运城市" province="山西省"
-140824 county="稷山县" prefecture="运城市" province="山西省"
-140825 county="新绛县" prefecture="运城市" province="山西省"
-140826 county="绛县" prefecture="运城市" province="山西省"
-140827 county="垣曲县" prefecture="运城市" province="山西省"
-140828 county="夏县" prefecture="运城市" province="山西省"
-140829 county="平陆县" prefecture="运城市" province="山西省"
-140830 county="芮城县" prefecture="运城市" province="山西省"
-140881 county="永济市" prefecture="运城市" province="山西省"
-140882 county="河津市" prefecture="运城市" province="山西省"
-140901 county="市辖区" prefecture="忻州市" province="山西省"
-140902 county="忻府区" prefecture="忻州市" province="山西省"
-140921 county="定襄县" prefecture="忻州市" province="山西省"
-140922 county="五台县" prefecture="忻州市" province="山西省"
-140923 county="代县" prefecture="忻州市" province="山西省"
-140924 county="繁峙县" prefecture="忻州市" province="山西省"
-140925 county="宁武县" prefecture="忻州市" province="山西省"
-140926 county="静乐县" prefecture="忻州市" province="山西省"
-140927 county="神池县" prefecture="忻州市" province="山西省"
-140928 county="五寨县" prefecture="忻州市" province="山西省"
-140929 county="岢岚县" prefecture="忻州市" province="山西省"
-140930 county="河曲县" prefecture="忻州市" province="山西省"
-140931 county="保德县" prefecture="忻州市" province="山西省"
-140932 county="偏关县" prefecture="忻州市" province="山西省"
-140981 county="原平市" prefecture="忻州市" province="山西省"
-141001 county="市辖区" prefecture="临汾市" province="山西省"
-141002 county="尧都区" prefecture="临汾市" province="山西省"
-141021 county="曲沃县" prefecture="临汾市" province="山西省"
-141022 county="翼城县" prefecture="临汾市" province="山西省"
-141023 county="襄汾县" prefecture="临汾市" province="山西省"
-141024 county="洪洞县" prefecture="临汾市" province="山西省"
-141025 county="古县" prefecture="临汾市" province="山西省"
-141026 county="安泽县" prefecture="临汾市" province="山西省"
-141027 county="浮山县" prefecture="临汾市" province="山西省"
-141028 county="吉县" prefecture="临汾市" province="山西省"
-141029 county="乡宁县" prefecture="临汾市" province="山西省"
-141030 county="大宁县" prefecture="临汾市" province="山西省"
-141031 county="隰县" prefecture="临汾市" province="山西省"
-141032 county="永和县" prefecture="临汾市" province="山西省"
-141033 county="蒲县" prefecture="临汾市" province="山西省"
-141034 county="汾西县" prefecture="临汾市" province="山西省"
-141081 county="侯马市" prefecture="临汾市" province="山西省"
-141082 county="霍州市" prefecture="临汾市" province="山西省"
-141101 county="市辖区" prefecture="吕梁市" province="山西省"
-141102 county="离石区" prefecture="吕梁市" province="山西省"
-141121 county="文水县" prefecture="吕梁市" province="山西省"
-141122 county="交城县" prefecture="吕梁市" province="山西省"
-141123 county="兴县" prefecture="吕梁市" province="山西省"
-141124 county="临县" prefecture="吕梁市" province="山西省"
-141125 county="柳林县" prefecture="吕梁市" province="山西省"
-141126 county="石楼县" prefecture="吕梁市" province="山西省"
-141127 county="岚县" prefecture="吕梁市" province="山西省"
-141128 county="方山县" prefecture="吕梁市" province="山西省"
-141129 county="中阳县" prefecture="吕梁市" province="山西省"
-141130 county="交口县" prefecture="吕梁市" province="山西省"
-141181 county="孝义市" prefecture="吕梁市" province="山西省"
-141182 county="汾阳市" prefecture="吕梁市" province="山西省"
-142301 county="孝义市" prefecture="吕梁地区" province="山西省"
-142302 county="离石市" prefecture="吕梁地区" province="山西省"
-142303 county="汾阳市" prefecture="吕梁地区" province="山西省"
-142322 county="文水县" prefecture="吕梁地区" province="山西省"
-142323 county="交城县" prefecture="吕梁地区" province="山西省"
-142325 county="兴县" prefecture="吕梁地区" province="山西省"
-142326 county="临县" prefecture="吕梁地区" province="山西省"
-142327 county="柳林县" prefecture="吕梁地区" province="山西省"
-142328 county="石楼县" prefecture="吕梁地区" province="山西省"
-142329 county="岚县" prefecture="吕梁地区" province="山西省"
-142330 county="方山县" prefecture="吕梁地区" province="山西省"
-142332 county="中阳县" prefecture="吕梁地区" province="山西省"
-142333 county="交口县" prefecture="吕梁地区" province="山西省"
-150101 county="市辖区" prefecture="呼和浩特市" province="内蒙古自治区"
-150102 county="新城区" prefecture="呼和浩特市" province="内蒙古自治区"
-150103 county="回民区" prefecture="呼和浩特市" province="内蒙古自治区"
-150104 county="玉泉区" prefecture="呼和浩特市" province="内蒙古自治区"
-150105 county="赛罕区" prefecture="呼和浩特市" province="内蒙古自治区"
-150121 county="土默特左旗" prefecture="呼和浩特市" province="内蒙古自治区"
-150122 county="托克托县" prefecture="呼和浩特市" province="内蒙古自治区"
-150123 county="和林格尔县" prefecture="呼和浩特市" province="内蒙古自治区"
-150124 county="清水河县" prefecture="呼和浩特市" province="内蒙古自治区"
-150125 county="武川县" prefecture="呼和浩特市" province="内蒙古自治区"
-150201 county="市辖区" prefecture="包头市" province="内蒙古自治区"
-150202 county="东河区" prefecture="包头市" province="内蒙古自治区"
-150203 county="昆都仑区" prefecture="包头市" province="内蒙古自治区"
-150204 county="青山区" prefecture="包头市" province="内蒙古自治区"
-150205 county="石拐区" prefecture="包头市" province="内蒙古自治区"
-150206 county="白云鄂博矿区" prefecture="包头市" province="内蒙古自治区"
-150207 county="九原区" prefecture="包头市" province="内蒙古自治区"
-150221 county="土默特右旗" prefecture="包头市" province="内蒙古自治区"
-150222 county="固阳县" prefecture="包头市" province="内蒙古自治区"
-150223 county="达尔罕茂明安联合旗" prefecture="包头市" province="内蒙古自治区"
-150301 county="市辖区" prefecture="乌海市" province="内蒙古自治区"
-150302 county="海勃湾区" prefecture="乌海市" province="内蒙古自治区"
-150303 county="海南区" prefecture="乌海市" province="内蒙古自治区"
-150304 county="乌达区" prefecture="乌海市" province="内蒙古自治区"
-150401 county="市辖区" prefecture="赤峰市" province="内蒙古自治区"
-150402 county="红山区" prefecture="赤峰市" province="内蒙古自治区"
-150403 county="元宝山区" prefecture="赤峰市" province="内蒙古自治区"
-150404 county="松山区" prefecture="赤峰市" province="内蒙古自治区"
-150421 county="阿鲁科尔沁旗" prefecture="赤峰市" province="内蒙古自治区"
-150422 county="巴林左旗" prefecture="赤峰市" province="内蒙古自治区"
-150423 county="巴林右旗" prefecture="赤峰市" province="内蒙古自治区"
-150424 county="林西县" prefecture="赤峰市" province="内蒙古自治区"
-150425 county="克什克腾旗" prefecture="赤峰市" province="内蒙古自治区"
-150426 county="翁牛特旗" prefecture="赤峰市" province="内蒙古自治区"
-150428 county="喀喇沁旗" prefecture="赤峰市" province="内蒙古自治区"
-150429 county="宁城县" prefecture="赤峰市" province="内蒙古自治区"
-150430 county="敖汉旗" prefecture="赤峰市" province="内蒙古自治区"
-150501 county="市辖区" prefecture="通辽市" province="内蒙古自治区"
-150502 county="科尔沁区" prefecture="通辽市" province="内蒙古自治区"
-150521 county="科尔沁左翼中旗" prefecture="通辽市" province="内蒙古自治区"
-150522 county="科尔沁左翼后旗" prefecture="通辽市" province="内蒙古自治区"
-150523 county="开鲁县" prefecture="通辽市" province="内蒙古自治区"
-150524 county="库伦旗" prefecture="通辽市" province="内蒙古自治区"
-150525 county="奈曼旗" prefecture="通辽市" province="内蒙古自治区"
-150526 county="扎鲁特旗" prefecture="通辽市" province="内蒙古自治区"
-150581 county="霍林郭勒市" prefecture="通辽市" province="内蒙古自治区"
-150601 county="市辖区" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150602 county="东胜区" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150621 county="达拉特旗" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150622 county="准格尔旗" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150623 county="鄂托克前旗" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150624 county="鄂托克旗" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150625 county="杭锦旗" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150626 county="乌审旗" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150627 county="伊金霍洛旗" prefecture="鄂尔多斯市" province="内蒙古自治区"
-150701 county="市辖区" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150702 county="海拉尔区" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150703 county="扎赉诺尔区" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150721 county="阿荣旗" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150722 county="莫力达瓦达斡尔族自治旗" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150723 county="鄂伦春自治旗" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150724 county="鄂温克族自治旗" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150725 county="陈巴尔虎旗" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150726 county="新巴尔虎左旗" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150727 county="新巴尔虎右旗" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150781 county="满洲里市" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150782 county="牙克石市" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150783 county="扎兰屯市" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150784 county="额尔古纳市" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150785 county="根河市" prefecture="呼伦贝尔市" province="内蒙古自治区"
-150801 county="市辖区" prefecture="巴彦淖尔市" province="内蒙古自治区"
-150802 county="临河区" prefecture="巴彦淖尔市" province="内蒙古自治区"
-150821 county="五原县" prefecture="巴彦淖尔市" province="内蒙古自治区"
-150822 county="磴口县" prefecture="巴彦淖尔市" province="内蒙古自治区"
-150823 county="乌拉特前旗" prefecture="巴彦淖尔市" province="内蒙古自治区"
-150824 county="乌拉特中旗" prefecture="巴彦淖尔市" province="内蒙古自治区"
-150825 county="乌拉特后旗" prefecture="巴彦淖尔市" province="内蒙古自治区"
-150826 county="杭锦后旗" prefecture="巴彦淖尔市" province="内蒙古自治区"
-150901 county="市辖区" prefecture="乌兰察布市" province="内蒙古自治区"
-150902 county="集宁区" prefecture="乌兰察布市" province="内蒙古自治区"
-150921 county="卓资县" prefecture="乌兰察布市" province="内蒙古自治区"
-150922 county="化德县" prefecture="乌兰察布市" province="内蒙古自治区"
-150923 county="商都县" prefecture="乌兰察布市" province="内蒙古自治区"
-150924 county="兴和县" prefecture="乌兰察布市" province="内蒙古自治区"
-150925 county="凉城县" prefecture="乌兰察布市" province="内蒙古自治区"
-150926 county="察哈尔右翼前旗" prefecture="乌兰察布市" province="内蒙古自治区"
-150927 county="察哈尔右翼中旗" prefecture="乌兰察布市" province="内蒙古自治区"
-150928 county="察哈尔右翼后旗" prefecture="乌兰察布市" province="内蒙古自治区"
-150929 county="四子王旗" prefecture="乌兰察布市" province="内蒙古自治区"
-150981 county="丰镇市" prefecture="乌兰察布市" province="内蒙古自治区"
-152201 county="乌兰浩特市" prefecture="兴安盟" province="内蒙古自治区"
-152202 county="阿尔山市" prefecture="兴安盟" province="内蒙古自治区"
-152221 county="科尔沁右翼前旗" prefecture="兴安盟" province="内蒙古自治区"
-152222 county="科尔沁右翼中旗" prefecture="兴安盟" province="内蒙古自治区"
-152223 county="扎赉特旗" prefecture="兴安盟" province="内蒙古自治区"
-152224 county="突泉县" prefecture="兴安盟" province="内蒙古自治区"
-152501 county="二连浩特市" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152502 county="锡林浩特市" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152522 county="阿巴嘎旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152523 county="苏尼特左旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152524 county="苏尼特右旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152525 county="东乌珠穆沁旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152526 county="西乌珠穆沁旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152527 county="太仆寺旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152528 county="镶黄旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152529 county="正镶白旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152530 county="正蓝旗" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152531 county="多伦县" prefecture="锡林郭勒盟" province="内蒙古自治区"
-152601 county="集宁市" prefecture="乌兰察布盟" province="内蒙古自治区"
-152602 county="丰镇市" prefecture="乌兰察布盟" province="内蒙古自治区"
-152624 county="卓资县" prefecture="乌兰察布盟" province="内蒙古自治区"
-152625 county="化德县" prefecture="乌兰察布盟" province="内蒙古自治区"
-152626 county="商都县" prefecture="乌兰察布盟" province="内蒙古自治区"
-152627 county="兴和县" prefecture="乌兰察布盟" province="内蒙古自治区"
-152629 county="凉城县" prefecture="乌兰察布盟" province="内蒙古自治区"
-152630 county="察哈尔右翼前旗" prefecture="乌兰察布盟" province="内蒙古自治区"
-152631 county="察哈尔右翼中旗" prefecture="乌兰察布盟" province="内蒙古自治区"
-152632 county="察哈尔右翼后旗" prefecture="乌兰察布盟" province="内蒙古自治区"
-152634 county="四子王旗" prefecture="乌兰察布盟" province="内蒙古自治区"
-152801 county="临河市" prefecture="巴彦淖尔盟" province="内蒙古自治区"
-152822 county="五原县" prefecture="巴彦淖尔盟" province="内蒙古自治区"
-152823 county="磴口县" prefecture="巴彦淖尔盟" province="内蒙古自治区"
-152824 county="乌拉特前旗" prefecture="巴彦淖尔盟" province="内蒙古自治区"
-152825 county="乌拉特中旗" prefecture="巴彦淖尔盟" province="内蒙古自治区"
-152826 county="乌拉特后旗" prefecture="巴彦淖尔盟" province="内蒙古自治区"
-152827 county="杭锦后旗" prefecture="巴彦淖尔盟" province="内蒙古自治区"
-152921 county="阿拉善左旗" prefecture="阿拉善盟" province="内蒙古自治区"
-152922 county="阿拉善右旗" prefecture="阿拉善盟" province="内蒙古自治区"
-152923 county="额济纳旗" prefecture="阿拉善盟" province="内蒙古自治区"
-210101 county="市辖区" prefecture="沈阳市" province="辽宁省"
-210102 county="和平区" prefecture="沈阳市" province="辽宁省"
-210103 county="沈河区" prefecture="沈阳市" province="辽宁省"
-210104 county="大东区" prefecture="沈阳市" province="辽宁省"
-210105 county="皇姑区" prefecture="沈阳市" province="辽宁省"
-210106 county="铁西区" prefecture="沈阳市" province="辽宁省"
-210111 county="苏家屯区" prefecture="沈阳市" province="辽宁省"
-210112 county="浑南区" prefecture="沈阳市" province="辽宁省"
-210113 county="沈北新区" prefecture="沈阳市" province="辽宁省"
-210114 county="于洪区" prefecture="沈阳市" province="辽宁省"
-210122 county="辽中县" prefecture="沈阳市" province="辽宁省"
-210123 county="康平县" prefecture="沈阳市" province="辽宁省"
-210124 county="法库县" prefecture="沈阳市" province="辽宁省"
-210181 county="新民市" prefecture="沈阳市" province="辽宁省"
-210201 county="市辖区" prefecture="大连市" province="辽宁省"
-210202 county="中山区" prefecture="大连市" province="辽宁省"
-210203 county="西岗区" prefecture="大连市" province="辽宁省"
-210204 county="沙河口区" prefecture="大连市" province="辽宁省"
-210211 county="甘井子区" prefecture="大连市" province="辽宁省"
-210212 county="旅顺口区" prefecture="大连市" province="辽宁省"
-210213 county="金州区" prefecture="大连市" province="辽宁省"
-210224 county="长海县" prefecture="大连市" province="辽宁省"
-210281 county="瓦房店市" prefecture="大连市" province="辽宁省"
-210282 county="普兰店市" prefecture="大连市" province="辽宁省"
-210283 county="庄河市" prefecture="大连市" province="辽宁省"
-210301 county="市辖区" prefecture="鞍山市" province="辽宁省"
-210302 county="铁东区" prefecture="鞍山市" province="辽宁省"
-210303 county="铁西区" prefecture="鞍山市" province="辽宁省"
-210304 county="立山区" prefecture="鞍山市" province="辽宁省"
-210311 county="千山区" prefecture="鞍山市" province="辽宁省"
-210321 county="台安县" prefecture="鞍山市" province="辽宁省"
-210323 county="岫岩满族自治县" prefecture="鞍山市" province="辽宁省"
-210381 county="海城市" prefecture="鞍山市" province="辽宁省"
-210401 county="市辖区" prefecture="抚顺市" province="辽宁省"
-210402 county="新抚区" prefecture="抚顺市" province="辽宁省"
-210403 county="东洲区" prefecture="抚顺市" province="辽宁省"
-210404 county="望花区" prefecture="抚顺市" province="辽宁省"
-210411 county="顺城区" prefecture="抚顺市" province="辽宁省"
-210421 county="抚顺县" prefecture="抚顺市" province="辽宁省"
-210422 county="新宾满族自治县" prefecture="抚顺市" province="辽宁省"
-210423 county="清原满族自治县" prefecture="抚顺市" province="辽宁省"
-210501 county="市辖区" prefecture="本溪市" province="辽宁省"
-210502 county="平山区" prefecture="本溪市" province="辽宁省"
-210503 county="溪湖区" prefecture="本溪市" province="辽宁省"
-210504 county="明山区" prefecture="本溪市" province="辽宁省"
-210505 county="南芬区" prefecture="本溪市" province="辽宁省"
-210521 county="本溪满族自治县" prefecture="本溪市" province="辽宁省"
-210522 county="桓仁满族自治县" prefecture="本溪市" province="辽宁省"
-210601 county="市辖区" prefecture="丹东市" province="辽宁省"
-210602 county="元宝区" prefecture="丹东市" province="辽宁省"
-210603 county="振兴区" prefecture="丹东市" province="辽宁省"
-210604 county="振安区" prefecture="丹东市" province="辽宁省"
-210624 county="宽甸满族自治县" prefecture="丹东市" province="辽宁省"
-210681 county="东港市" prefecture="丹东市" province="辽宁省"
-210682 county="凤城市" prefecture="丹东市" province="辽宁省"
-210701 county="市辖区" prefecture="锦州市" province="辽宁省"
-210702 county="古塔区" prefecture="锦州市" province="辽宁省"
-210703 county="凌河区" prefecture="锦州市" province="辽宁省"
-210711 county="太和区" prefecture="锦州市" province="辽宁省"
-210726 county="黑山县" prefecture="锦州市" province="辽宁省"
-210727 county="义县" prefecture="锦州市" province="辽宁省"
-210781 county="凌海市" prefecture="锦州市" province="辽宁省"
-210782 county="北镇市" prefecture="锦州市" province="辽宁省"
-210801 county="市辖区" prefecture="营口市" province="辽宁省"
-210802 county="站前区" prefecture="营口市" province="辽宁省"
-210803 county="西市区" prefecture="营口市" province="辽宁省"
-210804 county="鲅鱼圈区" prefecture="营口市" province="辽宁省"
-210811 county="老边区" prefecture="营口市" province="辽宁省"
-210881 county="盖州市" prefecture="营口市" province="辽宁省"
-210882 county="大石桥市" prefecture="营口市" province="辽宁省"
-210901 county="市辖区" prefecture="阜新市" province="辽宁省"
-210902 county="海州区" prefecture="阜新市" province="辽宁省"
-210903 county="新邱区" prefecture="阜新市" province="辽宁省"
-210904 county="太平区" prefecture="阜新市" province="辽宁省"
-210905 county="清河门区" prefecture="阜新市" province="辽宁省"
-210911 county="细河区" prefecture="阜新市" province="辽宁省"
-210921 county="阜新蒙古族自治县" prefecture="阜新市" province="辽宁省"
-210922 county="彰武县" prefecture="阜新市" province="辽宁省"
-211001 county="市辖区" prefecture="辽阳市" province="辽宁省"
-211002 county="白塔区" prefecture="辽阳市" province="辽宁省"
-211003 county="文圣区" prefecture="辽阳市" province="辽宁省"
-211004 county="宏伟区" prefecture="辽阳市" province="辽宁省"
-211005 county="弓长岭区" prefecture="辽阳市" province="辽宁省"
-211011 county="太子河区" prefecture="辽阳市" province="辽宁省"
-211021 county="辽阳县" prefecture="辽阳市" province="辽宁省"
-211081 county="灯塔市" prefecture="辽阳市" province="辽宁省"
-211101 county="市辖区" prefecture="盘锦市" province="辽宁省"
-211102 county="双台子区" prefecture="盘锦市" province="辽宁省"
-211103 county="兴隆台区" prefecture="盘锦市" province="辽宁省"
-211121 county="大洼县" prefecture="盘锦市" province="辽宁省"
-211122 county="盘山县" prefecture="盘锦市" province="辽宁省"
-211201 county="市辖区" prefecture="铁岭市" province="辽宁省"
-211202 county="银州区" prefecture="铁岭市" province="辽宁省"
-211204 county="清河区" prefecture="铁岭市" province="辽宁省"
-211221 county="铁岭县" prefecture="铁岭市" province="辽宁省"
-211223 county="西丰县" prefecture="铁岭市" province="辽宁省"
-211224 county="昌图县" prefecture="铁岭市" province="辽宁省"
-211281 county="调兵山市" prefecture="铁岭市" province="辽宁省"
-211282 county="开原市" prefecture="铁岭市" province="辽宁省"
-211301 county="市辖区" prefecture="朝阳市" province="辽宁省"
-211302 county="双塔区" prefecture="朝阳市" province="辽宁省"
-211303 county="龙城区" prefecture="朝阳市" province="辽宁省"
-211321 county="朝阳县" prefecture="朝阳市" province="辽宁省"
-211322 county="建平县" prefecture="朝阳市" province="辽宁省"
-211324 county="喀喇沁左翼蒙古族自治县" prefecture="朝阳市" province="辽宁省"
-211381 county="北票市" prefecture="朝阳市" province="辽宁省"
-211382 county="凌源市" prefecture="朝阳市" province="辽宁省"
-211401 county="市辖区" prefecture="葫芦岛市" province="辽宁省"
-211402 county="连山区" prefecture="葫芦岛市" province="辽宁省"
-211403 county="龙港区" prefecture="葫芦岛市" province="辽宁省"
-211404 county="南票区" prefecture="葫芦岛市" province="辽宁省"
-211421 county="绥中县" prefecture="葫芦岛市" province="辽宁省"
-211422 county="建昌县" prefecture="葫芦岛市" province="辽宁省"
-211481 county="兴城市" prefecture="葫芦岛市" province="辽宁省"
-220101 county="市辖区" prefecture="长春市" province="吉林省"
-220102 county="南关区" prefecture="长春市" province="吉林省"
-220103 county="宽城区" prefecture="长春市" province="吉林省"
-220104 county="朝阳区" prefecture="长春市" province="吉林省"
-220105 county="二道区" prefecture="长春市" province="吉林省"
-220106 county="绿园区" prefecture="长春市" province="吉林省"
-220112 county="双阳区" prefecture="长春市" province="吉林省"
-220113 county="九台区" prefecture="长春市" province="吉林省"
-220122 county="农安县" prefecture="长春市" province="吉林省"
-220181 county="九台市" prefecture="长春市" province="吉林省"
-220182 county="榆树市" prefecture="长春市" province="吉林省"
-220183 county="德惠市" prefecture="长春市" province="吉林省"
-220201 county="市辖区" prefecture="吉林市" province="吉林省"
-220202 county="昌邑区" prefecture="吉林市" province="吉林省"
-220203 county="龙潭区" prefecture="吉林市" province="吉林省"
-220204 county="船营区" prefecture="吉林市" province="吉林省"
-220211 county="丰满区" prefecture="吉林市" province="吉林省"
-220221 county="永吉县" prefecture="吉林市" province="吉林省"
-220281 county="蛟河市" prefecture="吉林市" province="吉林省"
-220282 county="桦甸市" prefecture="吉林市" province="吉林省"
-220283 county="舒兰市" prefecture="吉林市" province="吉林省"
-220284 county="磐石市" prefecture="吉林市" province="吉林省"
-220301 county="市辖区" prefecture="四平市" province="吉林省"
-220302 county="铁西区" prefecture="四平市" province="吉林省"
-220303 county="铁东区" prefecture="四平市" province="吉林省"
-220322 county="梨树县" prefecture="四平市" province="吉林省"
-220323 county="伊通满族自治县" prefecture="四平市" province="吉林省"
-220381 county="公主岭市" prefecture="四平市" province="吉林省"
-220382 county="双辽市" prefecture="四平市" province="吉林省"
-220401 county="市辖区" prefecture="辽源市" province="吉林省"
-220402 county="龙山区" prefecture="辽源市" province="吉林省"
-220403 county="西安区" prefecture="辽源市" province="吉林省"
-220421 county="东丰县" prefecture="辽源市" province="吉林省"
-220422 county="东辽县" prefecture="辽源市" province="吉林省"
-220501 county="市辖区" prefecture="通化市" province="吉林省"
-220502 county="东昌区" prefecture="通化市" province="吉林省"
-220503 county="二道江区" prefecture="通化市" province="吉林省"
-220521 county="通化县" prefecture="通化市" province="吉林省"
-220523 county="辉南县" prefecture="通化市" province="吉林省"
-220524 county="柳河县" prefecture="通化市" province="吉林省"
-220581 county="梅河口市" prefecture="通化市" province="吉林省"
-220582 county="集安市" prefecture="通化市" province="吉林省"
-220601 county="市辖区" prefecture="白山市" province="吉林省"
-220602 county="浑江区" prefecture="白山市" province="吉林省"
-220604 county="江源区" prefecture="白山市" province="吉林省"
-220605 county="江源区" prefecture="白山市" province="吉林省"
-220621 county="抚松县" prefecture="白山市" province="吉林省"
-220622 county="靖宇县" prefecture="白山市" province="吉林省"
-220623 county="长白朝鲜族自治县" prefecture="白山市" province="吉林省"
-220625 county="江源县" prefecture="白山市" province="吉林省"
-220681 county="临江市" prefecture="白山市" province="吉林省"
-220701 county="市辖区" prefecture="松原市" province="吉林省"
-220702 county="宁江区" prefecture="松原市" province="吉林省"
-220721 county="前郭尔罗斯蒙古族自治县" prefecture="松原市" province="吉林省"
-220722 county="长岭县" prefecture="松原市" province="吉林省"
-220723 county="乾安县" prefecture="松原市" province="吉林省"
-220724 county="扶余县" prefecture="松原市" province="吉林省"
-220781 county="扶余市" prefecture="松原市" province="吉林省"
-220801 county="市辖区" prefecture="白城市" province="吉林省"
-220802 county="洮北区" prefecture="白城市" province="吉林省"
-220821 county="镇赉县" prefecture="白城市" province="吉林省"
-220822 county="通榆县" prefecture="白城市" province="吉林省"
-220881 county="洮南市" prefecture="白城市" province="吉林省"
-220882 county="大安市" prefecture="白城市" province="吉林省"
-222401 county="延吉市" prefecture="延边朝鲜族自治州" province="吉林省"
-222402 county="图们市" prefecture="延边朝鲜族自治州" province="吉林省"
-222403 county="敦化市" prefecture="延边朝鲜族自治州" province="吉林省"
-222404 county="珲春市" prefecture="延边朝鲜族自治州" province="吉林省"
-222405 county="龙井市" prefecture="延边朝鲜族自治州" province="吉林省"
-222406 county="和龙市" prefecture="延边朝鲜族自治州" province="吉林省"
-222424 county="汪清县" prefecture="延边朝鲜族自治州" province="吉林省"
-222426 county="安图县" prefecture="延边朝鲜族自治州" province="吉林省"
-230101 county="市辖区" prefecture="哈尔滨市" province="黑龙江省"
-230102 county="道里区" prefecture="哈尔滨市" province="黑龙江省"
-230103 county="南岗区" prefecture="哈尔滨市" province="黑龙江省"
-230104 county="道外区" prefecture="哈尔滨市" province="黑龙江省"
-230105 county="太平区" prefecture="哈尔滨市" province="黑龙江省"
-230106 county="香坊区" prefecture="哈尔滨市" province="黑龙江省"
-230107 county="动力区" prefecture="哈尔滨市" province="黑龙江省"
-230108 county="平房区" prefecture="哈尔滨市" province="黑龙江省"
-230109 county="松北区" prefecture="哈尔滨市" province="黑龙江省"
-230110 county="香坊区" prefecture="哈尔滨市" province="黑龙江省"
-230111 county="呼兰区" prefecture="哈尔滨市" province="黑龙江省"
-230112 county="阿城区" prefecture="哈尔滨市" province="黑龙江省"
-230121 county="呼兰县" prefecture="哈尔滨市" province="黑龙江省"
-230123 county="依兰县" prefecture="哈尔滨市" province="黑龙江省"
-230124 county="方正县" prefecture="哈尔滨市" province="黑龙江省"
-230125 county="宾县" prefecture="哈尔滨市" province="黑龙江省"
-230126 county="巴彦县" prefecture="哈尔滨市" province="黑龙江省"
-230127 county="木兰县" prefecture="哈尔滨市" province="黑龙江省"
-230128 county="通河县" prefecture="哈尔滨市" province="黑龙江省"
-230129 county="延寿县" prefecture="哈尔滨市" province="黑龙江省"
-230181 county="阿城市" prefecture="哈尔滨市" province="黑龙江省"
-230182 county="双城市" prefecture="哈尔滨市" province="黑龙江省"
-230183 county="尚志市" prefecture="哈尔滨市" province="黑龙江省"
-230184 county="五常市" prefecture="哈尔滨市" province="黑龙江省"
-230201 county="市辖区" prefecture="齐齐哈尔市" province="黑龙江省"
-230202 county="龙沙区" prefecture="齐齐哈尔市" province="黑龙江省"
-230203 county="建华区" prefecture="齐齐哈尔市" province="黑龙江省"
-230204 county="铁锋区" prefecture="齐齐哈尔市" province="黑龙江省"
-230205 county="昂昂溪区" prefecture="齐齐哈尔市" province="黑龙江省"
-230206 county="富拉尔基区" prefecture="齐齐哈尔市" province="黑龙江省"
-230207 county="碾子山区" prefecture="齐齐哈尔市" province="黑龙江省"
-230208 county="梅里斯达斡尔族区" prefecture="齐齐哈尔市" province="黑龙江省"
-230221 county="龙江县" prefecture="齐齐哈尔市" province="黑龙江省"
-230223 county="依安县" prefecture="齐齐哈尔市" province="黑龙江省"
-230224 county="泰来县" prefecture="齐齐哈尔市" province="黑龙江省"
-230225 county="甘南县" prefecture="齐齐哈尔市" province="黑龙江省"
-230227 county="富裕县" prefecture="齐齐哈尔市" province="黑龙江省"
-230229 county="克山县" prefecture="齐齐哈尔市" province="黑龙江省"
-230230 county="克东县" prefecture="齐齐哈尔市" province="黑龙江省"
-230231 county="拜泉县" prefecture="齐齐哈尔市" province="黑龙江省"
-230281 county="讷河市" prefecture="齐齐哈尔市" province="黑龙江省"
-230301 county="市辖区" prefecture="鸡西市" province="黑龙江省"
-230302 county="鸡冠区" prefecture="鸡西市" province="黑龙江省"
-230303 county="恒山区" prefecture="鸡西市" province="黑龙江省"
-230304 county="滴道区" prefecture="鸡西市" province="黑龙江省"
-230305 county="梨树区" prefecture="鸡西市" province="黑龙江省"
-230306 county="城子河区" prefecture="鸡西市" province="黑龙江省"
-230307 county="麻山区" prefecture="鸡西市" province="黑龙江省"
-230321 county="鸡东县" prefecture="鸡西市" province="黑龙江省"
-230381 county="虎林市" prefecture="鸡西市" province="黑龙江省"
-230382 county="密山市" prefecture="鸡西市" province="黑龙江省"
-230401 county="市辖区" prefecture="鹤岗市" province="黑龙江省"
-230402 county="向阳区" prefecture="鹤岗市" province="黑龙江省"
-230403 county="工农区" prefecture="鹤岗市" province="黑龙江省"
-230404 county="南山区" prefecture="鹤岗市" province="黑龙江省"
-230405 county="兴安区" prefecture="鹤岗市" province="黑龙江省"
-230406 county="东山区" prefecture="鹤岗市" province="黑龙江省"
-230407 county="兴山区" prefecture="鹤岗市" province="黑龙江省"
-230421 county="萝北县" prefecture="鹤岗市" province="黑龙江省"
-230422 county="绥滨县" prefecture="鹤岗市" province="黑龙江省"
-230501 county="市辖区" prefecture="双鸭山市" province="黑龙江省"
-230502 county="尖山区" prefecture="双鸭山市" province="黑龙江省"
-230503 county="岭东区" prefecture="双鸭山市" province="黑龙江省"
-230505 county="四方台区" prefecture="双鸭山市" province="黑龙江省"
-230506 county="宝山区" prefecture="双鸭山市" province="黑龙江省"
-230521 county="集贤县" prefecture="双鸭山市" province="黑龙江省"
-230522 county="友谊县" prefecture="双鸭山市" province="黑龙江省"
-230523 county="宝清县" prefecture="双鸭山市" province="黑龙江省"
-230524 county="饶河县" prefecture="双鸭山市" province="黑龙江省"
-230601 county="市辖区" prefecture="大庆市" province="黑龙江省"
-230602 county="萨尔图区" prefecture="大庆市" province="黑龙江省"
-230603 county="龙凤区" prefecture="大庆市" province="黑龙江省"
-230604 county="让胡路区" prefecture="大庆市" province="黑龙江省"
-230605 county="红岗区" prefecture="大庆市" province="黑龙江省"
-230606 county="大同区" prefecture="大庆市" province="黑龙江省"
-230621 county="肇州县" prefecture="大庆市" province="黑龙江省"
-230622 county="肇源县" prefecture="大庆市" province="黑龙江省"
-230623 county="林甸县" prefecture="大庆市" province="黑龙江省"
-230624 county="杜尔伯特蒙古族自治县" prefecture="大庆市" province="黑龙江省"
-230701 county="市辖区" prefecture="伊春市" province="黑龙江省"
-230702 county="伊春区" prefecture="伊春市" province="黑龙江省"
-230703 county="南岔区" prefecture="伊春市" province="黑龙江省"
-230704 county="友好区" prefecture="伊春市" province="黑龙江省"
-230705 county="西林区" prefecture="伊春市" province="黑龙江省"
-230706 county="翠峦区" prefecture="伊春市" province="黑龙江省"
-230707 county="新青区" prefecture="伊春市" province="黑龙江省"
-230708 county="美溪区" prefecture="伊春市" province="黑龙江省"
-230709 county="金山屯区" prefecture="伊春市" province="黑龙江省"
-230710 county="五营区" prefecture="伊春市" province="黑龙江省"
-230711 county="乌马河区" prefecture="伊春市" province="黑龙江省"
-230712 county="汤旺河区" prefecture="伊春市" province="黑龙江省"
-230713 county="带岭区" prefecture="伊春市" province="黑龙江省"
-230714 county="乌伊岭区" prefecture="伊春市" province="黑龙江省"
-230715 county="红星区" prefecture="伊春市" province="黑龙江省"
-230716 county="上甘岭区" prefecture="伊春市" province="黑龙江省"
-230722 county="嘉荫县" prefecture="伊春市" province="黑龙江省"
-230781 county="铁力市" prefecture="伊春市" province="黑龙江省"
-230801 county="市辖区" prefecture="佳木斯市" province="黑龙江省"
-230802 county="永红区" prefecture="佳木斯市" province="黑龙江省"
-230803 county="向阳区" prefecture="佳木斯市" province="黑龙江省"
-230804 county="前进区" prefecture="佳木斯市" province="黑龙江省"
-230805 county="东风区" prefecture="佳木斯市" province="黑龙江省"
-230811 county="郊区" prefecture="佳木斯市" province="黑龙江省"
-230822 county="桦南县" prefecture="佳木斯市" province="黑龙江省"
-230826 county="桦川县" prefecture="佳木斯市" province="黑龙江省"
-230828 county="汤原县" prefecture="佳木斯市" province="黑龙江省"
-230833 county="抚远县" prefecture="佳木斯市" province="黑龙江省"
-230881 county="同江市" prefecture="佳木斯市" province="黑龙江省"
-230882 county="富锦市" prefecture="佳木斯市" province="黑龙江省"
-230901 county="市辖区" prefecture="七台河市" province="黑龙江省"
-230902 county="新兴区" prefecture="七台河市" province="黑龙江省"
-230903 county="桃山区" prefecture="七台河市" province="黑龙江省"
-230904 county="茄子河区" prefecture="七台河市" province="黑龙江省"
-230921 county="勃利县" prefecture="七台河市" province="黑龙江省"
-231001 county="市辖区" prefecture="牡丹江市" province="黑龙江省"
-231002 county="东安区" prefecture="牡丹江市" province="黑龙江省"
-231003 county="阳明区" prefecture="牡丹江市" province="黑龙江省"
-231004 county="爱民区" prefecture="牡丹江市" province="黑龙江省"
-231005 county="西安区" prefecture="牡丹江市" province="黑龙江省"
-231024 county="东宁县" prefecture="牡丹江市" province="黑龙江省"
-231025 county="林口县" prefecture="牡丹江市" province="黑龙江省"
-231081 county="绥芬河市" prefecture="牡丹江市" province="黑龙江省"
-231083 county="海林市" prefecture="牡丹江市" province="黑龙江省"
-231084 county="宁安市" prefecture="牡丹江市" province="黑龙江省"
-231085 county="穆棱市" prefecture="牡丹江市" province="黑龙江省"
-231101 county="市辖区" prefecture="黑河市" province="黑龙江省"
-231102 county="爱辉区" prefecture="黑河市" province="黑龙江省"
-231121 county="嫩江县" prefecture="黑河市" province="黑龙江省"
-231123 county="逊克县" prefecture="黑河市" province="黑龙江省"
-231124 county="孙吴县" prefecture="黑河市" province="黑龙江省"
-231181 county="北安市" prefecture="黑河市" province="黑龙江省"
-231182 county="五大连池市" prefecture="黑河市" province="黑龙江省"
-231201 county="市辖区" prefecture="绥化市" province="黑龙江省"
-231202 county="北林区" prefecture="绥化市" province="黑龙江省"
-231221 county="望奎县" prefecture="绥化市" province="黑龙江省"
-231222 county="兰西县" prefecture="绥化市" province="黑龙江省"
-231223 county="青冈县" prefecture="绥化市" province="黑龙江省"
-231224 county="庆安县" prefecture="绥化市" province="黑龙江省"
-231225 county="明水县" prefecture="绥化市" province="黑龙江省"
-231226 county="绥棱县" prefecture="绥化市" province="黑龙江省"
-231281 county="安达市" prefecture="绥化市" province="黑龙江省"
-231282 county="肇东市" prefecture="绥化市" province="黑龙江省"
-231283 county="海伦市" prefecture="绥化市" province="黑龙江省"
-232701 county="加格达奇区" prefecture="大兴安岭地区" province="黑龙江省"
-232702 county="松岭区" prefecture="大兴安岭地区" province="黑龙江省"
-232703 county="新林区" prefecture="大兴安岭地区" province="黑龙江省"
-232704 county="呼中区" prefecture="大兴安岭地区" province="黑龙江省"
-232721 county="呼玛县" prefecture="大兴安岭地区" province="黑龙江省"
-232722 county="塔河县" prefecture="大兴安岭地区" province="黑龙江省"
-232723 county="漠河县" prefecture="大兴安岭地区" province="黑龙江省"
-310101 county="黄浦区" prefecture="市辖区" province="上海市"
-310103 county="卢湾区" prefecture="市辖区" province="上海市"
-310104 county="徐汇区" prefecture="市辖区" province="上海市"
-310105 county="长宁区" prefecture="市辖区" province="上海市"
-310106 county="静安区" prefecture="市辖区" province="上海市"
-310107 county="普陀区" prefecture="市辖区" province="上海市"
-310108 county="闸北区" prefecture="市辖区" province="上海市"
-310109 county="虹口区" prefecture="市辖区" province="上海市"
-310110 county="杨浦区" prefecture="市辖区" province="上海市"
-310112 county="闵行区" prefecture="市辖区" province="上海市"
-310113 county="宝山区" prefecture="市辖区" province="上海市"
-310114 county="嘉定区" prefecture="市辖区" province="上海市"
-310115 county="浦东新区" prefecture="市辖区" province="上海市"
-310116 county="金山区" prefecture="市辖区" province="上海市"
-310117 county="松江区" prefecture="市辖区" province="上海市"
-310118 county="青浦区" prefecture="市辖区" province="上海市"
-310119 county="南汇区" prefecture="市辖区" province="上海市"
-310120 county="奉贤区" prefecture="市辖区" province="上海市"
-310230 county="崇明县" prefecture="县" province="上海市"
-320101 county="市辖区" prefecture="南京市" province="江苏省"
-320102 county="玄武区" prefecture="南京市" province="江苏省"
-320103 county="白下区" prefecture="南京市" province="江苏省"
-320104 county="秦淮区" prefecture="南京市" province="江苏省"
-320105 county="建邺区" prefecture="南京市" province="江苏省"
-320106 county="鼓楼区" prefecture="南京市" province="江苏省"
-320107 county="下关区" prefecture="南京市" province="江苏省"
-320111 county="浦口区" prefecture="南京市" province="江苏省"
-320113 county="栖霞区" prefecture="南京市" province="江苏省"
-320114 county="雨花台区" prefecture="南京市" province="江苏省"
-320115 county="江宁区" prefecture="南京市" province="江苏省"
-320116 county="六合区" prefecture="南京市" province="江苏省"
-320117 county="溧水区" prefecture="南京市" province="江苏省"
-320118 county="高淳区" prefecture="南京市" province="江苏省"
-320124 county="溧水县" prefecture="南京市" province="江苏省"
-320125 county="高淳县" prefecture="南京市" province="江苏省"
-320201 county="市辖区" prefecture="无锡市" province="江苏省"
-320202 county="崇安区" prefecture="无锡市" province="江苏省"
-320203 county="南长区" prefecture="无锡市" province="江苏省"
-320204 county="北塘区" prefecture="无锡市" province="江苏省"
-320205 county="锡山区" prefecture="无锡市" province="江苏省"
-320206 county="惠山区" prefecture="无锡市" province="江苏省"
-320211 county="滨湖区" prefecture="无锡市" province="江苏省"
-320281 county="江阴市" prefecture="无锡市" province="江苏省"
-320282 county="宜兴市" prefecture="无锡市" province="江苏省"
-320301 county="市辖区" prefecture="徐州市" province="江苏省"
-320302 county="鼓楼区" prefecture="徐州市" province="江苏省"
-320303 county="云龙区" prefecture="徐州市" province="江苏省"
-320304 county="九里区" prefecture="徐州市" province="江苏省"
-320305 county="贾汪区" prefecture="徐州市" province="江苏省"
-320311 county="泉山区" prefecture="徐州市" province="江苏省"
-320312 county="铜山区" prefecture="徐州市" province="江苏省"
-320321 county="丰县" prefecture="徐州市" province="江苏省"
-320322 county="沛县" prefecture="徐州市" province="江苏省"
-320323 county="铜山县" prefecture="徐州市" province="江苏省"
-320324 county="睢宁县" prefecture="徐州市" province="江苏省"
-320381 county="新沂市" prefecture="徐州市" province="江苏省"
-320382 county="邳州市" prefecture="徐州市" province="江苏省"
-320401 county="市辖区" prefecture="常州市" province="江苏省"
-320402 county="天宁区" prefecture="常州市" province="江苏省"
-320404 county="钟楼区" prefecture="常州市" province="江苏省"
-320405 county="戚墅堰区" prefecture="常州市" province="江苏省"
-320411 county="新北区" prefecture="常州市" province="江苏省"
-320412 county="武进区" prefecture="常州市" province="江苏省"
-320481 county="溧阳市" prefecture="常州市" province="江苏省"
-320482 county="金坛市" prefecture="常州市" province="江苏省"
-320501 county="市辖区" prefecture="苏州市" province="江苏省"
-320502 county="沧浪区" prefecture="苏州市" province="江苏省"
-320503 county="平江区" prefecture="苏州市" province="江苏省"
-320504 county="金阊区" prefecture="苏州市" province="江苏省"
-320505 county="虎丘区" prefecture="苏州市" province="江苏省"
-320506 county="吴中区" prefecture="苏州市" province="江苏省"
-320507 county="相城区" prefecture="苏州市" province="江苏省"
-320508 county="姑苏区" prefecture="苏州市" province="江苏省"
-320509 county="吴江区" prefecture="苏州市" province="江苏省"
-320581 county="常熟市" prefecture="苏州市" province="江苏省"
-320582 county="张家港市" prefecture="苏州市" province="江苏省"
-320583 county="昆山市" prefecture="苏州市" province="江苏省"
-320584 county="吴江市" prefecture="苏州市" province="江苏省"
-320585 county="太仓市" prefecture="苏州市" province="江苏省"
-320601 county="市辖区" prefecture="南通市" province="江苏省"
-320602 county="崇川区" prefecture="南通市" province="江苏省"
-320611 county="港闸区" prefecture="南通市" province="江苏省"
-320612 county="通州区" prefecture="南通市" province="江苏省"
-320621 county="海安县" prefecture="南通市" province="江苏省"
-320623 county="如东县" prefecture="南通市" province="江苏省"
-320681 county="启东市" prefecture="南通市" province="江苏省"
-320682 county="如皋市" prefecture="南通市" province="江苏省"
-320683 county="通州市" prefecture="南通市" province="江苏省"
-320684 county="海门市" prefecture="南通市" province="江苏省"
-320701 county="市辖区" prefecture="连云港市" province="江苏省"
-320703 county="连云区" prefecture="连云港市" province="江苏省"
-320705 county="新浦区" prefecture="连云港市" province="江苏省"
-320706 county="海州区" prefecture="连云港市" province="江苏省"
-320707 county="赣榆区" prefecture="连云港市" province="江苏省"
-320721 county="赣榆县" prefecture="连云港市" province="江苏省"
-320722 county="东海县" prefecture="连云港市" province="江苏省"
-320723 county="灌云县" prefecture="连云港市" province="江苏省"
-320724 county="灌南县" prefecture="连云港市" province="江苏省"
-320801 county="市辖区" prefecture="淮安市" province="江苏省"
-320802 county="清河区" prefecture="淮安市" province="江苏省"
-320803 county="淮安区" prefecture="淮安市" province="江苏省"
-320804 county="淮阴区" prefecture="淮安市" province="江苏省"
-320811 county="清浦区" prefecture="淮安市" province="江苏省"
-320826 county="涟水县" prefecture="淮安市" province="江苏省"
-320829 county="洪泽县" prefecture="淮安市" province="江苏省"
-320830 county="盱眙县" prefecture="淮安市" province="江苏省"
-320831 county="金湖县" prefecture="淮安市" province="江苏省"
-320901 county="市辖区" prefecture="盐城市" province="江苏省"
-320902 county="亭湖区" prefecture="盐城市" province="江苏省"
-320903 county="盐都区" prefecture="盐城市" province="江苏省"
-320921 county="响水县" prefecture="盐城市" province="江苏省"
-320922 county="滨海县" prefecture="盐城市" province="江苏省"
-320923 county="阜宁县" prefecture="盐城市" province="江苏省"
-320924 county="射阳县" prefecture="盐城市" province="江苏省"
-320925 county="建湖县" prefecture="盐城市" province="江苏省"
-320928 county="盐都县" prefecture="盐城市" province="江苏省"
-320981 county="东台市" prefecture="盐城市" province="江苏省"
-320982 county="大丰市" prefecture="盐城市" province="江苏省"
-321001 county="市辖区" prefecture="扬州市" province="江苏省"
-321002 county="广陵区" prefecture="扬州市" province="江苏省"
-321003 county="邗江区" prefecture="扬州市" province="江苏省"
-321011 county="维扬区" prefecture="扬州市" province="江苏省"
-321012 county="江都区" prefecture="扬州市" province="江苏省"
-321023 county="宝应县" prefecture="扬州市" province="江苏省"
-321081 county="仪征市" prefecture="扬州市" province="江苏省"
-321084 county="高邮市" prefecture="扬州市" province="江苏省"
-321088 county="江都市" prefecture="扬州市" province="江苏省"
-321101 county="市辖区" prefecture="镇江市" province="江苏省"
-321102 county="京口区" prefecture="镇江市" province="江苏省"
-321111 county="润州区" prefecture="镇江市" province="江苏省"
-321112 county="丹徒区" prefecture="镇江市" province="江苏省"
-321181 county="丹阳市" prefecture="镇江市" province="江苏省"
-321182 county="扬中市" prefecture="镇江市" province="江苏省"
-321183 county="句容市" prefecture="镇江市" province="江苏省"
-321201 county="市辖区" prefecture="泰州市" province="江苏省"
-321202 county="海陵区" prefecture="泰州市" province="江苏省"
-321203 county="高港区" prefecture="泰州市" province="江苏省"
-321204 county="姜堰区" prefecture="泰州市" province="江苏省"
-321281 county="兴化市" prefecture="泰州市" province="江苏省"
-321282 county="靖江市" prefecture="泰州市" province="江苏省"
-321283 county="泰兴市" prefecture="泰州市" province="江苏省"
-321284 county="姜堰市" prefecture="泰州市" province="江苏省"
-321301 county="市辖区" prefecture="宿迁市" province="江苏省"
-321302 county="宿城区" prefecture="宿迁市" province="江苏省"
-321311 county="宿豫区" prefecture="宿迁市" province="江苏省"
-321321 county="宿豫县" prefecture="宿迁市" province="江苏省"
-321322 county="沭阳县" prefecture="宿迁市" province="江苏省"
-321323 county="泗阳县" prefecture="宿迁市" province="江苏省"
-321324 county="泗洪县" prefecture="宿迁市" province="江苏省"
-330101 county="市辖区" prefecture="杭州市" province="浙江省"
-330102 county="上城区" prefecture="杭州市" province="浙江省"
-330103 county="下城区" prefecture="杭州市" province="浙江省"
-330104 county="江干区" prefecture="杭州市" province="浙江省"
-330105 county="拱墅区" prefecture="杭州市" province="浙江省"
-330106 county="西湖区" prefecture="杭州市" province="浙江省"
-330108 county="滨江区" prefecture="杭州市" province="浙江省"
-330109 county="萧山区" prefecture="杭州市" province="浙江省"
-330110 county="余杭区" prefecture="杭州市" province="浙江省"
-330122 county="桐庐县" prefecture="杭州市" province="浙江省"
-330127 county="淳安县" prefecture="杭州市" province="浙江省"
-330182 county="建德市" prefecture="杭州市" province="浙江省"
-330183 county="富阳市" prefecture="杭州市" province="浙江省"
-330185 county="临安市" prefecture="杭州市" province="浙江省"
-330201 county="市辖区" prefecture="宁波市" province="浙江省"
-330203 county="海曙区" prefecture="宁波市" province="浙江省"
-330204 county="江东区" prefecture="宁波市" province="浙江省"
-330205 county="江北区" prefecture="宁波市" province="浙江省"
-330206 county="北仑区" prefecture="宁波市" province="浙江省"
-330211 county="镇海区" prefecture="宁波市" province="浙江省"
-330212 county="鄞州区" prefecture="宁波市" province="浙江省"
-330225 county="象山县" prefecture="宁波市" province="浙江省"
-330226 county="宁海县" prefecture="宁波市" province="浙江省"
-330281 county="余姚市" prefecture="宁波市" province="浙江省"
-330282 county="慈溪市" prefecture="宁波市" province="浙江省"
-330283 county="奉化市" prefecture="宁波市" province="浙江省"
-330301 county="市辖区" prefecture="温州市" province="浙江省"
-330302 county="鹿城区" prefecture="温州市" province="浙江省"
-330303 county="龙湾区" prefecture="温州市" province="浙江省"
-330304 county="瓯海区" prefecture="温州市" province="浙江省"
-330322 county="洞头县" prefecture="温州市" province="浙江省"
-330324 county="永嘉县" prefecture="温州市" province="浙江省"
-330326 county="平阳县" prefecture="温州市" province="浙江省"
-330327 county="苍南县" prefecture="温州市" province="浙江省"
-330328 county="文成县" prefecture="温州市" province="浙江省"
-330329 county="泰顺县" prefecture="温州市" province="浙江省"
-330381 county="瑞安市" prefecture="温州市" province="浙江省"
-330382 county="乐清市" prefecture="温州市" province="浙江省"
-330401 county="市辖区" prefecture="嘉兴市" province="浙江省"
-330402 county="南湖区" prefecture="嘉兴市" province="浙江省"
-330411 county="秀洲区" prefecture="嘉兴市" province="浙江省"
-330421 county="嘉善县" prefecture="嘉兴市" province="浙江省"
-330424 county="海盐县" prefecture="嘉兴市" province="浙江省"
-330481 county="海宁市" prefecture="嘉兴市" province="浙江省"
-330482 county="平湖市" prefecture="嘉兴市" province="浙江省"
-330483 county="桐乡市" prefecture="嘉兴市" province="浙江省"
-330501 county="市辖区" prefecture="湖州市" province="浙江省"
-330502 county="吴兴区" prefecture="湖州市" province="浙江省"
-330503 county="南浔区" prefecture="湖州市" province="浙江省"
-330521 county="德清县" prefecture="湖州市" province="浙江省"
-330522 county="长兴县" prefecture="湖州市" province="浙江省"
-330523 county="安吉县" prefecture="湖州市" province="浙江省"
-330601 county="市辖区" prefecture="绍兴市" province="浙江省"
-330602 county="越城区" prefecture="绍兴市" province="浙江省"
-330603 county="柯桥区" prefecture="绍兴市" province="浙江省"
-330604 county="上虞区" prefecture="绍兴市" province="浙江省"
-330621 county="绍兴县" prefecture="绍兴市" province="浙江省"
-330624 county="新昌县" prefecture="绍兴市" province="浙江省"
-330681 county="诸暨市" prefecture="绍兴市" province="浙江省"
-330682 county="上虞市" prefecture="绍兴市" province="浙江省"
-330683 county="嵊州市" prefecture="绍兴市" province="浙江省"
-330701 county="市辖区" prefecture="金华市" province="浙江省"
-330702 county="婺城区" prefecture="金华市" province="浙江省"
-330703 county="金东区" prefecture="金华市" province="浙江省"
-330723 county="武义县" prefecture="金华市" province="浙江省"
-330726 county="浦江县" prefecture="金华市" province="浙江省"
-330727 county="磐安县" prefecture="金华市" province="浙江省"
-330781 county="兰溪市" prefecture="金华市" province="浙江省"
-330782 county="义乌市" prefecture="金华市" province="浙江省"
-330783 county="东阳市" prefecture="金华市" province="浙江省"
-330784 county="永康市" prefecture="金华市" province="浙江省"
-330801 county="市辖区" prefecture="衢州市" province="浙江省"
-330802 county="柯城区" prefecture="衢州市" province="浙江省"
-330803 county="衢江区" prefecture="衢州市" province="浙江省"
-330822 county="常山县" prefecture="衢州市" province="浙江省"
-330824 county="开化县" prefecture="衢州市" province="浙江省"
-330825 county="龙游县" prefecture="衢州市" province="浙江省"
-330881 county="江山市" prefecture="衢州市" province="浙江省"
-330901 county="市辖区" prefecture="舟山市" province="浙江省"
-330902 county="定海区" prefecture="舟山市" province="浙江省"
-330903 county="普陀区" prefecture="舟山市" province="浙江省"
-330921 county="岱山县" prefecture="舟山市" province="浙江省"
-330922 county="嵊泗县" prefecture="舟山市" province="浙江省"
-331001 county="市辖区" prefecture="台州市" province="浙江省"
-331002 county="椒江区" prefecture="台州市" province="浙江省"
-331003 county="黄岩区" prefecture="台州市" province="浙江省"
-331004 county="路桥区" prefecture="台州市" province="浙江省"
-331021 county="玉环县" prefecture="台州市" province="浙江省"
-331022 county="三门县" prefecture="台州市" province="浙江省"
-331023 county="天台县" prefecture="台州市" province="浙江省"
-331024 county="仙居县" prefecture="台州市" province="浙江省"
-331081 county="温岭市" prefecture="台州市" province="浙江省"
-331082 county="临海市" prefecture="台州市" province="浙江省"
-331101 county="市辖区" prefecture="丽水市" province="浙江省"
-331102 county="莲都区" prefecture="丽水市" province="浙江省"
-331121 county="青田县" prefecture="丽水市" province="浙江省"
-331122 county="缙云县" prefecture="丽水市" province="浙江省"
-331123 county="遂昌县" prefecture="丽水市" province="浙江省"
-331124 county="松阳县" prefecture="丽水市" province="浙江省"
-331125 county="云和县" prefecture="丽水市" province="浙江省"
-331126 county="庆元县" prefecture="丽水市" province="浙江省"
-331127 county="景宁畲族自治县" prefecture="丽水市" province="浙江省"
-331181 county="龙泉市" prefecture="丽水市" province="浙江省"
-340101 county="市辖区" prefecture="合肥市" province="安徽省"
-340102 county="瑶海区" prefecture="合肥市" province="安徽省"
-340103 county="庐阳区" prefecture="合肥市" province="安徽省"
-340104 county="蜀山区" prefecture="合肥市" province="安徽省"
-340111 county="包河区" prefecture="合肥市" province="安徽省"
-340121 county="长丰县" prefecture="合肥市" province="安徽省"
-340122 county="肥东县" prefecture="合肥市" province="安徽省"
-340123 county="肥西县" prefecture="合肥市" province="安徽省"
-340124 county="庐江县" prefecture="合肥市" province="安徽省"
-340181 county="巢湖市" prefecture="合肥市" province="安徽省"
-340201 county="市辖区" prefecture="芜湖市" province="安徽省"
-340202 county="镜湖区" prefecture="芜湖市" province="安徽省"
-340203 county="弋江区" prefecture="芜湖市" province="安徽省"
-340204 county="新芜区" prefecture="芜湖市" province="安徽省"
-340207 county="鸠江区" prefecture="芜湖市" province="安徽省"
-340208 county="三山区" prefecture="芜湖市" province="安徽省"
-340221 county="芜湖县" prefecture="芜湖市" province="安徽省"
-340222 county="繁昌县" prefecture="芜湖市" province="安徽省"
-340223 county="南陵县" prefecture="芜湖市" province="安徽省"
-340225 county="无为县" prefecture="芜湖市" province="安徽省"
-340301 county="市辖区" prefecture="蚌埠市" province="安徽省"
-340302 county="龙子湖区" prefecture="蚌埠市" province="安徽省"
-340303 county="蚌山区" prefecture="蚌埠市" province="安徽省"
-340304 county="禹会区" prefecture="蚌埠市" province="安徽省"
-340311 county="淮上区" prefecture="蚌埠市" province="安徽省"
-340321 county="怀远县" prefecture="蚌埠市" province="安徽省"
-340322 county="五河县" prefecture="蚌埠市" province="安徽省"
-340323 county="固镇县" prefecture="蚌埠市" province="安徽省"
-340401 county="市辖区" prefecture="淮南市" province="安徽省"
-340402 county="大通区" prefecture="淮南市" province="安徽省"
-340403 county="田家庵区" prefecture="淮南市" province="安徽省"
-340404 county="谢家集区" prefecture="淮南市" province="安徽省"
-340405 county="八公山区" prefecture="淮南市" province="安徽省"
-340406 county="潘集区" prefecture="淮南市" province="安徽省"
-340421 county="凤台县" prefecture="淮南市" province="安徽省"
-340501 county="市辖区" prefecture="马鞍山市" province="安徽省"
-340502 county="金家庄区" prefecture="马鞍山市" province="安徽省"
-340503 county="花山区" prefecture="马鞍山市" province="安徽省"
-340504 county="雨山区" prefecture="马鞍山市" province="安徽省"
-340506 county="博望区" prefecture="马鞍山市" province="安徽省"
-340521 county="当涂县" prefecture="马鞍山市" province="安徽省"
-340522 county="含山县" prefecture="马鞍山市" province="安徽省"
-340523 county="和县" prefecture="马鞍山市" province="安徽省"
-340601 county="市辖区" prefecture="淮北市" province="安徽省"
-340602 county="杜集区" prefecture="淮北市" province="安徽省"
-340603 county="相山区" prefecture="淮北市" province="安徽省"
-340604 county="烈山区" prefecture="淮北市" province="安徽省"
-340621 county="濉溪县" prefecture="淮北市" province="安徽省"
-340701 county="市辖区" prefecture="铜陵市" province="安徽省"
-340702 county="铜官山区" prefecture="铜陵市" province="安徽省"
-340703 county="狮子山区" prefecture="铜陵市" province="安徽省"
-340711 county="郊区" prefecture="铜陵市" province="安徽省"
-340721 county="铜陵县" prefecture="铜陵市" province="安徽省"
-340801 county="市辖区" prefecture="安庆市" province="安徽省"
-340802 county="迎江区" prefecture="安庆市" province="安徽省"
-340803 county="大观区" prefecture="安庆市" province="安徽省"
-340811 county="宜秀区" prefecture="安庆市" province="安徽省"
-340822 county="怀宁县" prefecture="安庆市" province="安徽省"
-340823 county="枞阳县" prefecture="安庆市" province="安徽省"
-340824 county="潜山县" prefecture="安庆市" province="安徽省"
-340825 county="太湖县" prefecture="安庆市" province="安徽省"
-340826 county="宿松县" prefecture="安庆市" province="安徽省"
-340827 county="望江县" prefecture="安庆市" province="安徽省"
-340828 county="岳西县" prefecture="安庆市" province="安徽省"
-340881 county="桐城市" prefecture="安庆市" province="安徽省"
-341001 county="市辖区" prefecture="黄山市" province="安徽省"
-341002 county="屯溪区" prefecture="黄山市" province="安徽省"
-341003 county="黄山区" prefecture="黄山市" province="安徽省"
-341004 county="徽州区" prefecture="黄山市" province="安徽省"
-341021 county="歙县" prefecture="黄山市" province="安徽省"
-341022 county="休宁县" prefecture="黄山市" province="安徽省"
-341023 county="黟县" prefecture="黄山市" province="安徽省"
-341024 county="祁门县" prefecture="黄山市" province="安徽省"
-341101 county="市辖区" prefecture="滁州市" province="安徽省"
-341102 county="琅琊区" prefecture="滁州市" province="安徽省"
-341103 county="南谯区" prefecture="滁州市" province="安徽省"
-341122 county="来安县" prefecture="滁州市" province="安徽省"
-341124 county="全椒县" prefecture="滁州市" province="安徽省"
-341125 county="定远县" prefecture="滁州市" province="安徽省"
-341126 county="凤阳县" prefecture="滁州市" province="安徽省"
-341181 county="天长市" prefecture="滁州市" province="安徽省"
-341182 county="明光市" prefecture="滁州市" province="安徽省"
-341201 county="市辖区" prefecture="阜阳市" province="安徽省"
-341202 county="颍州区" prefecture="阜阳市" province="安徽省"
-341203 county="颍东区" prefecture="阜阳市" province="安徽省"
-341204 county="颍泉区" prefecture="阜阳市" province="安徽省"
-341221 county="临泉县" prefecture="阜阳市" province="安徽省"
-341222 county="太和县" prefecture="阜阳市" province="安徽省"
-341225 county="阜南县" prefecture="阜阳市" province="安徽省"
-341226 county="颍上县" prefecture="阜阳市" province="安徽省"
-341282 county="界首市" prefecture="阜阳市" province="安徽省"
-341301 county="市辖区" prefecture="宿州市" province="安徽省"
-341302 county="埇桥区" prefecture="宿州市" province="安徽省"
-341321 county="砀山县" prefecture="宿州市" province="安徽省"
-341322 county="萧县" prefecture="宿州市" province="安徽省"
-341323 county="灵璧县" prefecture="宿州市" province="安徽省"
-341324 county="泗县" prefecture="宿州市" province="安徽省"
-341401 county="市辖区" prefecture="巢湖市" province="安徽省"
-341402 county="居巢区" prefecture="巢湖市" province="安徽省"
-341421 county="庐江县" prefecture="巢湖市" province="安徽省"
-341422 county="无为县" prefecture="巢湖市" province="安徽省"
-341423 county="含山县" prefecture="巢湖市" province="安徽省"
-341424 county="和县" prefecture="巢湖市" province="安徽省"
-341501 county="市辖区" prefecture="六安市" province="安徽省"
-341502 county="金安区" prefecture="六安市" province="安徽省"
-341503 county="裕安区" prefecture="六安市" province="安徽省"
-341521 county="寿县" prefecture="六安市" province="安徽省"
-341522 county="霍邱县" prefecture="六安市" province="安徽省"
-341523 county="舒城县" prefecture="六安市" province="安徽省"
-341524 county="金寨县" prefecture="六安市" province="安徽省"
-341525 county="霍山县" prefecture="六安市" province="安徽省"
-341601 county="市辖区" prefecture="亳州市" province="安徽省"
-341602 county="谯城区" prefecture="亳州市" province="安徽省"
-341621 county="涡阳县" prefecture="亳州市" province="安徽省"
-341622 county="蒙城县" prefecture="亳州市" province="安徽省"
-341623 county="利辛县" prefecture="亳州市" province="安徽省"
-341701 county="市辖区" prefecture="池州市" province="安徽省"
-341702 county="贵池区" prefecture="池州市" province="安徽省"
-341721 county="东至县" prefecture="池州市" province="安徽省"
-341722 county="石台县" prefecture="池州市" province="安徽省"
-341723 county="青阳县" prefecture="池州市" province="安徽省"
-341801 county="市辖区" prefecture="宣城市" province="安徽省"
-341802 county="宣州区" prefecture="宣城市" province="安徽省"
-341821 county="郎溪县" prefecture="宣城市" province="安徽省"
-341822 county="广德县" prefecture="宣城市" province="安徽省"
-341823 county="泾县" prefecture="宣城市" province="安徽省"
-341824 county="绩溪县" prefecture="宣城市" province="安徽省"
-341825 county="旌德县" prefecture="宣城市" province="安徽省"
-341881 county="宁国市" prefecture="宣城市" province="安徽省"
-350101 county="市辖区" prefecture="福州市" province="福建省"
-350102 county="鼓楼区" prefecture="福州市" province="福建省"
-350103 county="台江区" prefecture="福州市" province="福建省"
-350104 county="仓山区" prefecture="福州市" province="福建省"
-350105 county="马尾区" prefecture="福州市" province="福建省"
-350111 county="晋安区" prefecture="福州市" province="福建省"
-350121 county="闽侯县" prefecture="福州市" province="福建省"
-350122 county="连江县" prefecture="福州市" province="福建省"
-350123 county="罗源县" prefecture="福州市" province="福建省"
-350124 county="闽清县" prefecture="福州市" province="福建省"
-350125 county="永泰县" prefecture="福州市" province="福建省"
-350128 county="平潭县" prefecture="福州市" province="福建省"
-350181 county="福清市" prefecture="福州市" province="福建省"
-350182 county="长乐市" prefecture="福州市" province="福建省"
-350201 county="市辖区" prefecture="厦门市" province="福建省"
-350202 county="鼓浪屿区" prefecture="厦门市" province="福建省"
-350203 county="思明区" prefecture="厦门市" province="福建省"
-350204 county="开元区" prefecture="厦门市" province="福建省"
-350205 county="海沧区" prefecture="厦门市" province="福建省"
-350206 county="湖里区" prefecture="厦门市" province="福建省"
-350211 county="集美区" prefecture="厦门市" province="福建省"
-350212 county="同安区" prefecture="厦门市" province="福建省"
-350213 county="翔安区" prefecture="厦门市" province="福建省"
-350301 county="市辖区" prefecture="莆田市" province="福建省"
-350302 county="城厢区" prefecture="莆田市" province="福建省"
-350303 county="涵江区" prefecture="莆田市" province="福建省"
-350304 county="荔城区" prefecture="莆田市" province="福建省"
-350305 county="秀屿区" prefecture="莆田市" province="福建省"
-350322 county="仙游县" prefecture="莆田市" province="福建省"
-350401 county="市辖区" prefecture="三明市" province="福建省"
-350402 county="梅列区" prefecture="三明市" province="福建省"
-350403 county="三元区" prefecture="三明市" province="福建省"
-350421 county="明溪县" prefecture="三明市" province="福建省"
-350423 county="清流县" prefecture="三明市" province="福建省"
-350424 county="宁化县" prefecture="三明市" province="福建省"
-350425 county="大田县" prefecture="三明市" province="福建省"
-350426 county="尤溪县" prefecture="三明市" province="福建省"
-350427 county="沙县" prefecture="三明市" province="福建省"
-350428 county="将乐县" prefecture="三明市" province="福建省"
-350429 county="泰宁县" prefecture="三明市" province="福建省"
-350430 county="建宁县" prefecture="三明市" province="福建省"
-350481 county="永安市" prefecture="三明市" province="福建省"
-350501 county="市辖区" prefecture="泉州市" province="福建省"
-350502 county="鲤城区" prefecture="泉州市" province="福建省"
-350503 county="丰泽区" prefecture="泉州市" province="福建省"
-350504 county="洛江区" prefecture="泉州市" province="福建省"
-350505 county="泉港区" prefecture="泉州市" province="福建省"
-350521 county="惠安县" prefecture="泉州市" province="福建省"
-350524 county="安溪县" prefecture="泉州市" province="福建省"
-350525 county="永春县" prefecture="泉州市" province="福建省"
-350526 county="德化县" prefecture="泉州市" province="福建省"
-350527 county="金门县" prefecture="泉州市" province="福建省"
-350581 county="石狮市" prefecture="泉州市" province="福建省"
-350582 county="晋江市" prefecture="泉州市" province="福建省"
-350583 county="南安市" prefecture="泉州市" province="福建省"
-350601 county="市辖区" prefecture="漳州市" province="福建省"
-350602 county="芗城区" prefecture="漳州市" province="福建省"
-350603 county="龙文区" prefecture="漳州市" province="福建省"
-350622 county="云霄县" prefecture="漳州市" province="福建省"
-350623 county="漳浦县" prefecture="漳州市" province="福建省"
-350624 county="诏安县" prefecture="漳州市" province="福建省"
-350625 county="长泰县" prefecture="漳州市" province="福建省"
-350626 county="东山县" prefecture="漳州市" province="福建省"
-350627 county="南靖县" prefecture="漳州市" province="福建省"
-350628 county="平和县" prefecture="漳州市" province="福建省"
-350629 county="华安县" prefecture="漳州市" province="福建省"
-350681 county="龙海市" prefecture="漳州市" province="福建省"
-350701 county="市辖区" prefecture="南平市" province="福建省"
-350702 county="延平区" prefecture="南平市" province="福建省"
-350721 county="顺昌县" prefecture="南平市" province="福建省"
-350722 county="浦城县" prefecture="南平市" province="福建省"
-350723 county="光泽县" prefecture="南平市" province="福建省"
-350724 county="松溪县" prefecture="南平市" province="福建省"
-350725 county="政和县" prefecture="南平市" province="福建省"
-350781 county="邵武市" prefecture="南平市" province="福建省"
-350782 county="武夷山市" prefecture="南平市" province="福建省"
-350783 county="建瓯市" prefecture="南平市" province="福建省"
-350784 county="建阳市" prefecture="南平市" province="福建省"
-350801 county="市辖区" prefecture="龙岩市" province="福建省"
-350802 county="新罗区" prefecture="龙岩市" province="福建省"
-350821 county="长汀县" prefecture="龙岩市" province="福建省"
-350822 county="永定县" prefecture="龙岩市" province="福建省"
-350823 county="上杭县" prefecture="龙岩市" province="福建省"
-350824 county="武平县" prefecture="龙岩市" province="福建省"
-350825 county="连城县" prefecture="龙岩市" province="福建省"
-350881 county="漳平市" prefecture="龙岩市" province="福建省"
-350901 county="市辖区" prefecture="宁德市" province="福建省"
-350902 county="蕉城区" prefecture="宁德市" province="福建省"
-350921 county="霞浦县" prefecture="宁德市" province="福建省"
-350922 county="古田县" prefecture="宁德市" province="福建省"
-350923 county="屏南县" prefecture="宁德市" province="福建省"
-350924 county="寿宁县" prefecture="宁德市" province="福建省"
-350925 county="周宁县" prefecture="宁德市" province="福建省"
-350926 county="柘荣县" prefecture="宁德市" province="福建省"
-350981 county="福安市" prefecture="宁德市" province="福建省"
-350982 county="福鼎市" prefecture="宁德市" province="福建省"
-360101 county="市辖区" prefecture="南昌市" province="江西省"
-360102 county="东湖区" prefecture="南昌市" province="江西省"
-360103 county="西湖区" prefecture="南昌市" province="江西省"
-360104 county="青云谱区" prefecture="南昌市" province="江西省"
-360105 county="湾里区" prefecture="南昌市" province="江西省"
-360111 county="青山湖区" prefecture="南昌市" province="江西省"
-360121 county="南昌县" prefecture="南昌市" province="江西省"
-360122 county="新建县" prefecture="南昌市" province="江西省"
-360123 county="安义县" prefecture="南昌市" province="江西省"
-360124 county="进贤县" prefecture="南昌市" province="江西省"
-360201 county="市辖区" prefecture="景德镇市" province="江西省"
-360202 county="昌江区" prefecture="景德镇市" province="江西省"
-360203 county="珠山区" prefecture="景德镇市" province="江西省"
-360222 county="浮梁县" prefecture="景德镇市" province="江西省"
-360281 county="乐平市" prefecture="景德镇市" province="江西省"
-360301 county="市辖区" prefecture="萍乡市" province="江西省"
-360302 county="安源区" prefecture="萍乡市" province="江西省"
-360313 county="湘东区" prefecture="萍乡市" province="江西省"
-360321 county="莲花县" prefecture="萍乡市" province="江西省"
-360322 county="上栗县" prefecture="萍乡市" province="江西省"
-360323 county="芦溪县" prefecture="萍乡市" province="江西省"
-360401 county="市辖区" prefecture="九江市" province="江西省"
-360402 county="庐山区" prefecture="九江市" province="江西省"
-360403 county="浔阳区" prefecture="九江市" province="江西省"
-360421 county="九江县" prefecture="九江市" province="江西省"
-360423 county="武宁县" prefecture="九江市" province="江西省"
-360424 county="修水县" prefecture="九江市" province="江西省"
-360425 county="永修县" prefecture="九江市" province="江西省"
-360426 county="德安县" prefecture="九江市" province="江西省"
-360427 county="星子县" prefecture="九江市" province="江西省"
-360428 county="都昌县" prefecture="九江市" province="江西省"
-360429 county="湖口县" prefecture="九江市" province="江西省"
-360430 county="彭泽县" prefecture="九江市" province="江西省"
-360481 county="瑞昌市" prefecture="九江市" province="江西省"
-360482 county="共青城市" prefecture="九江市" province="江西省"
-360501 county="市辖区" prefecture="新余市" province="江西省"
-360502 county="渝水区" prefecture="新余市" province="江西省"
-360521 county="分宜县" prefecture="新余市" province="江西省"
-360601 county="市辖区" prefecture="鹰潭市" province="江西省"
-360602 county="月湖区" prefecture="鹰潭市" province="江西省"
-360622 county="余江县" prefecture="鹰潭市" province="江西省"
-360681 county="贵溪市" prefecture="鹰潭市" province="江西省"
-360701 county="市辖区" prefecture="赣州市" province="江西省"
-360702 county="章贡区" prefecture="赣州市" province="江西省"
-360703 county="南康区" prefecture="赣州市" province="江西省"
-360721 county="赣县" prefecture="赣州市" province="江西省"
-360722 county="信丰县" prefecture="赣州市" province="江西省"
-360723 county="大余县" prefecture="赣州市" province="江西省"
-360724 county="上犹县" prefecture="赣州市" province="江西省"
-360725 county="崇义县" prefecture="赣州市" province="江西省"
-360726 county="安远县" prefecture="赣州市" province="江西省"
-360727 county="龙南县" prefecture="赣州市" province="江西省"
-360728 county="定南县" prefecture="赣州市" province="江西省"
-360729 county="全南县" prefecture="赣州市" province="江西省"
-360730 county="宁都县" prefecture="赣州市" province="江西省"
-360731 county="于都县" prefecture="赣州市" province="江西省"
-360732 county="兴国县" prefecture="赣州市" province="江西省"
-360733 county="会昌县" prefecture="赣州市" province="江西省"
-360734 county="寻乌县" prefecture="赣州市" province="江西省"
-360735 county="石城县" prefecture="赣州市" province="江西省"
-360781 county="瑞金市" prefecture="赣州市" province="江西省"
-360782 county="南康市" prefecture="赣州市" province="江西省"
-360801 county="市辖区" prefecture="吉安市" province="江西省"
-360802 county="吉州区" prefecture="吉安市" province="江西省"
-360803 county="青原区" prefecture="吉安市" province="江西省"
-360821 county="吉安县" prefecture="吉安市" province="江西省"
-360822 county="吉水县" prefecture="吉安市" province="江西省"
-360823 county="峡江县" prefecture="吉安市" province="江西省"
-360824 county="新干县" prefecture="吉安市" province="江西省"
-360825 county="永丰县" prefecture="吉安市" province="江西省"
-360826 county="泰和县" prefecture="吉安市" province="江西省"
-360827 county="遂川县" prefecture="吉安市" province="江西省"
-360828 county="万安县" prefecture="吉安市" province="江西省"
-360829 county="安福县" prefecture="吉安市" province="江西省"
-360830 county="永新县" prefecture="吉安市" province="江西省"
-360881 county="井冈山市" prefecture="吉安市" province="江西省"
-360901 county="市辖区" prefecture="宜春市" province="江西省"
-360902 county="袁州区" prefecture="宜春市" province="江西省"
-360921 county="奉新县" prefecture="宜春市" province="江西省"
-360922 county="万载县" prefecture="宜春市" province="江西省"
-360923 county="上高县" prefecture="宜春市" province="江西省"
-360924 county="宜丰县" prefecture="宜春市" province="江西省"
-360925 county="靖安县" prefecture="宜春市" province="江西省"
-360926 county="铜鼓县" prefecture="宜春市" province="江西省"
-360981 county="丰城市" prefecture="宜春市" province="江西省"
-360982 county="樟树市" prefecture="宜春市" province="江西省"
-360983 county="高安市" prefecture="宜春市" province="江西省"
-361001 county="市辖区" prefecture="抚州市" province="江西省"
-361002 county="临川区" prefecture="抚州市" province="江西省"
-361021 county="南城县" prefecture="抚州市" province="江西省"
-361022 county="黎川县" prefecture="抚州市" province="江西省"
-361023 county="南丰县" prefecture="抚州市" province="江西省"
-361024 county="崇仁县" prefecture="抚州市" province="江西省"
-361025 county="乐安县" prefecture="抚州市" province="江西省"
-361026 county="宜黄县" prefecture="抚州市" province="江西省"
-361027 county="金溪县" prefecture="抚州市" province="江西省"
-361028 county="资溪县" prefecture="抚州市" province="江西省"
-361029 county="东乡县" prefecture="抚州市" province="江西省"
-361030 county="广昌县" prefecture="抚州市" province="江西省"
-361101 county="市辖区" prefecture="上饶市" province="江西省"
-361102 county="信州区" prefecture="上饶市" province="江西省"
-361121 county="上饶县" prefecture="上饶市" province="江西省"
-361122 county="广丰县" prefecture="上饶市" province="江西省"
-361123 county="玉山县" prefecture="上饶市" province="江西省"
-361124 county="铅山县" prefecture="上饶市" province="江西省"
-361125 county="横峰县" prefecture="上饶市" province="江西省"
-361126 county="弋阳县" prefecture="上饶市" province="江西省"
-361127 county="余干县" prefecture="上饶市" province="江西省"
-361128 county="鄱阳县" prefecture="上饶市" province="江西省"
-361129 county="万年县" prefecture="上饶市" province="江西省"
-361130 county="婺源县" prefecture="上饶市" province="江西省"
-361181 county="德兴市" prefecture="上饶市" province="江西省"
-370101 county="市辖区" prefecture="济南市" province="山东省"
-370102 county="历下区" prefecture="济南市" province="山东省"
-370103 county="市中区" prefecture="济南市" province="山东省"
-370104 county="槐荫区" prefecture="济南市" province="山东省"
-370105 county="天桥区" prefecture="济南市" province="山东省"
-370112 county="历城区" prefecture="济南市" province="山东省"
-370113 county="长清区" prefecture="济南市" province="山东省"
-370124 county="平阴县" prefecture="济南市" province="山东省"
-370125 county="济阳县" prefecture="济南市" province="山东省"
-370126 county="商河县" prefecture="济南市" province="山东省"
-370181 county="章丘市" prefecture="济南市" province="山东省"
-370201 county="市辖区" prefecture="青岛市" province="山东省"
-370202 county="市南区" prefecture="青岛市" province="山东省"
-370203 county="市北区" prefecture="青岛市" province="山东省"
-370205 county="四方区" prefecture="青岛市" province="山东省"
-370211 county="黄岛区" prefecture="青岛市" province="山东省"
-370212 county="崂山区" prefecture="青岛市" province="山东省"
-370213 county="李沧区" prefecture="青岛市" province="山东省"
-370214 county="城阳区" prefecture="青岛市" province="山东省"
-370281 county="胶州市" prefecture="青岛市" province="山东省"
-370282 county="即墨市" prefecture="青岛市" province="山东省"
-370283 county="平度市" prefecture="青岛市" province="山东省"
-370284 county="胶南市" prefecture="青岛市" province="山东省"
-370285 county="莱西市" prefecture="青岛市" province="山东省"
-370301 county="市辖区" prefecture="淄博市" province="山东省"
-370302 county="淄川区" prefecture="淄博市" province="山东省"
-370303 county="张店区" prefecture="淄博市" province="山东省"
-370304 county="博山区" prefecture="淄博市" province="山东省"
-370305 county="临淄区" prefecture="淄博市" province="山东省"
-370306 county="周村区" prefecture="淄博市" province="山东省"
-370321 county="桓台县" prefecture="淄博市" province="山东省"
-370322 county="高青县" prefecture="淄博市" province="山东省"
-370323 county="沂源县" prefecture="淄博市" province="山东省"
-370401 county="市辖区" prefecture="枣庄市" province="山东省"
-370402 county="市中区" prefecture="枣庄市" province="山东省"
-370403 county="薛城区" prefecture="枣庄市" province="山东省"
-370404 county="峄城区" prefecture="枣庄市" province="山东省"
-370405 county="台儿庄区" prefecture="枣庄市" province="山东省"
-370406 county="山亭区" prefecture="枣庄市" province="山东省"
-370481 county="滕州市" prefecture="枣庄市" province="山东省"
-370501 county="市辖区" prefecture="东营市" province="山东省"
-370502 county="东营区" prefecture="东营市" province="山东省"
-370503 county="河口区" prefecture="东营市" province="山东省"
-370521 county="垦利县" prefecture="东营市" province="山东省"
-370522 county="利津县" prefecture="东营市" province="山东省"
-370523 county="广饶县" prefecture="东营市" province="山东省"
-370601 county="市辖区" prefecture="烟台市" province="山东省"
-370602 county="芝罘区" prefecture="烟台市" province="山东省"
-370611 county="福山区" prefecture="烟台市" province="山东省"
-370612 county="牟平区" prefecture="烟台市" province="山东省"
-370613 county="莱山区" prefecture="烟台市" province="山东省"
-370634 county="长岛县" prefecture="烟台市" province="山东省"
-370681 county="龙口市" prefecture="烟台市" province="山东省"
-370682 county="莱阳市" prefecture="烟台市" province="山东省"
-370683 county="莱州市" prefecture="烟台市" province="山东省"
-370684 county="蓬莱市" prefecture="烟台市" province="山东省"
-370685 county="招远市" prefecture="烟台市" province="山东省"
-370686 county="栖霞市" prefecture="烟台市" province="山东省"
-370687 county="海阳市" prefecture="烟台市" province="山东省"
-370701 county="市辖区" prefecture="潍坊市" province="山东省"
-370702 county="潍城区" prefecture="潍坊市" province="山东省"
-370703 county="寒亭区" prefecture="潍坊市" province="山东省"
-370704 county="坊子区" prefecture="潍坊市" province="山东省"
-370705 county="奎文区" prefecture="潍坊市" province="山东省"
-370724 county="临朐县" prefecture="潍坊市" province="山东省"
-370725 county="昌乐县" prefecture="潍坊市" province="山东省"
-370781 county="青州市" prefecture="潍坊市" province="山东省"
-370782 county="诸城市" prefecture="潍坊市" province="山东省"
-370783 county="寿光市" prefecture="潍坊市" province="山东省"
-370784 county="安丘市" prefecture="潍坊市" province="山东省"
-370785 county="高密市" prefecture="潍坊市" province="山东省"
-370786 county="昌邑市" prefecture="潍坊市" province="山东省"
-370801 county="市辖区" prefecture="济宁市" province="山东省"
-370802 county="市中区" prefecture="济宁市" province="山东省"
-370811 county="任城区" prefecture="济宁市" province="山东省"
-370812 county="兖州区" prefecture="济宁市" province="山东省"
-370826 county="微山县" prefecture="济宁市" province="山东省"
-370827 county="鱼台县" prefecture="济宁市" province="山东省"
-370828 county="金乡县" prefecture="济宁市" province="山东省"
-370829 county="嘉祥县" prefecture="济宁市" province="山东省"
-370830 county="汶上县" prefecture="济宁市" province="山东省"
-370831 county="泗水县" prefecture="济宁市" province="山东省"
-370832 county="梁山县" prefecture="济宁市" province="山东省"
-370881 county="曲阜市" prefecture="济宁市" province="山东省"
-370882 county="兖州市" prefecture="济宁市" province="山东省"
-370883 county="邹城市" prefecture="济宁市" province="山东省"
-370901 county="市辖区" prefecture="泰安市" province="山东省"
-370902 county="泰山区" prefecture="泰安市" province="山东省"
-370903 county="岱岳区" prefecture="泰安市" province="山东省"
-370911 county="岱岳区" prefecture="泰安市" province="山东省"
-370921 county="宁阳县" prefecture="泰安市" province="山东省"
-370923 county="东平县" prefecture="泰安市" province="山东省"
-370982 county="新泰市" prefecture="泰安市" province="山东省"
-370983 county="肥城市" prefecture="泰安市" province="山东省"
-371001 county="市辖区" prefecture="威海市" province="山东省"
-371002 county="环翠区" prefecture="威海市" province="山东省"
-371003 county="文登区" prefecture="威海市" province="山东省"
-371081 county="文登市" prefecture="威海市" province="山东省"
-371082 county="荣成市" prefecture="威海市" province="山东省"
-371083 county="乳山市" prefecture="威海市" province="山东省"
-371101 county="市辖区" prefecture="日照市" province="山东省"
-371102 county="东港区" prefecture="日照市" province="山东省"
-371103 county="岚山区" prefecture="日照市" province="山东省"
-371121 county="五莲县" prefecture="日照市" province="山东省"
-371122 county="莒县" prefecture="日照市" province="山东省"
-371201 county="市辖区" prefecture="莱芜市" province="山东省"
-371202 county="莱城区" prefecture="莱芜市" province="山东省"
-371203 county="钢城区" prefecture="莱芜市" province="山东省"
-371301 county="市辖区" prefecture="临沂市" province="山东省"
-371302 county="兰山区" prefecture="临沂市" province="山东省"
-371311 county="罗庄区" prefecture="临沂市" province="山东省"
-371312 county="河东区" prefecture="临沂市" province="山东省"
-371321 county="沂南县" prefecture="临沂市" province="山东省"
-371322 county="郯城县" prefecture="临沂市" province="山东省"
-371323 county="沂水县" prefecture="临沂市" province="山东省"
-371324 county="兰陵县" prefecture="临沂市" province="山东省"
-371325 county="费县" prefecture="临沂市" province="山东省"
-371326 county="平邑县" prefecture="临沂市" province="山东省"
-371327 county="莒南县" prefecture="临沂市" province="山东省"
-371328 county="蒙阴县" prefecture="临沂市" province="山东省"
-371329 county="临沭县" prefecture="临沂市" province="山东省"
-371401 county="市辖区" prefecture="德州市" province="山东省"
-371402 county="德城区" prefecture="德州市" province="山东省"
-371403 county="陵城区" prefecture="德州市" province="山东省"
-371421 county="陵县" prefecture="德州市" province="山东省"
-371422 county="宁津县" prefecture="德州市" province="山东省"
-371423 county="庆云县" prefecture="德州市" province="山东省"
-371424 county="临邑县" prefecture="德州市" province="山东省"
-371425 county="齐河县" prefecture="德州市" province="山东省"
-371426 county="平原县" prefecture="德州市" province="山东省"
-371427 county="夏津县" prefecture="德州市" province="山东省"
-371428 county="武城县" prefecture="德州市" province="山东省"
-371481 county="乐陵市" prefecture="德州市" province="山东省"
-371482 county="禹城市" prefecture="德州市" province="山东省"
-371501 county="市辖区" prefecture="聊城市" province="山东省"
-371502 county="东昌府区" prefecture="聊城市" province="山东省"
-371521 county="阳谷县" prefecture="聊城市" province="山东省"
-371522 county="莘县" prefecture="聊城市" province="山东省"
-371523 county="茌平县" prefecture="聊城市" province="山东省"
-371524 county="东阿县" prefecture="聊城市" province="山东省"
-371525 county="冠县" prefecture="聊城市" province="山东省"
-371526 county="高唐县" prefecture="聊城市" province="山东省"
-371581 county="临清市" prefecture="聊城市" province="山东省"
-371601 county="市辖区" prefecture="滨州市" province="山东省"
-371602 county="滨城区" prefecture="滨州市" province="山东省"
-371603 county="沾化区" prefecture="滨州市" province="山东省"
-371621 county="惠民县" prefecture="滨州市" province="山东省"
-371622 county="阳信县" prefecture="滨州市" province="山东省"
-371623 county="无棣县" prefecture="滨州市" province="山东省"
-371624 county="沾化县" prefecture="滨州市" province="山东省"
-371625 county="博兴县" prefecture="滨州市" province="山东省"
-371626 county="邹平县" prefecture="滨州市" province="山东省"
-371701 county="市辖区" prefecture="菏泽市" province="山东省"
-371702 county="牡丹区" prefecture="菏泽市" province="山东省"
-371721 county="曹县" prefecture="菏泽市" province="山东省"
-371722 county="单县" prefecture="菏泽市" province="山东省"
-371723 county="成武县" prefecture="菏泽市" province="山东省"
-371724 county="巨野县" prefecture="菏泽市" province="山东省"
-371725 county="郓城县" prefecture="菏泽市" province="山东省"
-371726 county="鄄城县" prefecture="菏泽市" province="山东省"
-371727 county="定陶县" prefecture="菏泽市" province="山东省"
-371728 county="东明县" prefecture="菏泽市" province="山东省"
-410101 county="市辖区" prefecture="郑州市" province="河南省"
-410102 county="中原区" prefecture="郑州市" province="河南省"
-410103 county="二七区" prefecture="郑州市" province="河南省"
-410104 county="管城回族区" prefecture="郑州市" province="河南省"
-410105 county="金水区" prefecture="郑州市" province="河南省"
-410106 county="上街区" prefecture="郑州市" province="河南省"
-410108 county="惠济区" prefecture="郑州市" province="河南省"
-410122 county="中牟县" prefecture="郑州市" province="河南省"
-410181 county="巩义市" prefecture="郑州市" province="河南省"
-410182 county="荥阳市" prefecture="郑州市" province="河南省"
-410183 county="新密市" prefecture="郑州市" province="河南省"
-410184 county="新郑市" prefecture="郑州市" province="河南省"
-410185 county="登封市" prefecture="郑州市" province="河南省"
-410201 county="市辖区" prefecture="开封市" province="河南省"
-410202 county="龙亭区" prefecture="开封市" province="河南省"
-410203 county="顺河回族区" prefecture="开封市" province="河南省"
-410204 county="鼓楼区" prefecture="开封市" province="河南省"
-410205 county="禹王台区" prefecture="开封市" province="河南省"
-410211 county="金明区" prefecture="开封市" province="河南省"
-410221 county="杞县" prefecture="开封市" province="河南省"
-410222 county="通许县" prefecture="开封市" province="河南省"
-410223 county="尉氏县" prefecture="开封市" province="河南省"
-410224 county="开封县" prefecture="开封市" province="河南省"
-410225 county="兰考县" prefecture="开封市" province="河南省"
-410301 county="市辖区" prefecture="洛阳市" province="河南省"
-410302 county="老城区" prefecture="洛阳市" province="河南省"
-410303 county="西工区" prefecture="洛阳市" province="河南省"
-410304 county="瀍河回族区" prefecture="洛阳市" province="河南省"
-410305 county="涧西区" prefecture="洛阳市" province="河南省"
-410306 county="吉利区" prefecture="洛阳市" province="河南省"
-410307 county="洛龙区" prefecture="洛阳市" province="河南省"
-410311 county="洛龙区" prefecture="洛阳市" province="河南省"
-410322 county="孟津县" prefecture="洛阳市" province="河南省"
-410323 county="新安县" prefecture="洛阳市" province="河南省"
-410324 county="栾川县" prefecture="洛阳市" province="河南省"
-410325 county="嵩县" prefecture="洛阳市" province="河南省"
-410326 county="汝阳县" prefecture="洛阳市" province="河南省"
-410327 county="宜阳县" prefecture="洛阳市" province="河南省"
-410328 county="洛宁县" prefecture="洛阳市" province="河南省"
-410329 county="伊川县" prefecture="洛阳市" province="河南省"
-410381 county="偃师市" prefecture="洛阳市" province="河南省"
-410401 county="市辖区" prefecture="平顶山市" province="河南省"
-410402 county="新华区" prefecture="平顶山市" province="河南省"
-410403 county="卫东区" prefecture="平顶山市" province="河南省"
-410404 county="石龙区" prefecture="平顶山市" province="河南省"
-410411 county="湛河区" prefecture="平顶山市" province="河南省"
-410421 county="宝丰县" prefecture="平顶山市" province="河南省"
-410422 county="叶县" prefecture="平顶山市" province="河南省"
-410423 county="鲁山县" prefecture="平顶山市" province="河南省"
-410425 county="郏县" prefecture="平顶山市" province="河南省"
-410481 county="舞钢市" prefecture="平顶山市" province="河南省"
-410482 county="汝州市" prefecture="平顶山市" province="河南省"
-410501 county="市辖区" prefecture="安阳市" province="河南省"
-410502 county="文峰区" prefecture="安阳市" province="河南省"
-410503 county="北关区" prefecture="安阳市" province="河南省"
-410505 county="殷都区" prefecture="安阳市" province="河南省"
-410506 county="龙安区" prefecture="安阳市" province="河南省"
-410522 county="安阳县" prefecture="安阳市" province="河南省"
-410523 county="汤阴县" prefecture="安阳市" province="河南省"
-410526 county="滑县" prefecture="安阳市" province="河南省"
-410527 county="内黄县" prefecture="安阳市" province="河南省"
-410581 county="林州市" prefecture="安阳市" province="河南省"
-410601 county="市辖区" prefecture="鹤壁市" province="河南省"
-410602 county="鹤山区" prefecture="鹤壁市" province="河南省"
-410603 county="山城区" prefecture="鹤壁市" province="河南省"
-410611 county="淇滨区" prefecture="鹤壁市" province="河南省"
-410621 county="浚县" prefecture="鹤壁市" province="河南省"
-410622 county="淇县" prefecture="鹤壁市" province="河南省"
-410701 county="市辖区" prefecture="新乡市" province="河南省"
-410702 county="红旗区" prefecture="新乡市" province="河南省"
-410703 county="卫滨区" prefecture="新乡市" province="河南省"
-410704 county="凤泉区" prefecture="新乡市" province="河南省"
-410711 county="牧野区" prefecture="新乡市" province="河南省"
-410721 county="新乡县" prefecture="新乡市" province="河南省"
-410724 county="获嘉县" prefecture="新乡市" province="河南省"
-410725 county="原阳县" prefecture="新乡市" province="河南省"
-410726 county="延津县" prefecture="新乡市" province="河南省"
-410727 county="封丘县" prefecture="新乡市" province="河南省"
-410728 county="长垣县" prefecture="新乡市" province="河南省"
-410781 county="卫辉市" prefecture="新乡市" province="河南省"
-410782 county="辉县市" prefecture="新乡市" province="河南省"
-410801 county="市辖区" prefecture="焦作市" province="河南省"
-410802 county="解放区" prefecture="焦作市" province="河南省"
-410803 county="中站区" prefecture="焦作市" province="河南省"
-410804 county="马村区" prefecture="焦作市" province="河南省"
-410811 county="山阳区" prefecture="焦作市" province="河南省"
-410821 county="修武县" prefecture="焦作市" province="河南省"
-410822 county="博爱县" prefecture="焦作市" province="河南省"
-410823 county="武陟县" prefecture="焦作市" province="河南省"
-410825 county="温县" prefecture="焦作市" province="河南省"
-410881 county="济源市" prefecture="焦作市" province="河南省"
-410882 county="沁阳市" prefecture="焦作市" province="河南省"
-410883 county="孟州市" prefecture="焦作市" province="河南省"
-410901 county="市辖区" prefecture="濮阳市" province="河南省"
-410902 county="华龙区" prefecture="濮阳市" province="河南省"
-410922 county="清丰县" prefecture="濮阳市" province="河南省"
-410923 county="南乐县" prefecture="濮阳市" province="河南省"
-410926 county="范县" prefecture="濮阳市" province="河南省"
-410927 county="台前县" prefecture="濮阳市" province="河南省"
-410928 county="濮阳县" prefecture="濮阳市" province="河南省"
-411001 county="市辖区" prefecture="许昌市" province="河南省"
-411002 county="魏都区" prefecture="许昌市" province="河南省"
-411023 county="许昌县" prefecture="许昌市" province="河南省"
-411024 county="鄢陵县" prefecture="许昌市" province="河南省"
-411025 county="襄城县" prefecture="许昌市" province="河南省"
-411081 county="禹州市" prefecture="许昌市" province="河南省"
-411082 county="长葛市" prefecture="许昌市" province="河南省"
-411101 county="市辖区" prefecture="漯河市" province="河南省"
-411102 county="源汇区" prefecture="漯河市" province="河南省"
-411103 county="郾城区" prefecture="漯河市" province="河南省"
-411104 county="召陵区" prefecture="漯河市" province="河南省"
-411121 county="舞阳县" prefecture="漯河市" province="河南省"
-411122 county="临颍县" prefecture="漯河市" province="河南省"
-411123 county="郾城县" prefecture="漯河市" province="河南省"
-411201 county="市辖区" prefecture="三门峡市" province="河南省"
-411202 county="湖滨区" prefecture="三门峡市" province="河南省"
-411221 county="渑池县" prefecture="三门峡市" province="河南省"
-411222 county="陕县" prefecture="三门峡市" province="河南省"
-411224 county="卢氏县" prefecture="三门峡市" province="河南省"
-411281 county="义马市" prefecture="三门峡市" province="河南省"
-411282 county="灵宝市" prefecture="三门峡市" province="河南省"
-411301 county="市辖区" prefecture="南阳市" province="河南省"
-411302 county="宛城区" prefecture="南阳市" province="河南省"
-411303 county="卧龙区" prefecture="南阳市" province="河南省"
-411321 county="南召县" prefecture="南阳市" province="河南省"
-411322 county="方城县" prefecture="南阳市" province="河南省"
-411323 county="西峡县" prefecture="南阳市" province="河南省"
-411324 county="镇平县" prefecture="南阳市" province="河南省"
-411325 county="内乡县" prefecture="南阳市" province="河南省"
-411326 county="淅川县" prefecture="南阳市" province="河南省"
-411327 county="社旗县" prefecture="南阳市" province="河南省"
-411328 county="唐河县" prefecture="南阳市" province="河南省"
-411329 county="新野县" prefecture="南阳市" province="河南省"
-411330 county="桐柏县" prefecture="南阳市" province="河南省"
-411381 county="邓州市" prefecture="南阳市" province="河南省"
-411401 county="市辖区" prefecture="商丘市" province="河南省"
-411402 county="梁园区" prefecture="商丘市" province="河南省"
-411403 county="睢阳区" prefecture="商丘市" province="河南省"
-411421 county="民权县" prefecture="商丘市" province="河南省"
-411422 county="睢县" prefecture="商丘市" province="河南省"
-411423 county="宁陵县" prefecture="商丘市" province="河南省"
-411424 county="柘城县" prefecture="商丘市" province="河南省"
-411425 county="虞城县" prefecture="商丘市" province="河南省"
-411426 county="夏邑县" prefecture="商丘市" province="河南省"
-411481 county="永城市" prefecture="商丘市" province="河南省"
-411501 county="市辖区" prefecture="信阳市" province="河南省"
-411502 county="浉河区" prefecture="信阳市" province="河南省"
-411503 county="平桥区" prefecture="信阳市" province="河南省"
-411521 county="罗山县" prefecture="信阳市" province="河南省"
-411522 county="光山县" prefecture="信阳市" province="河南省"
-411523 county="新县" prefecture="信阳市" province="河南省"
-411524 county="商城县" prefecture="信阳市" province="河南省"
-411525 county="固始县" prefecture="信阳市" province="河南省"
-411526 county="潢川县" prefecture="信阳市" province="河南省"
-411527 county="淮滨县" prefecture="信阳市" province="河南省"
-411528 county="息县" prefecture="信阳市" province="河南省"
-411601 county="市辖区" prefecture="周口市" province="河南省"
-411602 county="川汇区" prefecture="周口市" province="河南省"
-411621 county="扶沟县" prefecture="周口市" province="河南省"
-411622 county="西华县" prefecture="周口市" province="河南省"
-411623 county="商水县" prefecture="周口市" province="河南省"
-411624 county="沈丘县" prefecture="周口市" province="河南省"
-411625 county="郸城县" prefecture="周口市" province="河南省"
-411626 county="淮阳县" prefecture="周口市" province="河南省"
-411627 county="太康县" prefecture="周口市" province="河南省"
-411628 county="鹿邑县" prefecture="周口市" province="河南省"
-411681 county="项城市" prefecture="周口市" province="河南省"
-411701 county="市辖区" prefecture="驻马店市" province="河南省"
-411702 county="驿城区" prefecture="驻马店市" province="河南省"
-411721 county="西平县" prefecture="驻马店市" province="河南省"
-411722 county="上蔡县" prefecture="驻马店市" province="河南省"
-411723 county="平舆县" prefecture="驻马店市" province="河南省"
-411724 county="正阳县" prefecture="驻马店市" province="河南省"
-411725 county="确山县" prefecture="驻马店市" province="河南省"
-411726 county="泌阳县" prefecture="驻马店市" province="河南省"
-411727 county="汝南县" prefecture="驻马店市" province="河南省"
-411728 county="遂平县" prefecture="驻马店市" province="河南省"
-411729 county="新蔡县" prefecture="驻马店市" province="河南省"
-419001 county="济源市" prefecture="省直辖县级行政区划" province="河南省"
-420101 county="市辖区" prefecture="武汉市" province="湖北省"
-420102 county="江岸区" prefecture="武汉市" province="湖北省"
-420103 county="江汉区" prefecture="武汉市" province="湖北省"
-420104 county="硚口区" prefecture="武汉市" province="湖北省"
-420105 county="汉阳区" prefecture="武汉市" province="湖北省"
-420106 county="武昌区" prefecture="武汉市" province="湖北省"
-420107 county="青山区" prefecture="武汉市" province="湖北省"
-420111 county="洪山区" prefecture="武汉市" province="湖北省"
-420112 county="东西湖区" prefecture="武汉市" province="湖北省"
-420113 county="汉南区" prefecture="武汉市" province="湖北省"
-420114 county="蔡甸区" prefecture="武汉市" province="湖北省"
-420115 county="江夏区" prefecture="武汉市" province="湖北省"
-420116 county="黄陂区" prefecture="武汉市" province="湖北省"
-420117 county="新洲区" prefecture="武汉市" province="湖北省"
-420201 county="市辖区" prefecture="黄石市" province="湖北省"
-420202 county="黄石港区" prefecture="黄石市" province="湖北省"
-420203 county="西塞山区" prefecture="黄石市" province="湖北省"
-420204 county="下陆区" prefecture="黄石市" province="湖北省"
-420205 county="铁山区" prefecture="黄石市" province="湖北省"
-420222 county="阳新县" prefecture="黄石市" province="湖北省"
-420281 county="大冶市" prefecture="黄石市" province="湖北省"
-420301 county="市辖区" prefecture="十堰市" province="湖北省"
-420302 county="茅箭区" prefecture="十堰市" province="湖北省"
-420303 county="张湾区" prefecture="十堰市" province="湖北省"
-420304 county="郧阳区" prefecture="十堰市" province="湖北省"
-420321 county="郧县" prefecture="十堰市" province="湖北省"
-420322 county="郧西县" prefecture="十堰市" province="湖北省"
-420323 county="竹山县" prefecture="十堰市" province="湖北省"
-420324 county="竹溪县" prefecture="十堰市" province="湖北省"
-420325 county="房县" prefecture="十堰市" province="湖北省"
-420381 county="丹江口市" prefecture="十堰市" province="湖北省"
-420501 county="市辖区" prefecture="宜昌市" province="湖北省"
-420502 county="西陵区" prefecture="宜昌市" province="湖北省"
-420503 county="伍家岗区" prefecture="宜昌市" province="湖北省"
-420504 county="点军区" prefecture="宜昌市" province="湖北省"
-420505 county="猇亭区" prefecture="宜昌市" province="湖北省"
-420506 county="夷陵区" prefecture="宜昌市" province="湖北省"
-420525 county="远安县" prefecture="宜昌市" province="湖北省"
-420526 county="兴山县" prefecture="宜昌市" province="湖北省"
-420527 county="秭归县" prefecture="宜昌市" province="湖北省"
-420528 county="长阳土家族自治县" prefecture="宜昌市" province="湖北省"
-420529 county="五峰土家族自治县" prefecture="宜昌市" province="湖北省"
-420581 county="宜都市" prefecture="宜昌市" province="湖北省"
-420582 county="当阳市" prefecture="宜昌市" province="湖北省"
-420583 county="枝江市" prefecture="宜昌市" province="湖北省"
-420601 county="市辖区" prefecture="襄阳市" province="湖北省"
-420602 county="襄城区" prefecture="襄阳市" province="湖北省"
-420606 county="樊城区" prefecture="襄阳市" province="湖北省"
-420607 county="襄州区" prefecture="襄阳市" province="湖北省"
-420624 county="南漳县" prefecture="襄阳市" province="湖北省"
-420625 county="谷城县" prefecture="襄阳市" province="湖北省"
-420626 county="保康县" prefecture="襄阳市" province="湖北省"
-420682 county="老河口市" prefecture="襄阳市" province="湖北省"
-420683 county="枣阳市" prefecture="襄阳市" province="湖北省"
-420684 county="宜城市" prefecture="襄阳市" province="湖北省"
-420701 county="市辖区" prefecture="鄂州市" province="湖北省"
-420702 county="梁子湖区" prefecture="鄂州市" province="湖北省"
-420703 county="华容区" prefecture="鄂州市" province="湖北省"
-420704 county="鄂城区" prefecture="鄂州市" province="湖北省"
-420801 county="市辖区" prefecture="荆门市" province="湖北省"
-420802 county="东宝区" prefecture="荆门市" province="湖北省"
-420804 county="掇刀区" prefecture="荆门市" province="湖北省"
-420821 county="京山县" prefecture="荆门市" province="湖北省"
-420822 county="沙洋县" prefecture="荆门市" province="湖北省"
-420881 county="钟祥市" prefecture="荆门市" province="湖北省"
-420901 county="市辖区" prefecture="孝感市" province="湖北省"
-420902 county="孝南区" prefecture="孝感市" province="湖北省"
-420921 county="孝昌县" prefecture="孝感市" province="湖北省"
-420922 county="大悟县" prefecture="孝感市" province="湖北省"
-420923 county="云梦县" prefecture="孝感市" province="湖北省"
-420981 county="应城市" prefecture="孝感市" province="湖北省"
-420982 county="安陆市" prefecture="孝感市" province="湖北省"
-420984 county="汉川市" prefecture="孝感市" province="湖北省"
-421001 county="市辖区" prefecture="荆州市" province="湖北省"
-421002 county="沙市区" prefecture="荆州市" province="湖北省"
-421003 county="荆州区" prefecture="荆州市" province="湖北省"
-421022 county="公安县" prefecture="荆州市" province="湖北省"
-421023 county="监利县" prefecture="荆州市" province="湖北省"
-421024 county="江陵县" prefecture="荆州市" province="湖北省"
-421081 county="石首市" prefecture="荆州市" province="湖北省"
-421083 county="洪湖市" prefecture="荆州市" province="湖北省"
-421087 county="松滋市" prefecture="荆州市" province="湖北省"
-421101 county="市辖区" prefecture="黄冈市" province="湖北省"
-421102 county="黄州区" prefecture="黄冈市" province="湖北省"
-421121 county="团风县" prefecture="黄冈市" province="湖北省"
-421122 county="红安县" prefecture="黄冈市" province="湖北省"
-421123 county="罗田县" prefecture="黄冈市" province="湖北省"
-421124 county="英山县" prefecture="黄冈市" province="湖北省"
-421125 county="浠水县" prefecture="黄冈市" province="湖北省"
-421126 county="蕲春县" prefecture="黄冈市" province="湖北省"
-421127 county="黄梅县" prefecture="黄冈市" province="湖北省"
-421181 county="麻城市" prefecture="黄冈市" province="湖北省"
-421182 county="武穴市" prefecture="黄冈市" province="湖北省"
-421201 county="市辖区" prefecture="咸宁市" province="湖北省"
-421202 county="咸安区" prefecture="咸宁市" province="湖北省"
-421221 county="嘉鱼县" prefecture="咸宁市" province="湖北省"
-421222 county="通城县" prefecture="咸宁市" province="湖北省"
-421223 county="崇阳县" prefecture="咸宁市" province="湖北省"
-421224 county="通山县" prefecture="咸宁市" province="湖北省"
-421281 county="赤壁市" prefecture="咸宁市" province="湖北省"
-421301 county="市辖区" prefecture="随州市" province="湖北省"
-421302 county="曾都区" prefecture="随州市" province="湖北省"
-421303 county="曾都区" prefecture="随州市" province="湖北省"
-421321 county="随县" prefecture="随州市" province="湖北省"
-421381 county="广水市" prefecture="随州市" province="湖北省"
-422801 county="恩施市" prefecture="恩施土家族苗族自治州" province="湖北省"
-422802 county="利川市" prefecture="恩施土家族苗族自治州" province="湖北省"
-422822 county="建始县" prefecture="恩施土家族苗族自治州" province="湖北省"
-422823 county="巴东县" prefecture="恩施土家族苗族自治州" province="湖北省"
-422825 county="宣恩县" prefecture="恩施土家族苗族自治州" province="湖北省"
-422826 county="咸丰县" prefecture="恩施土家族苗族自治州" province="湖北省"
-422827 county="来凤县" prefecture="恩施土家族苗族自治州" province="湖北省"
-422828 county="鹤峰县" prefecture="恩施土家族苗族自治州" province="湖北省"
-429004 county="仙桃市" prefecture="省直辖县级行政区划" province="湖北省"
-429005 county="潜江市" prefecture="省直辖县级行政区划" province="湖北省"
-429006 county="天门市" prefecture="省直辖县级行政区划" province="湖北省"
-429021 county="神农架林区" prefecture="省直辖县级行政区划" province="湖北省"
-430101 county="市辖区" prefecture="长沙市" province="湖南省"
-430102 county="芙蓉区" prefecture="长沙市" province="湖南省"
-430103 county="天心区" prefecture="长沙市" province="湖南省"
-430104 county="岳麓区" prefecture="长沙市" province="湖南省"
-430105 county="开福区" prefecture="长沙市" province="湖南省"
-430111 county="雨花区" prefecture="长沙市" province="湖南省"
-430112 county="望城区" prefecture="长沙市" province="湖南省"
-430121 county="长沙县" prefecture="长沙市" province="湖南省"
-430122 county="望城县" prefecture="长沙市" province="湖南省"
-430124 county="宁乡县" prefecture="长沙市" province="湖南省"
-430181 county="浏阳市" prefecture="长沙市" province="湖南省"
-430201 county="市辖区" prefecture="株洲市" province="湖南省"
-430202 county="荷塘区" prefecture="株洲市" province="湖南省"
-430203 county="芦淞区" prefecture="株洲市" province="湖南省"
-430204 county="石峰区" prefecture="株洲市" province="湖南省"
-430211 county="天元区" prefecture="株洲市" province="湖南省"
-430221 county="株洲县" prefecture="株洲市" province="湖南省"
-430223 county="攸县" prefecture="株洲市" province="湖南省"
-430224 county="茶陵县" prefecture="株洲市" province="湖南省"
-430225 county="炎陵县" prefecture="株洲市" province="湖南省"
-430281 county="醴陵市" prefecture="株洲市" province="湖南省"
-430301 county="市辖区" prefecture="湘潭市" province="湖南省"
-430302 county="雨湖区" prefecture="湘潭市" province="湖南省"
-430304 county="岳塘区" prefecture="湘潭市" province="湖南省"
-430321 county="湘潭县" prefecture="湘潭市" province="湖南省"
-430381 county="湘乡市" prefecture="湘潭市" province="湖南省"
-430382 county="韶山市" prefecture="湘潭市" province="湖南省"
-430401 county="市辖区" prefecture="衡阳市" province="湖南省"
-430405 county="珠晖区" prefecture="衡阳市" province="湖南省"
-430406 county="雁峰区" prefecture="衡阳市" province="湖南省"
-430407 county="石鼓区" prefecture="衡阳市" province="湖南省"
-430408 county="蒸湘区" prefecture="衡阳市" province="湖南省"
-430412 county="南岳区" prefecture="衡阳市" province="湖南省"
-430421 county="衡阳县" prefecture="衡阳市" province="湖南省"
-430422 county="衡南县" prefecture="衡阳市" province="湖南省"
-430423 county="衡山县" prefecture="衡阳市" province="湖南省"
-430424 county="衡东县" prefecture="衡阳市" province="湖南省"
-430426 county="祁东县" prefecture="衡阳市" province="湖南省"
-430481 county="耒阳市" prefecture="衡阳市" province="湖南省"
-430482 county="常宁市" prefecture="衡阳市" province="湖南省"
-430501 county="市辖区" prefecture="邵阳市" province="湖南省"
-430502 county="双清区" prefecture="邵阳市" province="湖南省"
-430503 county="大祥区" prefecture="邵阳市" province="湖南省"
-430511 county="北塔区" prefecture="邵阳市" province="湖南省"
-430521 county="邵东县" prefecture="邵阳市" province="湖南省"
-430522 county="新邵县" prefecture="邵阳市" province="湖南省"
-430523 county="邵阳县" prefecture="邵阳市" province="湖南省"
-430524 county="隆回县" prefecture="邵阳市" province="湖南省"
-430525 county="洞口县" prefecture="邵阳市" province="湖南省"
-430527 county="绥宁县" prefecture="邵阳市" province="湖南省"
-430528 county="新宁县" prefecture="邵阳市" province="湖南省"
-430529 county="城步苗族自治县" prefecture="邵阳市" province="湖南省"
-430581 county="武冈市" prefecture="邵阳市" province="湖南省"
-430601 county="市辖区" prefecture="岳阳市" province="湖南省"
-430602 county="岳阳楼区" prefecture="岳阳市" province="湖南省"
-430603 county="云溪区" prefecture="岳阳市" province="湖南省"
-430611 county="君山区" prefecture="岳阳市" province="湖南省"
-430621 county="岳阳县" prefecture="岳阳市" province="湖南省"
-430623 county="华容县" prefecture="岳阳市" province="湖南省"
-430624 county="湘阴县" prefecture="岳阳市" province="湖南省"
-430626 county="平江县" prefecture="岳阳市" province="湖南省"
-430681 county="汨罗市" prefecture="岳阳市" province="湖南省"
-430682 county="临湘市" prefecture="岳阳市" province="湖南省"
-430701 county="市辖区" prefecture="常德市" province="湖南省"
-430702 county="武陵区" prefecture="常德市" province="湖南省"
-430703 county="鼎城区" prefecture="常德市" province="湖南省"
-430721 county="安乡县" prefecture="常德市" province="湖南省"
-430722 county="汉寿县" prefecture="常德市" province="湖南省"
-430723 county="澧县" prefecture="常德市" province="湖南省"
-430724 county="临澧县" prefecture="常德市" province="湖南省"
-430725 county="桃源县" prefecture="常德市" province="湖南省"
-430726 county="石门县" prefecture="常德市" province="湖南省"
-430781 county="津市市" prefecture="常德市" province="湖南省"
-430801 county="市辖区" prefecture="张家界市" province="湖南省"
-430802 county="永定区" prefecture="张家界市" province="湖南省"
-430811 county="武陵源区" prefecture="张家界市" province="湖南省"
-430821 county="慈利县" prefecture="张家界市" province="湖南省"
-430822 county="桑植县" prefecture="张家界市" province="湖南省"
-430901 county="市辖区" prefecture="益阳市" province="湖南省"
-430902 county="资阳区" prefecture="益阳市" province="湖南省"
-430903 county="赫山区" prefecture="益阳市" province="湖南省"
-430921 county="南县" prefecture="益阳市" province="湖南省"
-430922 county="桃江县" prefecture="益阳市" province="湖南省"
-430923 county="安化县" prefecture="益阳市" province="湖南省"
-430981 county="沅江市" prefecture="益阳市" province="湖南省"
-431001 county="市辖区" prefecture="郴州市" province="湖南省"
-431002 county="北湖区" prefecture="郴州市" province="湖南省"
-431003 county="苏仙区" prefecture="郴州市" province="湖南省"
-431021 county="桂阳县" prefecture="郴州市" province="湖南省"
-431022 county="宜章县" prefecture="郴州市" province="湖南省"
-431023 county="永兴县" prefecture="郴州市" province="湖南省"
-431024 county="嘉禾县" prefecture="郴州市" province="湖南省"
-431025 county="临武县" prefecture="郴州市" province="湖南省"
-431026 county="汝城县" prefecture="郴州市" province="湖南省"
-431027 county="桂东县" prefecture="郴州市" province="湖南省"
-431028 county="安仁县" prefecture="郴州市" province="湖南省"
-431081 county="资兴市" prefecture="郴州市" province="湖南省"
-431101 county="市辖区" prefecture="永州市" province="湖南省"
-431102 county="零陵区" prefecture="永州市" province="湖南省"
-431103 county="冷水滩区" prefecture="永州市" province="湖南省"
-431121 county="祁阳县" prefecture="永州市" province="湖南省"
-431122 county="东安县" prefecture="永州市" province="湖南省"
-431123 county="双牌县" prefecture="永州市" province="湖南省"
-431124 county="道县" prefecture="永州市" province="湖南省"
-431125 county="江永县" prefecture="永州市" province="湖南省"
-431126 county="宁远县" prefecture="永州市" province="湖南省"
-431127 county="蓝山县" prefecture="永州市" province="湖南省"
-431128 county="新田县" prefecture="永州市" province="湖南省"
-431129 county="江华瑶族自治县" prefecture="永州市" province="湖南省"
-431201 county="市辖区" prefecture="怀化市" province="湖南省"
-431202 county="鹤城区" prefecture="怀化市" province="湖南省"
-431221 county="中方县" prefecture="怀化市" province="湖南省"
-431222 county="沅陵县" prefecture="怀化市" province="湖南省"
-431223 county="辰溪县" prefecture="怀化市" province="湖南省"
-431224 county="溆浦县" prefecture="怀化市" province="湖南省"
-431225 county="会同县" prefecture="怀化市" province="湖南省"
-431226 county="麻阳苗族自治县" prefecture="怀化市" province="湖南省"
-431227 county="新晃侗族自治县" prefecture="怀化市" province="湖南省"
-431228 county="芷江侗族自治县" prefecture="怀化市" province="湖南省"
-431229 county="靖州苗族侗族自治县" prefecture="怀化市" province="湖南省"
-431230 county="通道侗族自治县" prefecture="怀化市" province="湖南省"
-431281 county="洪江市" prefecture="怀化市" province="湖南省"
-431301 county="市辖区" prefecture="娄底市" province="湖南省"
-431302 county="娄星区" prefecture="娄底市" province="湖南省"
-431321 county="双峰县" prefecture="娄底市" province="湖南省"
-431322 county="新化县" prefecture="娄底市" province="湖南省"
-431381 county="冷水江市" prefecture="娄底市" province="湖南省"
-431382 county="涟源市" prefecture="娄底市" province="湖南省"
-433101 county="吉首市" prefecture="湘西土家族苗族自治州" province="湖南省"
-433122 county="泸溪县" prefecture="湘西土家族苗族自治州" province="湖南省"
-433123 county="凤凰县" prefecture="湘西土家族苗族自治州" province="湖南省"
-433124 county="花垣县" prefecture="湘西土家族苗族自治州" province="湖南省"
-433125 county="保靖县" prefecture="湘西土家族苗族自治州" province="湖南省"
-433126 county="古丈县" prefecture="湘西土家族苗族自治州" province="湖南省"
-433127 county="永顺县" prefecture="湘西土家族苗族自治州" province="湖南省"
-433130 county="龙山县" prefecture="湘西土家族苗族自治州" province="湖南省"
-440101 county="市辖区" prefecture="广州市" province="广东省"
-440102 county="东山区" prefecture="广州市" province="广东省"
-440103 county="荔湾区" prefecture="广州市" province="广东省"
-440104 county="越秀区" prefecture="广州市" province="广东省"
-440105 county="海珠区" prefecture="广州市" province="广东省"
-440106 county="天河区" prefecture="广州市" province="广东省"
-440107 county="芳村区" prefecture="广州市" province="广东省"
-440111 county="白云区" prefecture="广州市" province="广东省"
-440112 county="黄埔区" prefecture="广州市" province="广东省"
-440113 county="番禺区" prefecture="广州市" province="广东省"
-440114 county="花都区" prefecture="广州市" province="广东省"
-440115 county="南沙区" prefecture="广州市" province="广东省"
-440116 county="萝岗区" prefecture="广州市" province="广东省"
-440117 county="从化区" prefecture="广州市" province="广东省"
-440118 county="增城区" prefecture="广州市" province="广东省"
-440183 county="增城市" prefecture="广州市" province="广东省"
-440184 county="从化市" prefecture="广州市" province="广东省"
-440201 county="市辖区" prefecture="韶关市" province="广东省"
-440202 county="北江区" prefecture="韶关市" province="广东省"
-440203 county="武江区" prefecture="韶关市" province="广东省"
-440204 county="浈江区" prefecture="韶关市" province="广东省"
-440205 county="曲江区" prefecture="韶关市" province="广东省"
-440221 county="曲江县" prefecture="韶关市" province="广东省"
-440222 county="始兴县" prefecture="韶关市" province="广东省"
-440224 county="仁化县" prefecture="韶关市" province="广东省"
-440229 county="翁源县" prefecture="韶关市" province="广东省"
-440232 county="乳源瑶族自治县" prefecture="韶关市" province="广东省"
-440233 county="新丰县" prefecture="韶关市" province="广东省"
-440281 county="乐昌市" prefecture="韶关市" province="广东省"
-440282 county="南雄市" prefecture="韶关市" province="广东省"
-440301 county="市辖区" prefecture="深圳市" province="广东省"
-440303 county="罗湖区" prefecture="深圳市" province="广东省"
-440304 county="福田区" prefecture="深圳市" province="广东省"
-440305 county="南山区" prefecture="深圳市" province="广东省"
-440306 county="宝安区" prefecture="深圳市" province="广东省"
-440307 county="龙岗区" prefecture="深圳市" province="广东省"
-440308 county="盐田区" prefecture="深圳市" province="广东省"
-440401 county="市辖区" prefecture="珠海市" province="广东省"
-440402 county="香洲区" prefecture="珠海市" province="广东省"
-440403 county="斗门区" prefecture="珠海市" province="广东省"
-440404 county="金湾区" prefecture="珠海市" province="广东省"
-440501 county="市辖区" prefecture="汕头市" province="广东省"
-440506 county="达濠区" prefecture="汕头市" province="广东省"
-440507 county="龙湖区" prefecture="汕头市" province="广东省"
-440508 county="金园区" prefecture="汕头市" province="广东省"
-440509 county="升平区" prefecture="汕头市" province="广东省"
-440510 county="河浦区" prefecture="汕头市" province="广东省"
-440511 county="金平区" prefecture="汕头市" province="广东省"
-440512 county="濠江区" prefecture="汕头市" province="广东省"
-440513 county="潮阳区" prefecture="汕头市" province="广东省"
-440514 county="潮南区" prefecture="汕头市" province="广东省"
-440515 county="澄海区" prefecture="汕头市" province="广东省"
-440523 county="南澳县" prefecture="汕头市" province="广东省"
-440582 county="潮阳市" prefecture="汕头市" province="广东省"
-440583 county="澄海市" prefecture="汕头市" province="广东省"
-440601 county="市辖区" prefecture="佛山市" province="广东省"
-440604 county="禅城区" prefecture="佛山市" province="广东省"
-440605 county="南海区" prefecture="佛山市" province="广东省"
-440606 county="顺德区" prefecture="佛山市" province="广东省"
-440607 county="三水区" prefecture="佛山市" province="广东省"
-440608 county="高明区" prefecture="佛山市" province="广东省"
-440701 county="市辖区" prefecture="江门市" province="广东省"
-440703 county="蓬江区" prefecture="江门市" province="广东省"
-440704 county="江海区" prefecture="江门市" province="广东省"
-440705 county="新会区" prefecture="江门市" province="广东省"
-440781 county="台山市" prefecture="江门市" province="广东省"
-440783 county="开平市" prefecture="江门市" province="广东省"
-440784 county="鹤山市" prefecture="江门市" province="广东省"
-440785 county="恩平市" prefecture="江门市" province="广东省"
-440801 county="市辖区" prefecture="湛江市" province="广东省"
-440802 county="赤坎区" prefecture="湛江市" province="广东省"
-440803 county="霞山区" prefecture="湛江市" province="广东省"
-440804 county="坡头区" prefecture="湛江市" province="广东省"
-440811 county="麻章区" prefecture="湛江市" province="广东省"
-440823 county="遂溪县" prefecture="湛江市" province="广东省"
-440825 county="徐闻县" prefecture="湛江市" province="广东省"
-440881 county="廉江市" prefecture="湛江市" province="广东省"
-440882 county="雷州市" prefecture="湛江市" province="广东省"
-440883 county="吴川市" prefecture="湛江市" province="广东省"
-440901 county="市辖区" prefecture="茂名市" province="广东省"
-440902 county="茂南区" prefecture="茂名市" province="广东省"
-440903 county="茂港区" prefecture="茂名市" province="广东省"
-440904 county="电白区" prefecture="茂名市" province="广东省"
-440923 county="电白县" prefecture="茂名市" province="广东省"
-440981 county="高州市" prefecture="茂名市" province="广东省"
-440982 county="化州市" prefecture="茂名市" province="广东省"
-440983 county="信宜市" prefecture="茂名市" province="广东省"
-441201 county="市辖区" prefecture="肇庆市" province="广东省"
-441202 county="端州区" prefecture="肇庆市" province="广东省"
-441203 county="鼎湖区" prefecture="肇庆市" province="广东省"
-441223 county="广宁县" prefecture="肇庆市" province="广东省"
-441224 county="怀集县" prefecture="肇庆市" province="广东省"
-441225 county="封开县" prefecture="肇庆市" province="广东省"
-441226 county="德庆县" prefecture="肇庆市" province="广东省"
-441283 county="高要市" prefecture="肇庆市" province="广东省"
-441284 county="四会市" prefecture="肇庆市" province="广东省"
-441301 county="市辖区" prefecture="惠州市" province="广东省"
-441302 county="惠城区" prefecture="惠州市" province="广东省"
-441303 county="惠阳区" prefecture="惠州市" province="广东省"
-441322 county="博罗县" prefecture="惠州市" province="广东省"
-441323 county="惠东县" prefecture="惠州市" province="广东省"
-441324 county="龙门县" prefecture="惠州市" province="广东省"
-441381 county="惠阳市" prefecture="惠州市" province="广东省"
-441401 county="市辖区" prefecture="梅州市" province="广东省"
-441402 county="梅江区" prefecture="梅州市" province="广东省"
-441403 county="梅县区" prefecture="梅州市" province="广东省"
-441421 county="梅县" prefecture="梅州市" province="广东省"
-441422 county="大埔县" prefecture="梅州市" province="广东省"
-441423 county="丰顺县" prefecture="梅州市" province="广东省"
-441424 county="五华县" prefecture="梅州市" province="广东省"
-441426 county="平远县" prefecture="梅州市" province="广东省"
-441427 county="蕉岭县" prefecture="梅州市" province="广东省"
-441481 county="兴宁市" prefecture="梅州市" province="广东省"
-441501 county="市辖区" prefecture="汕尾市" province="广东省"
-441502 county="城区" prefecture="汕尾市" province="广东省"
-441521 county="海丰县" prefecture="汕尾市" province="广东省"
-441523 county="陆河县" prefecture="汕尾市" province="广东省"
-441581 county="陆丰市" prefecture="汕尾市" province="广东省"
-441601 county="市辖区" prefecture="河源市" province="广东省"
-441602 county="源城区" prefecture="河源市" province="广东省"
-441621 county="紫金县" prefecture="河源市" province="广东省"
-441622 county="龙川县" prefecture="河源市" province="广东省"
-441623 county="连平县" prefecture="河源市" province="广东省"
-441624 county="和平县" prefecture="河源市" province="广东省"
-441625 county="东源县" prefecture="河源市" province="广东省"
-441701 county="市辖区" prefecture="阳江市" province="广东省"
-441702 county="江城区" prefecture="阳江市" province="广东省"
-441721 county="阳西县" prefecture="阳江市" province="广东省"
-441723 county="阳东县" prefecture="阳江市" province="广东省"
-441781 county="阳春市" prefecture="阳江市" province="广东省"
-441801 county="市辖区" prefecture="清远市" province="广东省"
-441802 county="清城区" prefecture="清远市" province="广东省"
-441803 county="清新区" prefecture="清远市" province="广东省"
-441821 county="佛冈县" prefecture="清远市" province="广东省"
-441823 county="阳山县" prefecture="清远市" province="广东省"
-441825 county="连山壮族瑶族自治县" prefecture="清远市" province="广东省"
-441826 county="连南瑶族自治县" prefecture="清远市" province="广东省"
-441827 county="清新县" prefecture="清远市" province="广东省"
-441881 county="英德市" prefecture="清远市" province="广东省"
-441882 county="连州市" prefecture="清远市" province="广东省"
-445101 county="市辖区" prefecture="潮州市" province="广东省"
-445102 county="湘桥区" prefecture="潮州市" province="广东省"
-445103 county="潮安区" prefecture="潮州市" province="广东省"
-445121 county="潮安县" prefecture="潮州市" province="广东省"
-445122 county="饶平县" prefecture="潮州市" province="广东省"
-445201 county="市辖区" prefecture="揭阳市" province="广东省"
-445202 county="榕城区" prefecture="揭阳市" province="广东省"
-445203 county="揭东区" prefecture="揭阳市" province="广东省"
-445221 county="揭东县" prefecture="揭阳市" province="广东省"
-445222 county="揭西县" prefecture="揭阳市" province="广东省"
-445224 county="惠来县" prefecture="揭阳市" province="广东省"
-445281 county="普宁市" prefecture="揭阳市" province="广东省"
-445301 county="市辖区" prefecture="云浮市" province="广东省"
-445302 county="云城区" prefecture="云浮市" province="广东省"
-445303 county="云安区" prefecture="云浮市" province="广东省"
-445321 county="新兴县" prefecture="云浮市" province="广东省"
-445322 county="郁南县" prefecture="云浮市" province="广东省"
-445323 county="云安县" prefecture="云浮市" province="广东省"
-445381 county="罗定市" prefecture="云浮市" province="广东省"
-450101 county="市辖区" prefecture="南宁市" province="广西壮族自治区"
-450102 county="兴宁区" prefecture="南宁市" province="广西壮族自治区"
-450103 county="青秀区" prefecture="南宁市" province="广西壮族自治区"
-450104 county="城北区" prefecture="南宁市" province="广西壮族自治区"
-450105 county="江南区" prefecture="南宁市" province="广西壮族自治区"
-450106 county="永新区" prefecture="南宁市" province="广西壮族自治区"
-450107 county="西乡塘区" prefecture="南宁市" province="广西壮族自治区"
-450108 county="良庆区" prefecture="南宁市" province="广西壮族自治区"
-450109 county="邕宁区" prefecture="南宁市" province="广西壮族自治区"
-450121 county="邕宁县" prefecture="南宁市" province="广西壮族自治区"
-450122 county="武鸣县" prefecture="南宁市" province="广西壮族自治区"
-450123 county="隆安县" prefecture="南宁市" province="广西壮族自治区"
-450124 county="马山县" prefecture="南宁市" province="广西壮族自治区"
-450125 county="上林县" prefecture="南宁市" province="广西壮族自治区"
-450126 county="宾阳县" prefecture="南宁市" province="广西壮族自治区"
-450127 county="横县" prefecture="南宁市" province="广西壮族自治区"
-450201 county="市辖区" prefecture="柳州市" province="广西壮族自治区"
-450202 county="城中区" prefecture="柳州市" province="广西壮族自治区"
-450203 county="鱼峰区" prefecture="柳州市" province="广西壮族自治区"
-450204 county="柳南区" prefecture="柳州市" province="广西壮族自治区"
-450205 county="柳北区" prefecture="柳州市" province="广西壮族自治区"
-450221 county="柳江县" prefecture="柳州市" province="广西壮族自治区"
-450222 county="柳城县" prefecture="柳州市" province="广西壮族自治区"
-450223 county="鹿寨县" prefecture="柳州市" province="广西壮族自治区"
-450224 county="融安县" prefecture="柳州市" province="广西壮族自治区"
-450225 county="融水苗族自治县" prefecture="柳州市" province="广西壮族自治区"
-450226 county="三江侗族自治县" prefecture="柳州市" province="广西壮族自治区"
-450301 county="市辖区" prefecture="桂林市" province="广西壮族自治区"
-450302 county="秀峰区" prefecture="桂林市" province="广西壮族自治区"
-450303 county="叠彩区" prefecture="桂林市" province="广西壮族自治区"
-450304 county="象山区" prefecture="桂林市" province="广西壮族自治区"
-450305 county="七星区" prefecture="桂林市" province="广西壮族自治区"
-450311 county="雁山区" prefecture="桂林市" province="广西壮族自治区"
-450312 county="临桂区" prefecture="桂林市" province="广西壮族自治区"
-450321 county="阳朔县" prefecture="桂林市" province="广西壮族自治区"
-450322 county="临桂县" prefecture="桂林市" province="广西壮族自治区"
-450323 county="灵川县" prefecture="桂林市" province="广西壮族自治区"
-450324 county="全州县" prefecture="桂林市" province="广西壮族自治区"
-450325 county="兴安县" prefecture="桂林市" province="广西壮族自治区"
-450326 county="永福县" prefecture="桂林市" province="广西壮族自治区"
-450327 county="灌阳县" prefecture="桂林市" province="广西壮族自治区"
-450328 county="龙胜各族自治县" prefecture="桂林市" province="广西壮族自治区"
-450329 county="资源县" prefecture="桂林市" province="广西壮族自治区"
-450330 county="平乐县" prefecture="桂林市" province="广西壮族自治区"
-450331 county="荔浦县" prefecture="桂林市" province="广西壮族自治区"
-450332 county="恭城瑶族自治县" prefecture="桂林市" province="广西壮族自治区"
-450401 county="市辖区" prefecture="梧州市" province="广西壮族自治区"
-450403 county="万秀区" prefecture="梧州市" province="广西壮族自治区"
-450404 county="蝶山区" prefecture="梧州市" province="广西壮族自治区"
-450405 county="长洲区" prefecture="梧州市" province="广西壮族自治区"
-450406 county="龙圩区" prefecture="梧州市" province="广西壮族自治区"
-450411 county="市郊区" prefecture="梧州市" province="广西壮族自治区"
-450421 county="苍梧县" prefecture="梧州市" province="广西壮族自治区"
-450422 county="藤县" prefecture="梧州市" province="广西壮族自治区"
-450423 county="蒙山县" prefecture="梧州市" province="广西壮族自治区"
-450481 county="岑溪市" prefecture="梧州市" province="广西壮族自治区"
-450501 county="市辖区" prefecture="北海市" province="广西壮族自治区"
-450502 county="海城区" prefecture="北海市" province="广西壮族自治区"
-450503 county="银海区" prefecture="北海市" province="广西壮族自治区"
-450512 county="铁山港区" prefecture="北海市" province="广西壮族自治区"
-450521 county="合浦县" prefecture="北海市" province="广西壮族自治区"
-450601 county="市辖区" prefecture="防城港市" province="广西壮族自治区"
-450602 county="港口区" prefecture="防城港市" province="广西壮族自治区"
-450603 county="防城区" prefecture="防城港市" province="广西壮族自治区"
-450621 county="上思县" prefecture="防城港市" province="广西壮族自治区"
-450681 county="东兴市" prefecture="防城港市" province="广西壮族自治区"
-450701 county="市辖区" prefecture="钦州市" province="广西壮族自治区"
-450702 county="钦南区" prefecture="钦州市" province="广西壮族自治区"
-450703 county="钦北区" prefecture="钦州市" province="广西壮族自治区"
-450721 county="灵山县" prefecture="钦州市" province="广西壮族自治区"
-450722 county="浦北县" prefecture="钦州市" province="广西壮族自治区"
-450801 county="市辖区" prefecture="贵港市" province="广西壮族自治区"
-450802 county="港北区" prefecture="贵港市" province="广西壮族自治区"
-450803 county="港南区" prefecture="贵港市" province="广西壮族自治区"
-450804 county="覃塘区" prefecture="贵港市" province="广西壮族自治区"
-450821 county="平南县" prefecture="贵港市" province="广西壮族自治区"
-450881 county="桂平市" prefecture="贵港市" province="广西壮族自治区"
-450901 county="市辖区" prefecture="玉林市" province="广西壮族自治区"
-450902 county="玉州区" prefecture="玉林市" province="广西壮族自治区"
-450903 county="福绵区" prefecture="玉林市" province="广西壮族自治区"
-450921 county="容县" prefecture="玉林市" province="广西壮族自治区"
-450922 county="陆川县" prefecture="玉林市" province="广西壮族自治区"
-450923 county="博白县" prefecture="玉林市" province="广西壮族自治区"
-450924 county="兴业县" prefecture="玉林市" province="广西壮族自治区"
-450981 county="北流市" prefecture="玉林市" province="广西壮族自治区"
-451001 county="市辖区" prefecture="百色市" province="广西壮族自治区"
-451002 county="右江区" prefecture="百色市" province="广西壮族自治区"
-451021 county="田阳县" prefecture="百色市" province="广西壮族自治区"
-451022 county="田东县" prefecture="百色市" province="广西壮族自治区"
-451023 county="平果县" prefecture="百色市" province="广西壮族自治区"
-451024 county="德保县" prefecture="百色市" province="广西壮族自治区"
-451025 county="靖西县" prefecture="百色市" province="广西壮族自治区"
-451026 county="那坡县" prefecture="百色市" province="广西壮族自治区"
-451027 county="凌云县" prefecture="百色市" province="广西壮族自治区"
-451028 county="乐业县" prefecture="百色市" province="广西壮族自治区"
-451029 county="田林县" prefecture="百色市" province="广西壮族自治区"
-451030 county="西林县" prefecture="百色市" province="广西壮族自治区"
-451031 county="隆林各族自治县" prefecture="百色市" province="广西壮族自治区"
-451101 county="市辖区" prefecture="贺州市" province="广西壮族自治区"
-451102 county="八步区" prefecture="贺州市" province="广西壮族自治区"
-451121 county="昭平县" prefecture="贺州市" province="广西壮族自治区"
-451122 county="钟山县" prefecture="贺州市" province="广西壮族自治区"
-451123 county="富川瑶族自治县" prefecture="贺州市" province="广西壮族自治区"
-451201 county="市辖区" prefecture="河池市" province="广西壮族自治区"
-451202 county="金城江区" prefecture="河池市" province="广西壮族自治区"
-451221 county="南丹县" prefecture="河池市" province="广西壮族自治区"
-451222 county="天峨县" prefecture="河池市" province="广西壮族自治区"
-451223 county="凤山县" prefecture="河池市" province="广西壮族自治区"
-451224 county="东兰县" prefecture="河池市" province="广西壮族自治区"
-451225 county="罗城仫佬族自治县" prefecture="河池市" province="广西壮族自治区"
-451226 county="环江毛南族自治县" prefecture="河池市" province="广西壮族自治区"
-451227 county="巴马瑶族自治县" prefecture="河池市" province="广西壮族自治区"
-451228 county="都安瑶族自治县" prefecture="河池市" province="广西壮族自治区"
-451229 county="大化瑶族自治县" prefecture="河池市" province="广西壮族自治区"
-451281 county="宜州市" prefecture="河池市" province="广西壮族自治区"
-451301 county="市辖区" prefecture="来宾市" province="广西壮族自治区"
-451302 county="兴宾区" prefecture="来宾市" province="广西壮族自治区"
-451321 county="忻城县" prefecture="来宾市" province="广西壮族自治区"
-451322 county="象州县" prefecture="来宾市" province="广西壮族自治区"
-451323 county="武宣县" prefecture="来宾市" province="广西壮族自治区"
-451324 county="金秀瑶族自治县" prefecture="来宾市" province="广西壮族自治区"
-451381 county="合山市" prefecture="来宾市" province="广西壮族自治区"
-451401 county="市辖区" prefecture="崇左市" province="广西壮族自治区"
-451402 county="江州区" prefecture="崇左市" province="广西壮族自治区"
-451421 county="扶绥县" prefecture="崇左市" province="广西壮族自治区"
-451422 county="宁明县" prefecture="崇左市" province="广西壮族自治区"
-451423 county="龙州县" prefecture="崇左市" province="广西壮族自治区"
-451424 county="大新县" prefecture="崇左市" province="广西壮族自治区"
-451425 county="天等县" prefecture="崇左市" province="广西壮族自治区"
-451481 county="凭祥市" prefecture="崇左市" province="广西壮族自治区"
-460101 county="市辖区" prefecture="海口市" province="海南省"
-460105 county="秀英区" prefecture="海口市" province="海南省"
-460106 county="龙华区" prefecture="海口市" province="海南省"
-460107 county="琼山区" prefecture="海口市" province="海南省"
-460108 county="美兰区" prefecture="海口市" province="海南省"
-460201 county="市辖区" prefecture="三亚市" province="海南省"
-460202 county="海棠区" prefecture="三亚市" province="海南省"
-460203 county="吉阳区" prefecture="三亚市" province="海南省"
-460204 county="天涯区" prefecture="三亚市" province="海南省"
-460205 county="崖州区" prefecture="三亚市" province="海南省"
-460321 county="西沙群岛" prefecture="三沙市" province="海南省"
-460322 county="南沙群岛" prefecture="三沙市" province="海南省"
-460323 county="中沙群岛的岛礁及其海域" prefecture="三沙市" province="海南省"
-469001 county="五指山市" prefecture="省直辖县级行政区划" province="海南省"
-469002 county="琼海市" prefecture="省直辖县级行政区划" province="海南省"
-469003 county="儋州市" prefecture="省直辖县级行政区划" province="海南省"
-469005 county="文昌市" prefecture="省直辖县级行政区划" province="海南省"
-469006 county="万宁市" prefecture="省直辖县级行政区划" province="海南省"
-469007 county="东方市" prefecture="省直辖县级行政区划" province="海南省"
-469021 county="定安县" prefecture="省直辖县级行政区划" province="海南省"
-469022 county="屯昌县" prefecture="省直辖县级行政区划" province="海南省"
-469023 county="澄迈县" prefecture="省直辖县级行政区划" province="海南省"
-469024 county="临高县" prefecture="省直辖县级行政区划" province="海南省"
-469025 county="白沙黎族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469026 county="昌江黎族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469027 county="乐东黎族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469028 county="陵水黎族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469029 county="保亭黎族苗族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469030 county="琼中黎族苗族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469031 county="西沙群岛" prefecture="省直辖县级行政区划" province="海南省"
-469032 county="南沙群岛" prefecture="省直辖县级行政区划" province="海南省"
-469033 county="中沙群岛的岛礁及其海域" prefecture="省直辖县级行政区划" province="海南省"
-469034 county="陵水黎族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469035 county="保亭黎族苗族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469036 county="琼中黎族苗族自治县" prefecture="省直辖县级行政区划" province="海南省"
-469037 county="西沙群岛" prefecture="省直辖县级行政区划" province="海南省"
-469038 county="南沙群岛" prefecture="省直辖县级行政区划" province="海南省"
-469039 county="中沙群岛的岛礁及其海域" prefecture="省直辖县级行政区划" province="海南省"
-500101 county="万州区" prefecture="市辖区" province="重庆市"
-500102 county="涪陵区" prefecture="市辖区" province="重庆市"
-500103 county="渝中区" prefecture="市辖区" province="重庆市"
-500104 county="大渡口区" prefecture="市辖区" province="重庆市"
-500105 county="江北区" prefecture="市辖区" province="重庆市"
-500106 county="沙坪坝区" prefecture="市辖区" province="重庆市"
-500107 county="九龙坡区" prefecture="市辖区" province="重庆市"
-500108 county="南岸区" prefecture="市辖区" province="重庆市"
-500109 county="北碚区" prefecture="市辖区" province="重庆市"
-500110 county="綦江区" prefecture="市辖区" province="重庆市"
-500111 county="大足区" prefecture="市辖区" province="重庆市"
-500112 county="渝北区" prefecture="市辖区" province="重庆市"
-500113 county="巴南区" prefecture="市辖区" province="重庆市"
-500114 county="黔江区" prefecture="市辖区" province="重庆市"
-500115 county="长寿区" prefecture="市辖区" province="重庆市"
-500116 county="江津区" prefecture="市辖区" province="重庆市"
-500117 county="合川区" prefecture="市辖区" province="重庆市"
-500118 county="永川区" prefecture="市辖区" province="重庆市"
-500119 county="南川区" prefecture="市辖区" province="重庆市"
-500120 county="璧山区" prefecture="市辖区" province="重庆市"
-500151 county="铜梁区" prefecture="市辖区" province="重庆市"
-500222 county="綦江县" prefecture="县" province="重庆市"
-500223 county="潼南县" prefecture="县" province="重庆市"
-500224 county="铜梁县" prefecture="县" province="重庆市"
-500225 county="大足县" prefecture="县" province="重庆市"
-500226 county="荣昌县" prefecture="县" province="重庆市"
-500227 county="璧山县" prefecture="县" province="重庆市"
-500228 county="梁平县" prefecture="县" province="重庆市"
-500229 county="城口县" prefecture="县" province="重庆市"
-500230 county="丰都县" prefecture="县" province="重庆市"
-500231 county="垫江县" prefecture="县" province="重庆市"
-500232 county="武隆县" prefecture="县" province="重庆市"
-500233 county="忠县" prefecture="县" province="重庆市"
-500234 county="开县" prefecture="县" province="重庆市"
-500235 county="云阳县" prefecture="县" province="重庆市"
-500236 county="奉节县" prefecture="县" province="重庆市"
-500237 county="巫山县" prefecture="县" province="重庆市"
-500238 county="巫溪县" prefecture="县" province="重庆市"
-500240 county="石柱土家族自治县" prefecture="县" province="重庆市"
-500241 county="秀山土家族苗族自治县" prefecture="县" province="重庆市"
-500242 county="酉阳土家族苗族自治县" prefecture="县" province="重庆市"
-500243 county="彭水苗族土家族自治县" prefecture="县" province="重庆市"
-500381 county="江津市" prefecture="市" province="重庆市"
-500382 county="合川市" prefecture="市" province="重庆市"
-500383 county="永川市" prefecture="市" province="重庆市"
-500384 county="南川市" prefecture="市" province="重庆市"
-510101 county="市辖区" prefecture="成都市" province="四川省"
-510104 county="锦江区" prefecture="成都市" province="四川省"
-510105 county="青羊区" prefecture="成都市" province="四川省"
-510106 county="金牛区" prefecture="成都市" province="四川省"
-510107 county="武侯区" prefecture="成都市" province="四川省"
-510108 county="成华区" prefecture="成都市" province="四川省"
-510112 county="龙泉驿区" prefecture="成都市" province="四川省"
-510113 county="青白江区" prefecture="成都市" province="四川省"
-510114 county="新都区" prefecture="成都市" province="四川省"
-510115 county="温江区" prefecture="成都市" province="四川省"
-510121 county="金堂县" prefecture="成都市" province="四川省"
-510122 county="双流县" prefecture="成都市" province="四川省"
-510123 county="温江县" prefecture="成都市" province="四川省"
-510124 county="郫县" prefecture="成都市" province="四川省"
-510129 county="大邑县" prefecture="成都市" province="四川省"
-510131 county="蒲江县" prefecture="成都市" province="四川省"
-510132 county="新津县" prefecture="成都市" province="四川省"
-510181 county="都江堰市" prefecture="成都市" province="四川省"
-510182 county="彭州市" prefecture="成都市" province="四川省"
-510183 county="邛崃市" prefecture="成都市" province="四川省"
-510184 county="崇州市" prefecture="成都市" province="四川省"
-510301 county="市辖区" prefecture="自贡市" province="四川省"
-510302 county="自流井区" prefecture="自贡市" province="四川省"
-510303 county="贡井区" prefecture="自贡市" province="四川省"
-510304 county="大安区" prefecture="自贡市" province="四川省"
-510311 county="沿滩区" prefecture="自贡市" province="四川省"
-510321 county="荣县" prefecture="自贡市" province="四川省"
-510322 county="富顺县" prefecture="自贡市" province="四川省"
-510401 county="市辖区" prefecture="攀枝花市" province="四川省"
-510402 county="东区" prefecture="攀枝花市" province="四川省"
-510403 county="西区" prefecture="攀枝花市" province="四川省"
-510411 county="仁和区" prefecture="攀枝花市" province="四川省"
-510421 county="米易县" prefecture="攀枝花市" province="四川省"
-510422 county="盐边县" prefecture="攀枝花市" province="四川省"
-510501 county="市辖区" prefecture="泸州市" province="四川省"
-510502 county="江阳区" prefecture="泸州市" province="四川省"
-510503 county="纳溪区" prefecture="泸州市" province="四川省"
-510504 county="龙马潭区" prefecture="泸州市" province="四川省"
-510521 county="泸县" prefecture="泸州市" province="四川省"
-510522 county="合江县" prefecture="泸州市" province="四川省"
-510524 county="叙永县" prefecture="泸州市" province="四川省"
-510525 county="古蔺县" prefecture="泸州市" province="四川省"
-510601 county="市辖区" prefecture="德阳市" province="四川省"
-510603 county="旌阳区" prefecture="德阳市" province="四川省"
-510623 county="中江县" prefecture="德阳市" province="四川省"
-510626 county="罗江县" prefecture="德阳市" province="四川省"
-510681 county="广汉市" prefecture="德阳市" province="四川省"
-510682 county="什邡市" prefecture="德阳市" province="四川省"
-510683 county="绵竹市" prefecture="德阳市" province="四川省"
-510701 county="市辖区" prefecture="绵阳市" province="四川省"
-510703 county="涪城区" prefecture="绵阳市" province="四川省"
-510704 county="游仙区" prefecture="绵阳市" province="四川省"
-510722 county="三台县" prefecture="绵阳市" province="四川省"
-510723 county="盐亭县" prefecture="绵阳市" province="四川省"
-510724 county="安县" prefecture="绵阳市" province="四川省"
-510725 county="梓潼县" prefecture="绵阳市" province="四川省"
-510726 county="北川羌族自治县" prefecture="绵阳市" province="四川省"
-510727 county="平武县" prefecture="绵阳市" province="四川省"
-510781 county="江油市" prefecture="绵阳市" province="四川省"
-510801 county="市辖区" prefecture="广元市" province="四川省"
-510802 county="利州区" prefecture="广元市" province="四川省"
-510811 county="昭化区" prefecture="广元市" province="四川省"
-510812 county="朝天区" prefecture="广元市" province="四川省"
-510821 county="旺苍县" prefecture="广元市" province="四川省"
-510822 county="青川县" prefecture="广元市" province="四川省"
-510823 county="剑阁县" prefecture="广元市" province="四川省"
-510824 county="苍溪县" prefecture="广元市" province="四川省"
-510901 county="市辖区" prefecture="遂宁市" province="四川省"
-510902 county="市中区" prefecture="遂宁市" province="四川省"
-510903 county="船山区" prefecture="遂宁市" province="四川省"
-510904 county="安居区" prefecture="遂宁市" province="四川省"
-510921 county="蓬溪县" prefecture="遂宁市" province="四川省"
-510922 county="射洪县" prefecture="遂宁市" province="四川省"
-510923 county="大英县" prefecture="遂宁市" province="四川省"
-511001 county="市辖区" prefecture="内江市" province="四川省"
-511002 county="市中区" prefecture="内江市" province="四川省"
-511011 county="东兴区" prefecture="内江市" province="四川省"
-511024 county="威远县" prefecture="内江市" province="四川省"
-511025 county="资中县" prefecture="内江市" province="四川省"
-511028 county="隆昌县" prefecture="内江市" province="四川省"
-511101 county="市辖区" prefecture="乐山市" province="四川省"
-511102 county="市中区" prefecture="乐山市" province="四川省"
-511111 county="沙湾区" prefecture="乐山市" province="四川省"
-511112 county="五通桥区" prefecture="乐山市" province="四川省"
-511113 county="金口河区" prefecture="乐山市" province="四川省"
-511123 county="犍为县" prefecture="乐山市" province="四川省"
-511124 county="井研县" prefecture="乐山市" province="四川省"
-511126 county="夹江县" prefecture="乐山市" province="四川省"
-511129 county="沐川县" prefecture="乐山市" province="四川省"
-511132 county="峨边彝族自治县" prefecture="乐山市" province="四川省"
-511133 county="马边彝族自治县" prefecture="乐山市" province="四川省"
-511181 county="峨眉山市" prefecture="乐山市" province="四川省"
-511301 county="市辖区" prefecture="南充市" province="四川省"
-511302 county="顺庆区" prefecture="南充市" province="四川省"
-511303 county="高坪区" prefecture="南充市" province="四川省"
-511304 county="嘉陵区" prefecture="南充市" province="四川省"
-511321 county="南部县" prefecture="南充市" province="四川省"
-511322 county="营山县" prefecture="南充市" province="四川省"
-511323 county="蓬安县" prefecture="南充市" province="四川省"
-511324 county="仪陇县" prefecture="南充市" province="四川省"
-511325 county="西充县" prefecture="南充市" province="四川省"
-511381 county="阆中市" prefecture="南充市" province="四川省"
-511401 county="市辖区" prefecture="眉山市" province="四川省"
-511402 county="东坡区" prefecture="眉山市" province="四川省"
-511421 county="仁寿县" prefecture="眉山市" province="四川省"
-511422 county="彭山县" prefecture="眉山市" province="四川省"
-511423 county="洪雅县" prefecture="眉山市" province="四川省"
-511424 county="丹棱县" prefecture="眉山市" province="四川省"
-511425 county="青神县" prefecture="眉山市" province="四川省"
-511501 county="市辖区" prefecture="宜宾市" province="四川省"
-511502 county="翠屏区" prefecture="宜宾市" province="四川省"
-511503 county="南溪区" prefecture="宜宾市" province="四川省"
-511521 county="宜宾县" prefecture="宜宾市" province="四川省"
-511522 county="南溪县" prefecture="宜宾市" province="四川省"
-511523 county="江安县" prefecture="宜宾市" province="四川省"
-511524 county="长宁县" prefecture="宜宾市" province="四川省"
-511525 county="高县" prefecture="宜宾市" province="四川省"
-511526 county="珙县" prefecture="宜宾市" province="四川省"
-511527 county="筠连县" prefecture="宜宾市" province="四川省"
-511528 county="兴文县" prefecture="宜宾市" province="四川省"
-511529 county="屏山县" prefecture="宜宾市" province="四川省"
-511601 county="市辖区" prefecture="广安市" province="四川省"
-511602 county="广安区" prefecture="广安市" province="四川省"
-511603 county="前锋区" prefecture="广安市" province="四川省"
-511621 county="岳池县" prefecture="广安市" province="四川省"
-511622 county="武胜县" prefecture="广安市" province="四川省"
-511623 county="邻水县" prefecture="广安市" province="四川省"
-511681 county="华蓥市" prefecture="广安市" province="四川省"
-511701 county="市辖区" prefecture="达州市" province="四川省"
-511702 county="通川区" prefecture="达州市" province="四川省"
-511703 county="达川区" prefecture="达州市" province="四川省"
-511721 county="达县" prefecture="达州市" province="四川省"
-511722 county="宣汉县" prefecture="达州市" province="四川省"
-511723 county="开江县" prefecture="达州市" province="四川省"
-511724 county="大竹县" prefecture="达州市" province="四川省"
-511725 county="渠县" prefecture="达州市" province="四川省"
-511781 county="万源市" prefecture="达州市" province="四川省"
-511801 county="市辖区" prefecture="雅安市" province="四川省"
-511802 county="雨城区" prefecture="雅安市" province="四川省"
-511803 county="名山区" prefecture="雅安市" province="四川省"
-511821 county="名山县" prefecture="雅安市" province="四川省"
-511822 county="荥经县" prefecture="雅安市" province="四川省"
-511823 county="汉源县" prefecture="雅安市" province="四川省"
-511824 county="石棉县" prefecture="雅安市" province="四川省"
-511825 county="天全县" prefecture="雅安市" province="四川省"
-511826 county="芦山县" prefecture="雅安市" province="四川省"
-511827 county="宝兴县" prefecture="雅安市" province="四川省"
-511901 county="市辖区" prefecture="巴中市" province="四川省"
-511902 county="巴州区" prefecture="巴中市" province="四川省"
-511903 county="恩阳区" prefecture="巴中市" province="四川省"
-511921 county="通江县" prefecture="巴中市" province="四川省"
-511922 county="南江县" prefecture="巴中市" province="四川省"
-511923 county="平昌县" prefecture="巴中市" province="四川省"
-512001 county="市辖区" prefecture="资阳市" province="四川省"
-512002 county="雁江区" prefecture="资阳市" province="四川省"
-512021 county="安岳县" prefecture="资阳市" province="四川省"
-512022 county="乐至县" prefecture="资阳市" province="四川省"
-512081 county="简阳市" prefecture="资阳市" province="四川省"
-513221 county="汶川县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513222 county="理县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513223 county="茂县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513224 county="松潘县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513225 county="九寨沟县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513226 county="金川县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513227 county="小金县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513228 county="黑水县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513229 county="马尔康县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513230 county="壤塘县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513231 county="阿坝县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513232 county="若尔盖县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513233 county="红原县" prefecture="阿坝藏族羌族自治州" province="四川省"
-513321 county="康定县" prefecture="甘孜藏族自治州" province="四川省"
-513322 county="泸定县" prefecture="甘孜藏族自治州" province="四川省"
-513323 county="丹巴县" prefecture="甘孜藏族自治州" province="四川省"
-513324 county="九龙县" prefecture="甘孜藏族自治州" province="四川省"
-513325 county="雅江县" prefecture="甘孜藏族自治州" province="四川省"
-513326 county="道孚县" prefecture="甘孜藏族自治州" province="四川省"
-513327 county="炉霍县" prefecture="甘孜藏族自治州" province="四川省"
-513328 county="甘孜县" prefecture="甘孜藏族自治州" province="四川省"
-513329 county="新龙县" prefecture="甘孜藏族自治州" province="四川省"
-513330 county="德格县" prefecture="甘孜藏族自治州" province="四川省"
-513331 county="白玉县" prefecture="甘孜藏族自治州" province="四川省"
-513332 county="石渠县" prefecture="甘孜藏族自治州" province="四川省"
-513333 county="色达县" prefecture="甘孜藏族自治州" province="四川省"
-513334 county="理塘县" prefecture="甘孜藏族自治州" province="四川省"
-513335 county="巴塘县" prefecture="甘孜藏族自治州" province="四川省"
-513336 county="乡城县" prefecture="甘孜藏族自治州" province="四川省"
-513337 county="稻城县" prefecture="甘孜藏族自治州" province="四川省"
-513338 county="得荣县" prefecture="甘孜藏族自治州" province="四川省"
-513401 county="西昌市" prefecture="凉山彝族自治州" province="四川省"
-513422 county="木里藏族自治县" prefecture="凉山彝族自治州" province="四川省"
-513423 county="盐源县" prefecture="凉山彝族自治州" province="四川省"
-513424 county="德昌县" prefecture="凉山彝族自治州" province="四川省"
-513425 county="会理县" prefecture="凉山彝族自治州" province="四川省"
-513426 county="会东县" prefecture="凉山彝族自治州" province="四川省"
-513427 county="宁南县" prefecture="凉山彝族自治州" province="四川省"
-513428 county="普格县" prefecture="凉山彝族自治州" province="四川省"
-513429 county="布拖县" prefecture="凉山彝族自治州" province="四川省"
-513430 county="金阳县" prefecture="凉山彝族自治州" province="四川省"
-513431 county="昭觉县" prefecture="凉山彝族自治州" province="四川省"
-513432 county="喜德县" prefecture="凉山彝族自治州" province="四川省"
-513433 county="冕宁县" prefecture="凉山彝族自治州" province="四川省"
-513434 county="越西县" prefecture="凉山彝族自治州" province="四川省"
-513435 county="甘洛县" prefecture="凉山彝族自治州" province="四川省"
-513436 county="美姑县" prefecture="凉山彝族自治州" province="四川省"
-513437 county="雷波县" prefecture="凉山彝族自治州" province="四川省"
-520101 county="市辖区" prefecture="贵阳市" province="贵州省"
-520102 county="南明区" prefecture="贵阳市" province="贵州省"
-520103 county="云岩区" prefecture="贵阳市" province="贵州省"
-520111 county="花溪区" prefecture="贵阳市" province="贵州省"
-520112 county="乌当区" prefecture="贵阳市" province="贵州省"
-520113 county="白云区" prefecture="贵阳市" province="贵州省"
-520114 county="小河区" prefecture="贵阳市" province="贵州省"
-520115 county="观山湖区" prefecture="贵阳市" province="贵州省"
-520121 county="开阳县" prefecture="贵阳市" province="贵州省"
-520122 county="息烽县" prefecture="贵阳市" province="贵州省"
-520123 county="修文县" prefecture="贵阳市" province="贵州省"
-520181 county="清镇市" prefecture="贵阳市" province="贵州省"
-520201 county="钟山区" prefecture="六盘水市" province="贵州省"
-520203 county="六枝特区" prefecture="六盘水市" province="贵州省"
-520221 county="水城县" prefecture="六盘水市" province="贵州省"
-520222 county="盘县" prefecture="六盘水市" province="贵州省"
-520301 county="市辖区" prefecture="遵义市" province="贵州省"
-520302 county="红花岗区" prefecture="遵义市" province="贵州省"
-520303 county="汇川区" prefecture="遵义市" province="贵州省"
-520321 county="遵义县" prefecture="遵义市" province="贵州省"
-520322 county="桐梓县" prefecture="遵义市" province="贵州省"
-520323 county="绥阳县" prefecture="遵义市" province="贵州省"
-520324 county="正安县" prefecture="遵义市" province="贵州省"
-520325 county="道真仡佬族苗族自治县" prefecture="遵义市" province="贵州省"
-520326 county="务川仡佬族苗族自治县" prefecture="遵义市" province="贵州省"
-520327 county="凤冈县" prefecture="遵义市" province="贵州省"
-520328 county="湄潭县" prefecture="遵义市" province="贵州省"
-520329 county="余庆县" prefecture="遵义市" province="贵州省"
-520330 county="习水县" prefecture="遵义市" province="贵州省"
-520381 county="赤水市" prefecture="遵义市" province="贵州省"
-520382 county="仁怀市" prefecture="遵义市" province="贵州省"
-520401 county="市辖区" prefecture="安顺市" province="贵州省"
-520402 county="西秀区" prefecture="安顺市" province="贵州省"
-520421 county="平坝县" prefecture="安顺市" province="贵州省"
-520422 county="普定县" prefecture="安顺市" province="贵州省"
-520423 county="镇宁布依族苗族自治县" prefecture="安顺市" province="贵州省"
-520424 county="关岭布依族苗族自治县" prefecture="安顺市" province="贵州省"
-520425 county="紫云苗族布依族自治县" prefecture="安顺市" province="贵州省"
-520501 county="市辖区" prefecture="毕节市" province="贵州省"
-520502 county="七星关区" prefecture="毕节市" province="贵州省"
-520521 county="大方县" prefecture="毕节市" province="贵州省"
-520522 county="黔西县" prefecture="毕节市" province="贵州省"
-520523 county="金沙县" prefecture="毕节市" province="贵州省"
-520524 county="织金县" prefecture="毕节市" province="贵州省"
-520525 county="纳雍县" prefecture="毕节市" province="贵州省"
-520526 county="威宁彝族回族苗族自治县" prefecture="毕节市" province="贵州省"
-520527 county="赫章县" prefecture="毕节市" province="贵州省"
-520601 county="市辖区" prefecture="铜仁市" province="贵州省"
-520602 county="碧江区" prefecture="铜仁市" province="贵州省"
-520603 county="万山区" prefecture="铜仁市" province="贵州省"
-520621 county="江口县" prefecture="铜仁市" province="贵州省"
-520622 county="玉屏侗族自治县" prefecture="铜仁市" province="贵州省"
-520623 county="石阡县" prefecture="铜仁市" province="贵州省"
-520624 county="思南县" prefecture="铜仁市" province="贵州省"
-520625 county="印江土家族苗族自治县" prefecture="铜仁市" province="贵州省"
-520626 county="德江县" prefecture="铜仁市" province="贵州省"
-520627 county="沿河土家族自治县" prefecture="铜仁市" province="贵州省"
-520628 county="松桃苗族自治县" prefecture="铜仁市" province="贵州省"
-522201 county="铜仁市" prefecture="铜仁地区" province="贵州省"
-522222 county="江口县" prefecture="铜仁地区" province="贵州省"
-522223 county="玉屏侗族自治县" prefecture="铜仁地区" province="贵州省"
-522224 county="石阡县" prefecture="铜仁地区" province="贵州省"
-522225 county="思南县" prefecture="铜仁地区" province="贵州省"
-522226 county="印江土家族苗族自治县" prefecture="铜仁地区" province="贵州省"
-522227 county="德江县" prefecture="铜仁地区" province="贵州省"
-522228 county="沿河土家族自治县" prefecture="铜仁地区" province="贵州省"
-522229 county="松桃苗族自治县" prefecture="铜仁地区" province="贵州省"
-522230 county="万山特区" prefecture="铜仁地区" province="贵州省"
-522301 county="兴义市" prefecture="黔西南布依族苗族自治州" province="贵州省"
-522322 county="兴仁县" prefecture="黔西南布依族苗族自治州" province="贵州省"
-522323 county="普安县" prefecture="黔西南布依族苗族自治州" province="贵州省"
-522324 county="晴隆县" prefecture="黔西南布依族苗族自治州" province="贵州省"
-522325 county="贞丰县" prefecture="黔西南布依族苗族自治州" province="贵州省"
-522326 county="望谟县" prefecture="黔西南布依族苗族自治州" province="贵州省"
-522327 county="册亨县" prefecture="黔西南布依族苗族自治州" province="贵州省"
-522328 county="安龙县" prefecture="黔西南布依族苗族自治州" province="贵州省"
-522401 county="毕节市" prefecture="毕节地区" province="贵州省"
-522422 county="大方县" prefecture="毕节地区" province="贵州省"
-522423 county="黔西县" prefecture="毕节地区" province="贵州省"
-522424 county="金沙县" prefecture="毕节地区" province="贵州省"
-522425 county="织金县" prefecture="毕节地区" province="贵州省"
-522426 county="纳雍县" prefecture="毕节地区" province="贵州省"
-522427 county="威宁彝族回族苗族自治县" prefecture="毕节地区" province="贵州省"
-522428 county="赫章县" prefecture="毕节地区" province="贵州省"
-522601 county="凯里市" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522622 county="黄平县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522623 county="施秉县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522624 county="三穗县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522625 county="镇远县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522626 county="岑巩县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522627 county="天柱县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522628 county="锦屏县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522629 county="剑河县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522630 county="台江县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522631 county="黎平县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522632 county="榕江县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522633 county="从江县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522634 county="雷山县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522635 county="麻江县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522636 county="丹寨县" prefecture="黔东南苗族侗族自治州" province="贵州省"
-522701 county="都匀市" prefecture="黔南布依族苗族自治州" province="贵州省"
-522702 county="福泉市" prefecture="黔南布依族苗族自治州" province="贵州省"
-522722 county="荔波县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522723 county="贵定县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522725 county="瓮安县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522726 county="独山县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522727 county="平塘县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522728 county="罗甸县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522729 county="长顺县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522730 county="龙里县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522731 county="惠水县" prefecture="黔南布依族苗族自治州" province="贵州省"
-522732 county="三都水族自治县" prefecture="黔南布依族苗族自治州" province="贵州省"
-530101 county="市辖区" prefecture="昆明市" province="云南省"
-530102 county="五华区" prefecture="昆明市" province="云南省"
-530103 county="盘龙区" prefecture="昆明市" province="云南省"
-530111 county="官渡区" prefecture="昆明市" province="云南省"
-530112 county="西山区" prefecture="昆明市" province="云南省"
-530113 county="东川区" prefecture="昆明市" province="云南省"
-530114 county="呈贡区" prefecture="昆明市" province="云南省"
-530121 county="呈贡县" prefecture="昆明市" province="云南省"
-530122 county="晋宁县" prefecture="昆明市" province="云南省"
-530124 county="富民县" prefecture="昆明市" province="云南省"
-530125 county="宜良县" prefecture="昆明市" province="云南省"
-530126 county="石林彝族自治县" prefecture="昆明市" province="云南省"
-530127 county="嵩明县" prefecture="昆明市" province="云南省"
-530128 county="禄劝彝族苗族自治县" prefecture="昆明市" province="云南省"
-530129 county="寻甸回族彝族自治县" prefecture="昆明市" province="云南省"
-530181 county="安宁市" prefecture="昆明市" province="云南省"
-530301 county="市辖区" prefecture="曲靖市" province="云南省"
-530302 county="麒麟区" prefecture="曲靖市" province="云南省"
-530321 county="马龙县" prefecture="曲靖市" province="云南省"
-530322 county="陆良县" prefecture="曲靖市" province="云南省"
-530323 county="师宗县" prefecture="曲靖市" province="云南省"
-530324 county="罗平县" prefecture="曲靖市" province="云南省"
-530325 county="富源县" prefecture="曲靖市" province="云南省"
-530326 county="会泽县" prefecture="曲靖市" province="云南省"
-530328 county="沾益县" prefecture="曲靖市" province="云南省"
-530381 county="宣威市" prefecture="曲靖市" province="云南省"
-530401 county="市辖区" prefecture="玉溪市" province="云南省"
-530402 county="红塔区" prefecture="玉溪市" province="云南省"
-530421 county="江川县" prefecture="玉溪市" province="云南省"
-530422 county="澄江县" prefecture="玉溪市" province="云南省"
-530423 county="通海县" prefecture="玉溪市" province="云南省"
-530424 county="华宁县" prefecture="玉溪市" province="云南省"
-530425 county="易门县" prefecture="玉溪市" province="云南省"
-530426 county="峨山彝族自治县" prefecture="玉溪市" province="云南省"
-530427 county="新平彝族傣族自治县" prefecture="玉溪市" province="云南省"
-530428 county="元江哈尼族彝族傣族自治县" prefecture="玉溪市" province="云南省"
-530501 county="市辖区" prefecture="保山市" province="云南省"
-530502 county="隆阳区" prefecture="保山市" province="云南省"
-530521 county="施甸县" prefecture="保山市" province="云南省"
-530522 county="腾冲县" prefecture="保山市" province="云南省"
-530523 county="龙陵县" prefecture="保山市" province="云南省"
-530524 county="昌宁县" prefecture="保山市" province="云南省"
-530601 county="市辖区" prefecture="昭通市" province="云南省"
-530602 county="昭阳区" prefecture="昭通市" province="云南省"
-530621 county="鲁甸县" prefecture="昭通市" province="云南省"
-530622 county="巧家县" prefecture="昭通市" province="云南省"
-530623 county="盐津县" prefecture="昭通市" province="云南省"
-530624 county="大关县" prefecture="昭通市" province="云南省"
-530625 county="永善县" prefecture="昭通市" province="云南省"
-530626 county="绥江县" prefecture="昭通市" province="云南省"
-530627 county="镇雄县" prefecture="昭通市" province="云南省"
-530628 county="彝良县" prefecture="昭通市" province="云南省"
-530629 county="威信县" prefecture="昭通市" province="云南省"
-530630 county="水富县" prefecture="昭通市" province="云南省"
-530701 county="市辖区" prefecture="丽江市" province="云南省"
-530702 county="古城区" prefecture="丽江市" province="云南省"
-530721 county="玉龙纳西族自治县" prefecture="丽江市" province="云南省"
-530722 county="永胜县" prefecture="丽江市" province="云南省"
-530723 county="华坪县" prefecture="丽江市" province="云南省"
-530724 county="宁蒗彝族自治县" prefecture="丽江市" province="云南省"
-530801 county="市辖区" prefecture="普洱市" province="云南省"
-530802 county="思茅区" prefecture="普洱市" province="云南省"
-530821 county="宁洱哈尼族彝族自治县" prefecture="普洱市" province="云南省"
-530822 county="墨江哈尼族自治县" prefecture="普洱市" province="云南省"
-530823 county="景东彝族自治县" prefecture="普洱市" province="云南省"
-530824 county="景谷傣族彝族自治县" prefecture="普洱市" province="云南省"
-530825 county="镇沅彝族哈尼族拉祜族自治县" prefecture="普洱市" province="云南省"
-530826 county="江城哈尼族彝族自治县" prefecture="普洱市" province="云南省"
-530827 county="孟连傣族拉祜族佤族自治县" prefecture="普洱市" province="云南省"
-530828 county="澜沧拉祜族自治县" prefecture="普洱市" province="云南省"
-530829 county="西盟佤族自治县" prefecture="普洱市" province="云南省"
-530901 county="市辖区" prefecture="临沧市" province="云南省"
-530902 county="临翔区" prefecture="临沧市" province="云南省"
-530921 county="凤庆县" prefecture="临沧市" province="云南省"
-530922 county="云县" prefecture="临沧市" province="云南省"
-530923 county="永德县" prefecture="临沧市" province="云南省"
-530924 county="镇康县" prefecture="临沧市" province="云南省"
-530925 county="双江拉祜族佤族布朗族傣族自治县" prefecture="临沧市" province="云南省"
-530926 county="耿马傣族佤族自治县" prefecture="临沧市" province="云南省"
-530927 county="沧源佤族自治县" prefecture="临沧市" province="云南省"
-532301 county="楚雄市" prefecture="楚雄彝族自治州" province="云南省"
-532322 county="双柏县" prefecture="楚雄彝族自治州" province="云南省"
-532323 county="牟定县" prefecture="楚雄彝族自治州" province="云南省"
-532324 county="南华县" prefecture="楚雄彝族自治州" province="云南省"
-532325 county="姚安县" prefecture="楚雄彝族自治州" province="云南省"
-532326 county="大姚县" prefecture="楚雄彝族自治州" province="云南省"
-532327 county="永仁县" prefecture="楚雄彝族自治州" province="云南省"
-532328 county="元谋县" prefecture="楚雄彝族自治州" province="云南省"
-532329 county="武定县" prefecture="楚雄彝族自治州" province="云南省"
-532331 county="禄丰县" prefecture="楚雄彝族自治州" province="云南省"
-532501 county="个旧市" prefecture="红河哈尼族彝族自治州" province="云南省"
-532502 county="开远市" prefecture="红河哈尼族彝族自治州" province="云南省"
-532503 county="蒙自市" prefecture="红河哈尼族彝族自治州" province="云南省"
-532504 county="弥勒市" prefecture="红河哈尼族彝族自治州" province="云南省"
-532522 county="蒙自县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532523 county="屏边苗族自治县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532524 county="建水县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532525 county="石屏县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532526 county="弥勒县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532527 county="泸西县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532528 county="元阳县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532529 county="红河县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532530 county="金平苗族瑶族傣族自治县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532531 county="绿春县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532532 county="河口瑶族自治县" prefecture="红河哈尼族彝族自治州" province="云南省"
-532601 county="文山市" prefecture="文山壮族苗族自治州" province="云南省"
-532621 county="文山县" prefecture="文山壮族苗族自治州" province="云南省"
-532622 county="砚山县" prefecture="文山壮族苗族自治州" province="云南省"
-532623 county="西畴县" prefecture="文山壮族苗族自治州" province="云南省"
-532624 county="麻栗坡县" prefecture="文山壮族苗族自治州" province="云南省"
-532625 county="马关县" prefecture="文山壮族苗族自治州" province="云南省"
-532626 county="丘北县" prefecture="文山壮族苗族自治州" province="云南省"
-532627 county="广南县" prefecture="文山壮族苗族自治州" province="云南省"
-532628 county="富宁县" prefecture="文山壮族苗族自治州" province="云南省"
-532701 county="思茅市" prefecture="思茅地区" province="云南省"
-532722 county="普洱哈尼族彝族自治县" prefecture="思茅地区" province="云南省"
-532723 county="墨江哈尼族自治县" prefecture="思茅地区" province="云南省"
-532724 county="景东彝族自治县" prefecture="思茅地区" province="云南省"
-532725 county="景谷傣族彝族自治县" prefecture="思茅地区" province="云南省"
-532726 county="镇沅彝族哈尼族拉祜族自治县" prefecture="思茅地区" province="云南省"
-532727 county="江城哈尼族彝族自治县" prefecture="思茅地区" province="云南省"
-532728 county="孟连傣族拉祜族佤族自治县" prefecture="思茅地区" province="云南省"
-532729 county="澜沧拉祜族自治县" prefecture="思茅地区" province="云南省"
-532730 county="西盟佤族自治县" prefecture="思茅地区" province="云南省"
-532801 county="景洪市" prefecture="西双版纳傣族自治州" province="云南省"
-532822 county="勐海县" prefecture="西双版纳傣族自治州" province="云南省"
-532823 county="勐腊县" prefecture="西双版纳傣族自治州" province="云南省"
-532901 county="大理市" prefecture="大理白族自治州" province="云南省"
-532922 county="漾濞彝族自治县" prefecture="大理白族自治州" province="云南省"
-532923 county="祥云县" prefecture="大理白族自治州" province="云南省"
-532924 county="宾川县" prefecture="大理白族自治州" province="云南省"
-532925 county="弥渡县" prefecture="大理白族自治州" province="云南省"
-532926 county="南涧彝族自治县" prefecture="大理白族自治州" province="云南省"
-532927 county="巍山彝族回族自治县" prefecture="大理白族自治州" province="云南省"
-532928 county="永平县" prefecture="大理白族自治州" province="云南省"
-532929 county="云龙县" prefecture="大理白族自治州" province="云南省"
-532930 county="洱源县" prefecture="大理白族自治州" province="云南省"
-532931 county="剑川县" prefecture="大理白族自治州" province="云南省"
-532932 county="鹤庆县" prefecture="大理白族自治州" province="云南省"
-533102 county="瑞丽市" prefecture="德宏傣族景颇族自治州" province="云南省"
-533103 county="芒市" prefecture="德宏傣族景颇族自治州" province="云南省"
-533122 county="梁河县" prefecture="德宏傣族景颇族自治州" province="云南省"
-533123 county="盈江县" prefecture="德宏傣族景颇族自治州" province="云南省"
-533124 county="陇川县" prefecture="德宏傣族景颇族自治州" province="云南省"
-533321 county="泸水县" prefecture="怒江傈僳族自治州" province="云南省"
-533323 county="福贡县" prefecture="怒江傈僳族自治州" province="云南省"
-533324 county="贡山独龙族怒族自治县" prefecture="怒江傈僳族自治州" province="云南省"
-533325 county="兰坪白族普米族自治县" prefecture="怒江傈僳族自治州" province="云南省"
-533421 county="香格里拉县" prefecture="迪庆藏族自治州" province="云南省"
-533422 county="德钦县" prefecture="迪庆藏族自治州" province="云南省"
-533423 county="维西傈僳族自治县" prefecture="迪庆藏族自治州" province="云南省"
-533521 county="临沧县" prefecture="临沧地区" province="云南省"
-533522 county="凤庆县" prefecture="临沧地区" province="云南省"
-533523 county="云县" prefecture="临沧地区" province="云南省"
-533524 county="永德县" prefecture="临沧地区" province="云南省"
-533525 county="镇康县" prefecture="临沧地区" province="云南省"
-533526 county="双江拉祜族佤族布朗族傣族自治县" prefecture="临沧地区" province="云南省"
-533527 county="耿马傣族佤族自治县" prefecture="临沧地区" province="云南省"
-533528 county="沧源佤族自治县" prefecture="临沧地区" province="云南省"
-540101 county="市辖区" prefecture="拉萨市" province="西藏自治区"
-540102 county="城关区" prefecture="拉萨市" province="西藏自治区"
-540121 county="林周县" prefecture="拉萨市" province="西藏自治区"
-540122 county="当雄县" prefecture="拉萨市" province="西藏自治区"
-540123 county="尼木县" prefecture="拉萨市" province="西藏自治区"
-540124 county="曲水县" prefecture="拉萨市" province="西藏自治区"
-540125 county="堆龙德庆县" prefecture="拉萨市" province="西藏自治区"
-540126 county="达孜县" prefecture="拉萨市" province="西藏自治区"
-540127 county="墨竹工卡县" prefecture="拉萨市" province="西藏自治区"
-540202 county="桑珠孜区" prefecture="日喀则市" province="西藏自治区"
-540221 county="南木林县" prefecture="日喀则市" province="西藏自治区"
-540222 county="江孜县" prefecture="日喀则市" province="西藏自治区"
-540223 county="定日县" prefecture="日喀则市" province="西藏自治区"
-540224 county="萨迦县" prefecture="日喀则市" province="西藏自治区"
-540225 county="拉孜县" prefecture="日喀则市" province="西藏自治区"
-540226 county="昂仁县" prefecture="日喀则市" province="西藏自治区"
-540227 county="谢通门县" prefecture="日喀则市" province="西藏自治区"
-540228 county="白朗县" prefecture="日喀则市" province="西藏自治区"
-540229 county="仁布县" prefecture="日喀则市" province="西藏自治区"
-540230 county="康马县" prefecture="日喀则市" province="西藏自治区"
-540231 county="定结县" prefecture="日喀则市" province="西藏自治区"
-540232 county="仲巴县" prefecture="日喀则市" province="西藏自治区"
-540233 county="亚东县" prefecture="日喀则市" province="西藏自治区"
-540234 county="吉隆县" prefecture="日喀则市" province="西藏自治区"
-540235 county="聂拉木县" prefecture="日喀则市" province="西藏自治区"
-540236 county="萨嘎县" prefecture="日喀则市" province="西藏自治区"
-540237 county="岗巴县" prefecture="日喀则市" province="西藏自治区"
-542121 county="昌都县" prefecture="昌都地区" province="西藏自治区"
-542122 county="江达县" prefecture="昌都地区" province="西藏自治区"
-542123 county="贡觉县" prefecture="昌都地区" province="西藏自治区"
-542124 county="类乌齐县" prefecture="昌都地区" province="西藏自治区"
-542125 county="丁青县" prefecture="昌都地区" province="西藏自治区"
-542126 county="察雅县" prefecture="昌都地区" province="西藏自治区"
-542127 county="八宿县" prefecture="昌都地区" province="西藏自治区"
-542128 county="左贡县" prefecture="昌都地区" province="西藏自治区"
-542129 county="芒康县" prefecture="昌都地区" province="西藏自治区"
-542132 county="洛隆县" prefecture="昌都地区" province="西藏自治区"
-542133 county="边坝县" prefecture="昌都地区" province="西藏自治区"
-542221 county="乃东县" prefecture="山南地区" province="西藏自治区"
-542222 county="扎囊县" prefecture="山南地区" province="西藏自治区"
-542223 county="贡嘎县" prefecture="山南地区" province="西藏自治区"
-542224 county="桑日县" prefecture="山南地区" province="西藏自治区"
-542225 county="琼结县" prefecture="山南地区" province="西藏自治区"
-542226 county="曲松县" prefecture="山南地区" province="西藏自治区"
-542227 county="措美县" prefecture="山南地区" province="西藏自治区"
-542228 county="洛扎县" prefecture="山南地区" province="西藏自治区"
-542229 county="加查县" prefecture="山南地区" province="西藏自治区"
-542231 county="隆子县" prefecture="山南地区" province="西藏自治区"
-542232 county="错那县" prefecture="山南地区" province="西藏自治区"
-542233 county="浪卡子县" prefecture="山南地区" province="西藏自治区"
-542301 county="日喀则市" prefecture="日喀则地区" province="西藏自治区"
-542322 county="南木林县" prefecture="日喀则地区" province="西藏自治区"
-542323 county="江孜县" prefecture="日喀则地区" province="西藏自治区"
-542324 county="定日县" prefecture="日喀则地区" province="西藏自治区"
-542325 county="萨迦县" prefecture="日喀则地区" province="西藏自治区"
-542326 county="拉孜县" prefecture="日喀则地区" province="西藏自治区"
-542327 county="昂仁县" prefecture="日喀则地区" province="西藏自治区"
-542328 county="谢通门县" prefecture="日喀则地区" province="西藏自治区"
-542329 county="白朗县" prefecture="日喀则地区" province="西藏自治区"
-542330 county="仁布县" prefecture="日喀则地区" province="西藏自治区"
-542331 county="康马县" prefecture="日喀则地区" province="西藏自治区"
-542332 county="定结县" prefecture="日喀则地区" province="西藏自治区"
-542333 county="仲巴县" prefecture="日喀则地区" province="西藏自治区"
-542334 county="亚东县" prefecture="日喀则地区" province="西藏自治区"
-542335 county="吉隆县" prefecture="日喀则地区" province="西藏自治区"
-542336 county="聂拉木县" prefecture="日喀则地区" province="西藏自治区"
-542337 county="萨嘎县" prefecture="日喀则地区" province="西藏自治区"
-542338 county="岗巴县" prefecture="日喀则地区" province="西藏自治区"
-542421 county="那曲县" prefecture="那曲地区" province="西藏自治区"
-542422 county="嘉黎县" prefecture="那曲地区" province="西藏自治区"
-542423 county="比如县" prefecture="那曲地区" province="西藏自治区"
-542424 county="聂荣县" prefecture="那曲地区" province="西藏自治区"
-542425 county="安多县" prefecture="那曲地区" province="西藏自治区"
-542426 county="申扎县" prefecture="那曲地区" province="西藏自治区"
-542427 county="索县" prefecture="那曲地区" province="西藏自治区"
-542428 county="班戈县" prefecture="那曲地区" province="西藏自治区"
-542429 county="巴青县" prefecture="那曲地区" province="西藏自治区"
-542430 county="尼玛县" prefecture="那曲地区" province="西藏自治区"
-542431 county="双湖县" prefecture="那曲地区" province="西藏自治区"
-542521 county="普兰县" prefecture="阿里地区" province="西藏自治区"
-542522 county="札达县" prefecture="阿里地区" province="西藏自治区"
-542523 county="噶尔县" prefecture="阿里地区" province="西藏自治区"
-542524 county="日土县" prefecture="阿里地区" province="西藏自治区"
-542525 county="革吉县" prefecture="阿里地区" province="西藏自治区"
-542526 county="改则县" prefecture="阿里地区" province="西藏自治区"
-542527 county="措勤县" prefecture="阿里地区" province="西藏自治区"
-542621 county="林芝县" prefecture="林芝地区" province="西藏自治区"
-542622 county="工布江达县" prefecture="林芝地区" province="西藏自治区"
-542623 county="米林县" prefecture="林芝地区" province="西藏自治区"
-542624 county="墨脱县" prefecture="林芝地区" province="西藏自治区"
-542625 county="波密县" prefecture="林芝地区" province="西藏自治区"
-542626 county="察隅县" prefecture="林芝地区" province="西藏自治区"
-542627 county="朗县" prefecture="林芝地区" province="西藏自治区"
-610101 county="市辖区" prefecture="西安市" province="陕西省"
-610102 county="新城区" prefecture="西安市" province="陕西省"
-610103 county="碑林区" prefecture="西安市" province="陕西省"
-610104 county="莲湖区" prefecture="西安市" province="陕西省"
-610111 county="灞桥区" prefecture="西安市" province="陕西省"
-610112 county="未央区" prefecture="西安市" province="陕西省"
-610113 county="雁塔区" prefecture="西安市" province="陕西省"
-610114 county="阎良区" prefecture="西安市" province="陕西省"
-610115 county="临潼区" prefecture="西安市" province="陕西省"
-610116 county="长安区" prefecture="西安市" province="陕西省"
-610122 county="蓝田县" prefecture="西安市" province="陕西省"
-610124 county="周至县" prefecture="西安市" province="陕西省"
-610125 county="户县" prefecture="西安市" province="陕西省"
-610126 county="高陵县" prefecture="西安市" province="陕西省"
-610201 county="市辖区" prefecture="铜川市" province="陕西省"
-610202 county="王益区" prefecture="铜川市" province="陕西省"
-610203 county="印台区" prefecture="铜川市" province="陕西省"
-610204 county="耀州区" prefecture="铜川市" province="陕西省"
-610222 county="宜君县" prefecture="铜川市" province="陕西省"
-610301 county="市辖区" prefecture="宝鸡市" province="陕西省"
-610302 county="渭滨区" prefecture="宝鸡市" province="陕西省"
-610303 county="金台区" prefecture="宝鸡市" province="陕西省"
-610304 county="陈仓区" prefecture="宝鸡市" province="陕西省"
-610321 county="宝鸡县" prefecture="宝鸡市" province="陕西省"
-610322 county="凤翔县" prefecture="宝鸡市" province="陕西省"
-610323 county="岐山县" prefecture="宝鸡市" province="陕西省"
-610324 county="扶风县" prefecture="宝鸡市" province="陕西省"
-610326 county="眉县" prefecture="宝鸡市" province="陕西省"
-610327 county="陇县" prefecture="宝鸡市" province="陕西省"
-610328 county="千阳县" prefecture="宝鸡市" province="陕西省"
-610329 county="麟游县" prefecture="宝鸡市" province="陕西省"
-610330 county="凤县" prefecture="宝鸡市" province="陕西省"
-610331 county="太白县" prefecture="宝鸡市" province="陕西省"
-610401 county="市辖区" prefecture="咸阳市" province="陕西省"
-610402 county="秦都区" prefecture="咸阳市" province="陕西省"
-610403 county="杨陵区" prefecture="咸阳市" province="陕西省"
-610404 county="渭城区" prefecture="咸阳市" province="陕西省"
-610422 county="三原县" prefecture="咸阳市" province="陕西省"
-610423 county="泾阳县" prefecture="咸阳市" province="陕西省"
-610424 county="乾县" prefecture="咸阳市" province="陕西省"
-610425 county="礼泉县" prefecture="咸阳市" province="陕西省"
-610426 county="永寿县" prefecture="咸阳市" province="陕西省"
-610427 county="彬县" prefecture="咸阳市" province="陕西省"
-610428 county="长武县" prefecture="咸阳市" province="陕西省"
-610429 county="旬邑县" prefecture="咸阳市" province="陕西省"
-610430 county="淳化县" prefecture="咸阳市" province="陕西省"
-610431 county="武功县" prefecture="咸阳市" province="陕西省"
-610481 county="兴平市" prefecture="咸阳市" province="陕西省"
-610501 county="市辖区" prefecture="渭南市" province="陕西省"
-610502 county="临渭区" prefecture="渭南市" province="陕西省"
-610521 county="华县" prefecture="渭南市" province="陕西省"
-610522 county="潼关县" prefecture="渭南市" province="陕西省"
-610523 county="大荔县" prefecture="渭南市" province="陕西省"
-610524 county="合阳县" prefecture="渭南市" province="陕西省"
-610525 county="澄城县" prefecture="渭南市" province="陕西省"
-610526 county="蒲城县" prefecture="渭南市" province="陕西省"
-610527 county="白水县" prefecture="渭南市" province="陕西省"
-610528 county="富平县" prefecture="渭南市" province="陕西省"
-610581 county="韩城市" prefecture="渭南市" province="陕西省"
-610582 county="华阴市" prefecture="渭南市" province="陕西省"
-610601 county="市辖区" prefecture="延安市" province="陕西省"
-610602 county="宝塔区" prefecture="延安市" province="陕西省"
-610621 county="延长县" prefecture="延安市" province="陕西省"
-610622 county="延川县" prefecture="延安市" province="陕西省"
-610623 county="子长县" prefecture="延安市" province="陕西省"
-610624 county="安塞县" prefecture="延安市" province="陕西省"
-610625 county="志丹县" prefecture="延安市" province="陕西省"
-610626 county="吴起县" prefecture="延安市" province="陕西省"
-610627 county="甘泉县" prefecture="延安市" province="陕西省"
-610628 county="富县" prefecture="延安市" province="陕西省"
-610629 county="洛川县" prefecture="延安市" province="陕西省"
-610630 county="宜川县" prefecture="延安市" province="陕西省"
-610631 county="黄龙县" prefecture="延安市" province="陕西省"
-610632 county="黄陵县" prefecture="延安市" province="陕西省"
-610701 county="市辖区" prefecture="汉中市" province="陕西省"
-610702 county="汉台区" prefecture="汉中市" province="陕西省"
-610721 county="南郑县" prefecture="汉中市" province="陕西省"
-610722 county="城固县" prefecture="汉中市" province="陕西省"
-610723 county="洋县" prefecture="汉中市" province="陕西省"
-610724 county="西乡县" prefecture="汉中市" province="陕西省"
-610725 county="勉县" prefecture="汉中市" province="陕西省"
-610726 county="宁强县" prefecture="汉中市" province="陕西省"
-610727 county="略阳县" prefecture="汉中市" province="陕西省"
-610728 county="镇巴县" prefecture="汉中市" province="陕西省"
-610729 county="留坝县" prefecture="汉中市" province="陕西省"
-610730 county="佛坪县" prefecture="汉中市" province="陕西省"
-610801 county="市辖区" prefecture="榆林市" province="陕西省"
-610802 county="榆阳区" prefecture="榆林市" province="陕西省"
-610821 county="神木县" prefecture="榆林市" province="陕西省"
-610822 county="府谷县" prefecture="榆林市" province="陕西省"
-610823 county="横山县" prefecture="榆林市" province="陕西省"
-610824 county="靖边县" prefecture="榆林市" province="陕西省"
-610825 county="定边县" prefecture="榆林市" province="陕西省"
-610826 county="绥德县" prefecture="榆林市" province="陕西省"
-610827 county="米脂县" prefecture="榆林市" province="陕西省"
-610828 county="佳县" prefecture="榆林市" province="陕西省"
-610829 county="吴堡县" prefecture="榆林市" province="陕西省"
-610830 county="清涧县" prefecture="榆林市" province="陕西省"
-610831 county="子洲县" prefecture="榆林市" province="陕西省"
-610901 county="市辖区" prefecture="安康市" province="陕西省"
-610902 county="汉滨区" prefecture="安康市" province="陕西省"
-610921 county="汉阴县" prefecture="安康市" province="陕西省"
-610922 county="石泉县" prefecture="安康市" province="陕西省"
-610923 county="宁陕县" prefecture="安康市" province="陕西省"
-610924 county="紫阳县" prefecture="安康市" province="陕西省"
-610925 county="岚皋县" prefecture="安康市" province="陕西省"
-610926 county="平利县" prefecture="安康市" province="陕西省"
-610927 county="镇坪县" prefecture="安康市" province="陕西省"
-610928 county="旬阳县" prefecture="安康市" province="陕西省"
-610929 county="白河县" prefecture="安康市" province="陕西省"
-611001 county="市辖区" prefecture="商洛市" province="陕西省"
-611002 county="商州区" prefecture="商洛市" province="陕西省"
-611021 county="洛南县" prefecture="商洛市" province="陕西省"
-611022 county="丹凤县" prefecture="商洛市" province="陕西省"
-611023 county="商南县" prefecture="商洛市" province="陕西省"
-611024 county="山阳县" prefecture="商洛市" province="陕西省"
-611025 county="镇安县" prefecture="商洛市" province="陕西省"
-611026 county="柞水县" prefecture="商洛市" province="陕西省"
-620101 county="市辖区" prefecture="兰州市" province="甘肃省"
-620102 county="城关区" prefecture="兰州市" province="甘肃省"
-620103 county="七里河区" prefecture="兰州市" province="甘肃省"
-620104 county="西固区" prefecture="兰州市" province="甘肃省"
-620105 county="安宁区" prefecture="兰州市" province="甘肃省"
-620111 county="红古区" prefecture="兰州市" province="甘肃省"
-620121 county="永登县" prefecture="兰州市" province="甘肃省"
-620122 county="皋兰县" prefecture="兰州市" province="甘肃省"
-620123 county="榆中县" prefecture="兰州市" province="甘肃省"
-620201 county="市辖区" prefecture="嘉峪关市" province="甘肃省"
-620301 county="市辖区" prefecture="金昌市" province="甘肃省"
-620302 county="金川区" prefecture="金昌市" province="甘肃省"
-620321 county="永昌县" prefecture="金昌市" province="甘肃省"
-620401 county="市辖区" prefecture="白银市" province="甘肃省"
-620402 county="白银区" prefecture="白银市" province="甘肃省"
-620403 county="平川区" prefecture="白银市" province="甘肃省"
-620421 county="靖远县" prefecture="白银市" province="甘肃省"
-620422 county="会宁县" prefecture="白银市" province="甘肃省"
-620423 county="景泰县" prefecture="白银市" province="甘肃省"
-620501 county="市辖区" prefecture="天水市" province="甘肃省"
-620502 county="秦州区" prefecture="天水市" province="甘肃省"
-620503 county="麦积区" prefecture="天水市" province="甘肃省"
-620521 county="清水县" prefecture="天水市" province="甘肃省"
-620522 county="秦安县" prefecture="天水市" province="甘肃省"
-620523 county="甘谷县" prefecture="天水市" province="甘肃省"
-620524 county="武山县" prefecture="天水市" province="甘肃省"
-620525 county="张家川回族自治县" prefecture="天水市" province="甘肃省"
-620601 county="市辖区" prefecture="武威市" province="甘肃省"
-620602 county="凉州区" prefecture="武威市" province="甘肃省"
-620621 county="民勤县" prefecture="武威市" province="甘肃省"
-620622 county="古浪县" prefecture="武威市" province="甘肃省"
-620623 county="天祝藏族自治县" prefecture="武威市" province="甘肃省"
-620701 county="市辖区" prefecture="张掖市" province="甘肃省"
-620702 county="甘州区" prefecture="张掖市" province="甘肃省"
-620721 county="肃南裕固族自治县" prefecture="张掖市" province="甘肃省"
-620722 county="民乐县" prefecture="张掖市" province="甘肃省"
-620723 county="临泽县" prefecture="张掖市" province="甘肃省"
-620724 county="高台县" prefecture="张掖市" province="甘肃省"
-620725 county="山丹县" prefecture="张掖市" province="甘肃省"
-620801 county="市辖区" prefecture="平凉市" province="甘肃省"
-620802 county="崆峒区" prefecture="平凉市" province="甘肃省"
-620821 county="泾川县" prefecture="平凉市" province="甘肃省"
-620822 county="灵台县" prefecture="平凉市" province="甘肃省"
-620823 county="崇信县" prefecture="平凉市" province="甘肃省"
-620824 county="华亭县" prefecture="平凉市" province="甘肃省"
-620825 county="庄浪县" prefecture="平凉市" province="甘肃省"
-620826 county="静宁县" prefecture="平凉市" province="甘肃省"
-620901 county="市辖区" prefecture="酒泉市" province="甘肃省"
-620902 county="肃州区" prefecture="酒泉市" province="甘肃省"
-620921 county="金塔县" prefecture="酒泉市" province="甘肃省"
-620922 county="瓜州县" prefecture="酒泉市" province="甘肃省"
-620923 county="肃北蒙古族自治县" prefecture="酒泉市" province="甘肃省"
-620924 county="阿克塞哈萨克族自治县" prefecture="酒泉市" province="甘肃省"
-620981 county="玉门市" prefecture="酒泉市" province="甘肃省"
-620982 county="敦煌市" prefecture="酒泉市" province="甘肃省"
-621001 county="市辖区" prefecture="庆阳市" province="甘肃省"
-621002 county="西峰区" prefecture="庆阳市" province="甘肃省"
-621021 county="庆城县" prefecture="庆阳市" province="甘肃省"
-621022 county="环县" prefecture="庆阳市" province="甘肃省"
-621023 county="华池县" prefecture="庆阳市" province="甘肃省"
-621024 county="合水县" prefecture="庆阳市" province="甘肃省"
-621025 county="正宁县" prefecture="庆阳市" province="甘肃省"
-621026 county="宁县" prefecture="庆阳市" province="甘肃省"
-621027 county="镇原县" prefecture="庆阳市" province="甘肃省"
-621101 county="市辖区" prefecture="定西市" province="甘肃省"
-621102 county="安定区" prefecture="定西市" province="甘肃省"
-621121 county="通渭县" prefecture="定西市" province="甘肃省"
-621122 county="陇西县" prefecture="定西市" province="甘肃省"
-621123 county="渭源县" prefecture="定西市" province="甘肃省"
-621124 county="临洮县" prefecture="定西市" province="甘肃省"
-621125 county="漳县" prefecture="定西市" province="甘肃省"
-621126 county="岷县" prefecture="定西市" province="甘肃省"
-621201 county="市辖区" prefecture="陇南市" province="甘肃省"
-621202 county="武都区" prefecture="陇南市" province="甘肃省"
-621221 county="成县" prefecture="陇南市" province="甘肃省"
-621222 county="文县" prefecture="陇南市" province="甘肃省"
-621223 county="宕昌县" prefecture="陇南市" province="甘肃省"
-621224 county="康县" prefecture="陇南市" province="甘肃省"
-621225 county="西和县" prefecture="陇南市" province="甘肃省"
-621226 county="礼县" prefecture="陇南市" province="甘肃省"
-621227 county="徽县" prefecture="陇南市" province="甘肃省"
-621228 county="两当县" prefecture="陇南市" province="甘肃省"
-622421 county="定西县" prefecture="定西地区" province="甘肃省"
-622424 county="通渭县" prefecture="定西地区" province="甘肃省"
-622425 county="陇西县" prefecture="定西地区" province="甘肃省"
-622426 county="渭源县" prefecture="定西地区" province="甘肃省"
-622427 county="临洮县" prefecture="定西地区" province="甘肃省"
-622428 county="漳县" prefecture="定西地区" province="甘肃省"
-622429 county="岷县" prefecture="定西地区" province="甘肃省"
-622621 county="武都县" prefecture="陇南地区" province="甘肃省"
-622623 county="宕昌县" prefecture="陇南地区" province="甘肃省"
-622624 county="成县" prefecture="陇南地区" province="甘肃省"
-622625 county="康县" prefecture="陇南地区" province="甘肃省"
-622626 county="文县" prefecture="陇南地区" province="甘肃省"
-622627 county="西和县" prefecture="陇南地区" province="甘肃省"
-622628 county="礼县" prefecture="陇南地区" province="甘肃省"
-622629 county="两当县" prefecture="陇南地区" province="甘肃省"
-622630 county="徽县" prefecture="陇南地区" province="甘肃省"
-622901 county="临夏市" prefecture="临夏回族自治州" province="甘肃省"
-622921 county="临夏县" prefecture="临夏回族自治州" province="甘肃省"
-622922 county="康乐县" prefecture="临夏回族自治州" province="甘肃省"
-622923 county="永靖县" prefecture="临夏回族自治州" province="甘肃省"
-622924 county="广河县" prefecture="临夏回族自治州" province="甘肃省"
-622925 county="和政县" prefecture="临夏回族自治州" province="甘肃省"
-622926 county="东乡族自治县" prefecture="临夏回族自治州" province="甘肃省"
-622927 county="积石山保安族东乡族撒拉族自治县" prefecture="临夏回族自治州" province="甘肃省"
-623001 county="合作市" prefecture="甘南藏族自治州" province="甘肃省"
-623021 county="临潭县" prefecture="甘南藏族自治州" province="甘肃省"
-623022 county="卓尼县" prefecture="甘南藏族自治州" province="甘肃省"
-623023 county="舟曲县" prefecture="甘南藏族自治州" province="甘肃省"
-623024 county="迭部县" prefecture="甘南藏族自治州" province="甘肃省"
-623025 county="玛曲县" prefecture="甘南藏族自治州" province="甘肃省"
-623026 county="碌曲县" prefecture="甘南藏族自治州" province="甘肃省"
-623027 county="夏河县" prefecture="甘南藏族自治州" province="甘肃省"
-630101 county="市辖区" prefecture="西宁市" province="青海省"
-630102 county="城东区" prefecture="西宁市" province="青海省"
-630103 county="城中区" prefecture="西宁市" province="青海省"
-630104 county="城西区" prefecture="西宁市" province="青海省"
-630105 county="城北区" prefecture="西宁市" province="青海省"
-630121 county="大通回族土族自治县" prefecture="西宁市" province="青海省"
-630122 county="湟中县" prefecture="西宁市" province="青海省"
-630123 county="湟源县" prefecture="西宁市" province="青海省"
-630202 county="乐都区" prefecture="海东市" province="青海省"
-630221 county="平安县" prefecture="海东市" province="青海省"
-630222 county="民和回族土族自治县" prefecture="海东市" province="青海省"
-630223 county="互助土族自治县" prefecture="海东市" province="青海省"
-630224 county="化隆回族自治县" prefecture="海东市" province="青海省"
-630225 county="循化撒拉族自治县" prefecture="海东市" province="青海省"
-632121 county="平安县" prefecture="海东地区" province="青海省"
-632122 county="民和回族土族自治县" prefecture="海东地区" province="青海省"
-632123 county="乐都县" prefecture="海东地区" province="青海省"
-632126 county="互助土族自治县" prefecture="海东地区" province="青海省"
-632127 county="化隆回族自治县" prefecture="海东地区" province="青海省"
-632128 county="循化撒拉族自治县" prefecture="海东地区" province="青海省"
-632221 county="门源回族自治县" prefecture="海北藏族自治州" province="青海省"
-632222 county="祁连县" prefecture="海北藏族自治州" province="青海省"
-632223 county="海晏县" prefecture="海北藏族自治州" province="青海省"
-632224 county="刚察县" prefecture="海北藏族自治州" province="青海省"
-632321 county="同仁县" prefecture="黄南藏族自治州" province="青海省"
-632322 county="尖扎县" prefecture="黄南藏族自治州" province="青海省"
-632323 county="泽库县" prefecture="黄南藏族自治州" province="青海省"
-632324 county="河南蒙古族自治县" prefecture="黄南藏族自治州" province="青海省"
-632521 county="共和县" prefecture="海南藏族自治州" province="青海省"
-632522 county="同德县" prefecture="海南藏族自治州" province="青海省"
-632523 county="贵德县" prefecture="海南藏族自治州" province="青海省"
-632524 county="兴海县" prefecture="海南藏族自治州" province="青海省"
-632525 county="贵南县" prefecture="海南藏族自治州" province="青海省"
-632621 county="玛沁县" prefecture="果洛藏族自治州" province="青海省"
-632622 county="班玛县" prefecture="果洛藏族自治州" province="青海省"
-632623 county="甘德县" prefecture="果洛藏族自治州" province="青海省"
-632624 county="达日县" prefecture="果洛藏族自治州" province="青海省"
-632625 county="久治县" prefecture="果洛藏族自治州" province="青海省"
-632626 county="玛多县" prefecture="果洛藏族自治州" province="青海省"
-632701 county="玉树市" prefecture="玉树藏族自治州" province="青海省"
-632721 county="玉树县" prefecture="玉树藏族自治州" province="青海省"
-632722 county="杂多县" prefecture="玉树藏族自治州" province="青海省"
-632723 county="称多县" prefecture="玉树藏族自治州" province="青海省"
-632724 county="治多县" prefecture="玉树藏族自治州" province="青海省"
-632725 county="囊谦县" prefecture="玉树藏族自治州" province="青海省"
-632726 county="曲麻莱县" prefecture="玉树藏族自治州" province="青海省"
-632801 county="格尔木市" prefecture="海西蒙古族藏族自治州" province="青海省"
-632802 county="德令哈市" prefecture="海西蒙古族藏族自治州" province="青海省"
-632821 county="乌兰县" prefecture="海西蒙古族藏族自治州" province="青海省"
-632822 county="都兰县" prefecture="海西蒙古族藏族自治州" province="青海省"
-632823 county="天峻县" prefecture="海西蒙古族藏族自治州" province="青海省"
-640101 county="市辖区" prefecture="银川市" province="宁夏回族自治区"
-640104 county="兴庆区" prefecture="银川市" province="宁夏回族自治区"
-640105 county="西夏区" prefecture="银川市" province="宁夏回族自治区"
-640106 county="金凤区" prefecture="银川市" province="宁夏回族自治区"
-640121 county="永宁县" prefecture="银川市" province="宁夏回族自治区"
-640122 county="贺兰县" prefecture="银川市" province="宁夏回族自治区"
-640181 county="灵武市" prefecture="银川市" province="宁夏回族自治区"
-640201 county="市辖区" prefecture="石嘴山市" province="宁夏回族自治区"
-640202 county="大武口区" prefecture="石嘴山市" province="宁夏回族自治区"
-640203 county="石嘴山区" prefecture="石嘴山市" province="宁夏回族自治区"
-640205 county="惠农区" prefecture="石嘴山市" province="宁夏回族自治区"
-640221 county="平罗县" prefecture="石嘴山市" province="宁夏回族自治区"
-640222 county="陶乐县" prefecture="石嘴山市" province="宁夏回族自治区"
-640223 county="惠农县" prefecture="石嘴山市" province="宁夏回族自治区"
-640301 county="市辖区" prefecture="吴忠市" province="宁夏回族自治区"
-640302 county="利通区" prefecture="吴忠市" province="宁夏回族自治区"
-640303 county="红寺堡区" prefecture="吴忠市" province="宁夏回族自治区"
-640321 county="中卫县" prefecture="吴忠市" province="宁夏回族自治区"
-640322 county="中宁县" prefecture="吴忠市" province="宁夏回族自治区"
-640323 county="盐池县" prefecture="吴忠市" province="宁夏回族自治区"
-640324 county="同心县" prefecture="吴忠市" province="宁夏回族自治区"
-640381 county="青铜峡市" prefecture="吴忠市" province="宁夏回族自治区"
-640401 county="市辖区" prefecture="固原市" province="宁夏回族自治区"
-640402 county="原州区" prefecture="固原市" province="宁夏回族自治区"
-640421 county="海原县" prefecture="固原市" province="宁夏回族自治区"
-640422 county="西吉县" prefecture="固原市" province="宁夏回族自治区"
-640423 county="隆德县" prefecture="固原市" province="宁夏回族自治区"
-640424 county="泾源县" prefecture="固原市" province="宁夏回族自治区"
-640425 county="彭阳县" prefecture="固原市" province="宁夏回族自治区"
-640501 county="市辖区" prefecture="中卫市" province="宁夏回族自治区"
-640502 county="沙坡头区" prefecture="中卫市" province="宁夏回族自治区"
-640521 county="中宁县" prefecture="中卫市" province="宁夏回族自治区"
-640522 county="海原县" prefecture="中卫市" province="宁夏回族自治区"
-650101 county="市辖区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650102 county="天山区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650103 county="沙依巴克区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650104 county="新市区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650105 county="水磨沟区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650106 county="头屯河区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650107 county="达坂城区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650108 county="东山区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650109 county="米东区" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650121 county="乌鲁木齐县" prefecture="乌鲁木齐市" province="新疆维吾尔自治区"
-650201 county="市辖区" prefecture="克拉玛依市" province="新疆维吾尔自治区"
-650202 county="独山子区" prefecture="克拉玛依市" province="新疆维吾尔自治区"
-650203 county="克拉玛依区" prefecture="克拉玛依市" province="新疆维吾尔自治区"
-650204 county="白碱滩区" prefecture="克拉玛依市" province="新疆维吾尔自治区"
-650205 county="乌尔禾区" prefecture="克拉玛依市" province="新疆维吾尔自治区"
-652101 county="吐鲁番市" prefecture="吐鲁番地区" province="新疆维吾尔自治区"
-652122 county="鄯善县" prefecture="吐鲁番地区" province="新疆维吾尔自治区"
-652123 county="托克逊县" prefecture="吐鲁番地区" province="新疆维吾尔自治区"
-652201 county="哈密市" prefecture="哈密地区" province="新疆维吾尔自治区"
-652222 county="巴里坤哈萨克自治县" prefecture="哈密地区" province="新疆维吾尔自治区"
-652223 county="伊吾县" prefecture="哈密地区" province="新疆维吾尔自治区"
-652301 county="昌吉市" prefecture="昌吉回族自治州" province="新疆维吾尔自治区"
-652302 county="阜康市" prefecture="昌吉回族自治州" province="新疆维吾尔自治区"
-652303 county="米泉市" prefecture="昌吉回族自治州" province="新疆维吾尔自治区"
-652323 county="呼图壁县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区"
-652324 county="玛纳斯县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区"
-652325 county="奇台县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区"
-652327 county="吉木萨尔县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区"
-652328 county="木垒哈萨克自治县" prefecture="昌吉回族自治州" province="新疆维吾尔自治区"
-652701 county="博乐市" prefecture="博尔塔拉蒙古自治州" province="新疆维吾尔自治区"
-652702 county="阿拉山口市" prefecture="博尔塔拉蒙古自治州" province="新疆维吾尔自治区"
-652722 county="精河县" prefecture="博尔塔拉蒙古自治州" province="新疆维吾尔自治区"
-652723 county="温泉县" prefecture="博尔塔拉蒙古自治州" province="新疆维吾尔自治区"
-652801 county="库尔勒市" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652822 county="轮台县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652823 county="尉犁县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652824 county="若羌县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652825 county="且末县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652826 county="焉耆回族自治县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652827 county="和静县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652828 county="和硕县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652829 county="博湖县" prefecture="巴音郭楞蒙古自治州" province="新疆维吾尔自治区"
-652901 county="阿克苏市" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-652922 county="温宿县" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-652923 county="库车县" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-652924 county="沙雅县" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-652925 county="新和县" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-652926 county="拜城县" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-652927 county="乌什县" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-652928 county="阿瓦提县" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-652929 county="柯坪县" prefecture="阿克苏地区" province="新疆维吾尔自治区"
-653001 county="阿图什市" prefecture="克孜勒苏柯尔克孜自治州" province="新疆维吾尔自治区"
-653022 county="阿克陶县" prefecture="克孜勒苏柯尔克孜自治州" province="新疆维吾尔自治区"
-653023 county="阿合奇县" prefecture="克孜勒苏柯尔克孜自治州" province="新疆维吾尔自治区"
-653024 county="乌恰县" prefecture="克孜勒苏柯尔克孜自治州" province="新疆维吾尔自治区"
-653101 county="喀什市" prefecture="喀什地区" province="新疆维吾尔自治区"
-653121 county="疏附县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653122 county="疏勒县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653123 county="英吉沙县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653124 county="泽普县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653125 county="莎车县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653126 county="叶城县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653127 county="麦盖提县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653128 county="岳普湖县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653129 county="伽师县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653130 county="巴楚县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653131 county="塔什库尔干塔吉克自治县" prefecture="喀什地区" province="新疆维吾尔自治区"
-653201 county="和田市" prefecture="和田地区" province="新疆维吾尔自治区"
-653221 county="和田县" prefecture="和田地区" province="新疆维吾尔自治区"
-653222 county="墨玉县" prefecture="和田地区" province="新疆维吾尔自治区"
-653223 county="皮山县" prefecture="和田地区" province="新疆维吾尔自治区"
-653224 county="洛浦县" prefecture="和田地区" province="新疆维吾尔自治区"
-653225 county="策勒县" prefecture="和田地区" province="新疆维吾尔自治区"
-653226 county="于田县" prefecture="和田地区" province="新疆维吾尔自治区"
-653227 county="民丰县" prefecture="和田地区" province="新疆维吾尔自治区"
-654002 county="伊宁市" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654003 county="奎屯市" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654021 county="伊宁县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654022 county="察布查尔锡伯自治县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654023 county="霍城县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654024 county="巩留县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654025 county="新源县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654026 county="昭苏县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654027 county="特克斯县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654028 county="尼勒克县" prefecture="伊犁哈萨克自治州" province="新疆维吾尔自治区"
-654201 county="塔城市" prefecture="塔城地区" province="新疆维吾尔自治区"
-654202 county="乌苏市" prefecture="塔城地区" province="新疆维吾尔自治区"
-654221 county="额敏县" prefecture="塔城地区" province="新疆维吾尔自治区"
-654223 county="沙湾县" prefecture="塔城地区" province="新疆维吾尔自治区"
-654224 county="托里县" prefecture="塔城地区" province="新疆维吾尔自治区"
-654225 county="裕民县" prefecture="塔城地区" province="新疆维吾尔自治区"
-654226 county="和布克赛尔蒙古自治县" prefecture="塔城地区" province="新疆维吾尔自治区"
-654301 county="阿勒泰市" prefecture="阿勒泰地区" province="新疆维吾尔自治区"
-654321 county="布尔津县" prefecture="阿勒泰地区" province="新疆维吾尔自治区"
-654322 county="富蕴县" prefecture="阿勒泰地区" province="新疆维吾尔自治区"
-654323 county="福海县" prefecture="阿勒泰地区" province="新疆维吾尔自治区"
-654324 county="哈巴河县" prefecture="阿勒泰地区" province="新疆维吾尔自治区"
-654325 county="青河县" prefecture="阿勒泰地区" province="新疆维吾尔自治区"
-654326 county="吉木乃县" prefecture="阿勒泰地区" province="新疆维吾尔自治区"
-659001 county="石河子市" prefecture="自治区直辖县级行政区划" province="新疆维吾尔自治区"
-659002 county="阿拉尔市" prefecture="自治区直辖县级行政区划" province="新疆维吾尔自治区"
-659003 county="图木舒克市" prefecture="自治区直辖县级行政区划" province="新疆维吾尔自治区"
-659004 county="五家渠市" prefecture="自治区直辖县级行政区划" province="新疆维吾尔自治区"
+# Downloaded from
+# https://zh.wikipedia.org/w/index.php?title=中华人民共和国行政区划代码_(1区)&action=raw
+# https://zh.wikipedia.org/w/index.php?title=中华人民共和国行政区划代码_(2区)&action=raw
+# https://zh.wikipedia.org/w/index.php?title=中华人民共和国行政区划代码_(3区)&action=raw
+# https://zh.wikipedia.org/w/index.php?title=中华人民共和国行政区划代码_(4区)&action=raw
+# https://zh.wikipedia.org/w/index.php?title=中华人民共和国行政区划代码_(5区)&action=raw
+# https://zh.wikipedia.org/w/index.php?title=中华人民共和国行政区划代码_(6区)&action=raw
+# https://zh.wikipedia.org/w/index.php?title=中华人民共和国行政区划代码_(7区)&action=raw
+# https://zh.wikipedia.org/w/index.php?title=中华人民共和国行政区划代码_(8区)&action=raw
+11 province="北京市"
+ 0000 county="北京市"
+ 0100 county="市辖区"
+ 0101 county="东城区"
+ 0102 county="西城区"
+ 0103 county="[-2010]崇文区"
+ 0104 county="[-2010]宣武区"
+ 0105 county="朝阳区"
+ 0106 county="丰台区"
+ 0107 county="石景山区"
+ 0108 county="海淀区"
+ 0109 county="门头沟区"
+ 0110 county="[-1986]燕山区"
+ 0111 county="[1986-]房山区"
+ 0112 county="[1997-]通州区"
+ 0113 county="[1998-]顺义区"
+ 0114 county="[1999-]昌平区"
+ 0115 county="[2001-]大兴区"
+ 0116 county="[2001-]怀柔区"
+ 0117 county="[2001-]平谷区"
+ 0118 county="[2015-]密云区"
+ 0119 county="[2015-]延庆区"
+ 0200 county="[-2015]县"
+ 0201 county="[-1982]昌平县"
+ 0202 county="[-1982]顺义县"
+ 0203 county="[-1982]通县"
+ 0204 county="[-1982]大兴县"
+ 0205 county="[-1982]房山县"
+ 0206 county="[-1982]平谷县"
+ 0207 county="[-1982]怀柔县"
+ 0208 county="[-1982]密云县"
+ 0209 county="[-1982]延庆县"
+ 0221 county="[1982-1999]昌平县"
+ 0222 county="[1982-1998]顺义县"
+ 0223 county="[1982-1997]通县"
+ 0224 county="[1982-2001]大兴县"
+ 0225 county="[1982-1986]房山县"
+ 0226 county="[1982-2001]平谷县"
+ 0227 county="[1982-2001]怀柔县"
+ 0228 county="[1982-2015]密云县"
+ 0229 county="[1982-2015]延庆县"
+12 province="天津市"
+ 0000 county="天津市"
+ 0100 county="市辖区"
+ 0101 county="和平区"
+ 0102 county="河东区"
+ 0103 county="河西区"
+ 0104 county="南开区"
+ 0105 county="河北区"
+ 0106 county="红桥区"
+ 0107 county="[-2009]塘沽区"
+ 0108 county="[-2009]汉沽区"
+ 0109 county="[-2009]大港区"
+ 0110 county="[-1991]东郊区,[1992-]东丽区"
+ 0111 county="[-1991]西郊区,[1992-]西青区"
+ 0112 county="[-1991]南郊区,[1992-]津南区"
+ 0113 county="[-1991]北郊区,[1992-]北辰区"
+ 0114 county="[2000-]武清区"
+ 0115 county="[2001-]宝坻区"
+ 0116 county="[2009-]滨海新区"
+ 0117 county="[2015-]宁河区"
+ 0118 county="[2015-]静海区"
+ 0119 county="[2016-]蓟州区"
+ 0200 county="[-2016]县"
+ 0201 county="[-1982]宁河县"
+ 0202 county="[-1982]武清县"
+ 0203 county="[-1982]静海县"
+ 0204 county="[-1982]宝坻县"
+ 0205 county="[-1982]蓟县"
+ 0221 county="[1982-2015]宁河县"
+ 0222 county="[1982-2000]武清县"
+ 0223 county="[1982-2015]静海县"
+ 0224 county="[1982-2001]宝坻县"
+ 0225 county="[1982-2016]蓟县"
+13 province="河北省"
+ 0000 county="河北省"
+ 0100 county="石家庄市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]长安区"
+ 0103 county="[1983-2014]桥东区"
+ 0104 county="[1983-]桥西区"
+ 0105 county="[1983-]新华区"
+ 0106 county="[1983-2001]郊区"
+ 0107 county="[1983-]井陉矿区"
+ 0108 county="[2001-]裕华区"
+ 0109 county="[2014-]藁城区"
+ 0110 county="[2014-]鹿泉区"
+ 0111 county="[2014-]栾城区"
+ 0121 county="[1983-]井陉县"
+ 0122 county="[1983-1994]获鹿县"
+ 0123 county="[1986-]正定县"
+ 0124 county="[1986-2014]栾城县"
+ 0125 county="[1993-]行唐县"
+ 0126 county="[1993-]灵寿县"
+ 0127 county="[1993-]高邑县"
+ 0128 county="[1993-]深泽县"
+ 0129 county="[1993-]赞皇县"
+ 0130 county="[1993-]无极县"
+ 0131 county="[1993-]平山县"
+ 0132 county="[1993-]元氏县"
+ 0133 county="[1993-]赵县"
+ 0181 county="[1993-]辛集市"
+ 0182 county="[1993-2014]藁城市"
+ 0183 county="[1993-]晋州市"
+ 0184 county="[1993-]新乐市"
+ 0185 county="[1994-2014]鹿泉市"
+ 0200 county="唐山市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]路南区"
+ 0203 county="[1983-]路北区"
+ 0204 county="[1983-1994]东矿区,[1995-]古冶区"
+ 0205 county="[1983-]开平区"
+ 0206 county="[1983-2002]新区"
+ 0207 county="[2002-]丰南区"
+ 0208 county="[2002-]丰润区"
+ 0209 county="[2012-]曹妃甸区"
+ 0221 county="[1983-2002]丰润县"
+ 0222 county="[1983-1994]丰南县"
+ 0223 county="[1983-2018]滦县"
+ 0224 county="[1983-]滦南县"
+ 0225 county="[1983-]乐亭县"
+ 0226 county="[1983-1996]迁安县"
+ 0227 county="[1983-]迁西县"
+ 0228 county="[1983-1992]遵化县"
+ 0229 county="[1983-]玉田县"
+ 0230 county="[1983-2012]唐海县"
+ 0281 county="[1992-]遵化市"
+ 0282 county="[1994-2002]丰南市"
+ 0283 county="[1996-]迁安市"
+ 0284 county="[2018-]滦州市"
+ 0300 county="[1983-]秦皇岛市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]海港区"
+ 0303 county="[1983-]山海关区"
+ 0304 county="[1983-]北戴河区"
+ 0305 county="[1983-1984]郊区"
+ 0306 county="[2015-]抚宁区"
+ 0321 county="[1983-1985]青龙县,[1986-]青龙满族自治县"
+ 0322 county="[1983-]昌黎县"
+ 0323 county="[1983-2015]抚宁县"
+ 0324 county="[1983-]卢龙县"
+ 0400 county="[1983-]邯郸市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]邯山区"
+ 0403 county="[1983-]丛台区"
+ 0404 county="[1983-]复兴区"
+ 0405 county="[1983-1986]郊区"
+ 0406 county="[1983-]峰峰矿区"
+ 0407 county="[2016-]肥乡区"
+ 0408 county="[2016-]永年区"
+ 0421 county="[1983-2016]邯郸县"
+ 0422 county="[1986-1988]武安县"
+ 0423 county="[1993-]临漳县"
+ 0424 county="[1993-]成安县"
+ 0425 county="[1993-]大名县"
+ 0426 county="[1993-]涉县"
+ 0427 county="[1993-]磁县"
+ 0428 county="[1993-2016]肥乡县"
+ 0429 county="[1993-2016]永年县"
+ 0430 county="[1993-1995]丘县,[1996-]邱县"
+ 0431 county="[1993-]鸡泽县"
+ 0432 county="[1993-]广平县"
+ 0433 county="[1993-]馆陶县"
+ 0434 county="[1993-]魏县"
+ 0435 county="[1993-]曲周县"
+ 0481 county="[1989-]武安市"
+ 0500 county="[1983-]邢台市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-2019]桥东区,[2020-]襄都区"
+ 0503 county="[1983-2019]桥西区,[2020-]信都区"
+ 0504 county="[1983-1988]郊区"
+ 0505 county="[2020-]任泽区"
+ 0506 county="[2020-]南和区"
+ 0521 county="[1986-2020]邢台县"
+ 0522 county="[1993-]临城县"
+ 0523 county="[1993-]内丘县"
+ 0524 county="[1993-]柏乡县"
+ 0525 county="[1993-]隆尧县"
+ 0526 county="[1993-2020]任县"
+ 0527 county="[1993-2020]南和县"
+ 0528 county="[1993-]宁晋县"
+ 0529 county="[1993-]巨鹿县"
+ 0530 county="[1993-]新河县"
+ 0531 county="[1993-]广宗县"
+ 0532 county="[1993-]平乡县"
+ 0533 county="[1993-]威县"
+ 0534 county="[1993-]清河县"
+ 0535 county="[1993-]临西县"
+ 0581 county="[1993-]南宫市"
+ 0582 county="[1993-]沙河市"
+ 0600 county="[1983-]保定市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-2014]新市区,[2015-]竞秀区"
+ 0603 county="[1983-2015]北市区"
+ 0604 county="[1983-2015]南市区"
+ 0605 county="[1983-1987]郊区"
+ 0606 county="[2015-]莲池区"
+ 0607 county="[2015-]满城区"
+ 0608 county="[2015-]清苑区"
+ 0609 county="[2015-]徐水区"
+ 0621 county="[1983-2015]满城县"
+ 0622 county="[1986-2015]清苑县"
+ 0623 county="[1994-]涞水县"
+ 0624 county="[1994-]阜平县"
+ 0625 county="[1994-2015]徐水县"
+ 0626 county="[1994-]定兴县"
+ 0627 county="[1994-]唐县"
+ 0628 county="[1994-]高阳县"
+ 0629 county="[1994-]容城县"
+ 0630 county="[1994-]涞源县"
+ 0631 county="[1994-]望都县"
+ 0632 county="[1994-]安新县"
+ 0633 county="[1994-]易县"
+ 0634 county="[1994-]曲阳县"
+ 0635 county="[1994-]蠡县"
+ 0636 county="[1994-]顺平县"
+ 0637 county="[1994-]博野县"
+ 0638 county="[1994-]雄县"
+ 0681 county="[1994-]涿州市"
+ 0682 county="[1994-]定州市"
+ 0683 county="[1994-]安国市"
+ 0684 county="[1994-]高碑店市"
+ 0700 county="[1983-]张家口市"
+ 0701 county="[1983-]市辖区"
+ 0702 county="[1983-]桥东区"
+ 0703 county="[1983-]桥西区"
+ 0704 county="[1983-1989]茶坊区"
+ 0705 county="[1983-]宣化区"
+ 0706 county="[1983-]下花园区"
+ 0707 county="[1983-1989]庞家堡区"
+ 0708 county="[2016-]万全区"
+ 0709 county="[2016-]崇礼区"
+ 0721 county="[1983-2016]宣化县"
+ 0722 county="[1993-]张北县"
+ 0723 county="[1993-]康保县"
+ 0724 county="[1993-]沽源县"
+ 0725 county="[1993-]尚义县"
+ 0726 county="[1993-]蔚县"
+ 0727 county="[1993-]阳原县"
+ 0728 county="[1993-]怀安县"
+ 0729 county="[1993-2016]万全县"
+ 0730 county="[1993-]怀来县"
+ 0731 county="[1993-]涿鹿县"
+ 0732 county="[1993-]赤城县"
+ 0733 county="[1993-2016]崇礼县"
+ 0800 county="[1983-]承德市"
+ 0801 county="[1983-]市辖区"
+ 0802 county="[1983-]双桥区"
+ 0803 county="[1983-]双滦区"
+ 0804 county="[1983-]鹰手营子矿区"
+ 0821 county="[1983-]承德县"
+ 0822 county="[1993-]兴隆县"
+ 0823 county="[1993-2017]平泉县"
+ 0824 county="[1993-]滦平县"
+ 0825 county="[1993-]隆化县"
+ 0826 county="[1993-]丰宁满族自治县"
+ 0827 county="[1993-]宽城满族自治县"
+ 0828 county="[1993-]围场满族蒙古族自治县"
+ 0881 county="[2017-]平泉市"
+ 0900 county="[1983-]沧州市"
+ 0901 county="[1983-]市辖区"
+ 0902 county="[1983-]新华区"
+ 0903 county="[1983-]运河区"
+ 0904 county="[1983-1997]郊区"
+ 0921 county="[1983-]沧县"
+ 0922 county="[1986-]青县"
+ 0923 county="[1993-]东光县"
+ 0924 county="[1993-]海兴县"
+ 0925 county="[1993-]盐山县"
+ 0926 county="[1993-]肃宁县"
+ 0927 county="[1993-]南皮县"
+ 0928 county="[1993-]吴桥县"
+ 0929 county="[1993-]献县"
+ 0930 county="[1993-]孟村回族自治县"
+ 0981 county="[1993-]泊头市"
+ 0982 county="[1993-]任丘市"
+ 0983 county="[1993-]黄骅市"
+ 0984 county="[1993-]河间市"
+ 1000 county="[1988-]廊坊市"
+ 1001 county="[1988-]市辖区"
+ 1002 county="[1988-]安次区"
+ 1003 county="[2000-]广阳区"
+ 1021 county="[1988-1993]三河县"
+ 1022 county="[1988-]固安县"
+ 1023 county="[1988-]永清县"
+ 1024 county="[1988-]香河县"
+ 1025 county="[1988-]大城县"
+ 1026 county="[1988-]文安县"
+ 1027 county="[1988-1990]霸县"
+ 1028 county="[1988-]大厂回族自治县"
+ 1081 county="[1990-]霸州市"
+ 1082 county="[1993-]三河市"
+ 1100 county="[1996-]衡水市"
+ 1101 county="[1996-]市辖区"
+ 1102 county="[1996-]桃城区"
+ 1103 county="[2016-]冀州区"
+ 1121 county="[1996-]枣强县"
+ 1122 county="[1996-]武邑县"
+ 1123 county="[1996-]武强县"
+ 1124 county="[1996-]饶阳县"
+ 1125 county="[1996-]安平县"
+ 1126 county="[1996-]故城县"
+ 1127 county="[1996-]景县"
+ 1128 county="[1996-]阜城县"
+ 1181 county="[1996-2016]冀州市"
+ 1182 county="[1996-]深州市"
+ 2100 county="[-1993]邯郸地区"
+ 2101 county="[-1983]邯郸市"
+ 2121 county="[-1993]大名县"
+ 2122 county="[-1993]魏县"
+ 2123 county="[-1993]曲周县"
+ 2124 county="[-1993]丘县"
+ 2125 county="[-1993]鸡泽县"
+ 2126 county="[-1993]肥乡县"
+ 2127 county="[-1993]广平县"
+ 2128 county="[-1993]成安县"
+ 2129 county="[-1993]临漳县"
+ 2130 county="[-1993]磁县"
+ 2131 county="[-1986]武安县"
+ 2132 county="[-1993]涉县"
+ 2133 county="[-1993]永年县"
+ 2134 county="[-1983]邯郸县"
+ 2135 county="[-1993]馆陶县"
+ 2200 county="[-1993]邢台地区"
+ 2201 county="[1986-1993]南宫市"
+ 2202 county="[1987-1993]沙河市"
+ 2221 county="[-1986]邢台县"
+ 2222 county="[-1987]沙河县"
+ 2223 county="[-1993]临城县"
+ 2224 county="[-1993]内丘县"
+ 2225 county="[-1993]柏乡县"
+ 2226 county="[-1993]隆尧县"
+ 2227 county="[-1993]任县"
+ 2228 county="[-1993]南和县"
+ 2229 county="[-1993]宁晋县"
+ 2230 county="[-1986]南宫县"
+ 2231 county="[-1993]巨鹿县"
+ 2232 county="[-1993]新河县"
+ 2233 county="[-1993]广宗县"
+ 2234 county="[-1993]平乡县"
+ 2235 county="[-1993]威县"
+ 2236 county="[-1993]清河县"
+ 2237 county="[-1993]临西县"
+ 2300 county="[-1993]石家庄地区"
+ 2301 county="[1986-1993]辛集市"
+ 2302 county="[1989-1993]藁城市"
+ 2303 county="[1991-1993]晋州市"
+ 2304 county="[1992-1993]新乐市"
+ 2321 county="[-1986]束鹿县"
+ 2322 county="[-1991]晋县"
+ 2323 county="[-1993]深泽县"
+ 2324 county="[-1993]无极县"
+ 2325 county="[-1989]藁城县"
+ 2326 county="[-1993]赵县"
+ 2327 county="[-1986]栾城县"
+ 2328 county="[-1986]正定县"
+ 2329 county="[-1992]新乐县"
+ 2330 county="[-1993]高邑县"
+ 2331 county="[-1993]元氏县"
+ 2332 county="[-1993]赞皇县"
+ 2333 county="[-1983]井陉县"
+ 2334 county="[-1983]获鹿县"
+ 2335 county="[-1993]平山县"
+ 2336 county="[-1993]灵寿县"
+ 2337 county="[-1993]行唐县"
+ 2400 county="[-1994]保定地区"
+ 2401 county="[1986-1994]定州市"
+ 2402 county="[1986-1994]涿州市"
+ 2403 county="[1991-1994]安国市"
+ 2404 county="[1993-1994]高碑店市"
+ 2421 county="[-1994]易县"
+ 2422 county="[-1983]满城县"
+ 2423 county="[-1994]徐水县"
+ 2424 county="[-1994]涞源县"
+ 2425 county="[-1994]定兴县"
+ 2426 county="[-1992]完县,[1993-1994]顺平县"
+ 2427 county="[-1994]唐县"
+ 2428 county="[-1994]望都县"
+ 2429 county="[-1994]涞水县"
+ 2430 county="[-1986]涿县"
+ 2431 county="[-1986]清苑县"
+ 2432 county="[-1994]高阳县"
+ 2433 county="[-1994]安新县"
+ 2434 county="[-1994]雄县"
+ 2435 county="[-1994]容城县"
+ 2436 county="[-1993]新城县"
+ 2437 county="[-1994]曲阳县"
+ 2438 county="[-1994]阜平县"
+ 2439 county="[-1986]定县"
+ 2440 county="[-1991]安国县"
+ 2441 county="[-1994]博野县"
+ 2442 county="[-1994]蠡县"
+ 2500 county="[-1993]张家口地区"
+ 2501 county="[-1983]张家口市"
+ 2521 county="[-1993]张北县"
+ 2522 county="[-1993]康保县"
+ 2523 county="[-1993]沽源县"
+ 2524 county="[-1993]尚义县"
+ 2525 county="[-1993]蔚县"
+ 2526 county="[-1993]阳原县"
+ 2527 county="[-1993]怀安县"
+ 2528 county="[-1993]万全县"
+ 2529 county="[-1993]怀来县"
+ 2530 county="[-1993]涿鹿县"
+ 2531 county="[-1983]宣化县"
+ 2532 county="[-1993]赤城县"
+ 2533 county="[-1993]崇礼县"
+ 2600 county="[-1993]承德地区"
+ 2601 county="[-1983]承德市"
+ 2621 county="[-1983]青龙县"
+ 2622 county="[-1988]宽城县,[1989-1993]宽城满族自治县"
+ 2623 county="[-1993]兴隆县"
+ 2624 county="[-1993]平泉县"
+ 2625 county="[-1983]承德县"
+ 2626 county="[-1993]滦平县"
+ 2627 county="[-1985]丰宁县,[1986-1993]丰宁满族自治县"
+ 2628 county="[-1993]隆化县"
+ 2629 county="[-1988]围场县,[1989-1993]围场满族蒙古族自治县"
+ 2700 county="[-1983]唐山地区"
+ 2701 county="[-1983]秦皇岛市"
+ 2721 county="[-1983]丰润县"
+ 2722 county="[-1983]丰南县"
+ 2723 county="[-1983]滦县"
+ 2724 county="[-1983]滦南县"
+ 2725 county="[-1983]乐亭县"
+ 2726 county="[-1983]昌黎县"
+ 2727 county="[-1983]抚宁县"
+ 2728 county="[-1983]卢龙县"
+ 2729 county="[-1983]迁安县"
+ 2730 county="[-1983]迁西县"
+ 2731 county="[-1983]遵化县"
+ 2732 county="[-1983]玉田县"
+ 2800 county="[-1988]廊坊地区"
+ 2801 county="[1981-1988]廊坊市"
+ 2821 county="[-1988]三河县"
+ 2822 county="[-1988]大厂回族自治县"
+ 2823 county="[-1988]香河县"
+ 2824 county="[-1983]安次县"
+ 2825 county="[-1988]永清县"
+ 2826 county="[-1988]固安县"
+ 2827 county="[-1988]霸县"
+ 2828 county="[-1988]文安县"
+ 2829 county="[-1988]大城县"
+ 2900 county="[-1993]沧州地区"
+ 2901 county="[-1983]沧州市"
+ 2902 county="[1982-1993]泊头市"
+ 2903 county="[1986-1993]任丘市"
+ 2904 county="[1989-1993]黄骅市"
+ 2905 county="[1990-1993]河间市"
+ 2921 county="[-1983]沧县"
+ 2922 county="[-1990]河间县"
+ 2923 county="[-1993]肃宁县"
+ 2924 county="[-1993]献县"
+ 2925 county="[-1983]交河县"
+ 2926 county="[-1993]吴桥县"
+ 2927 county="[-1993]东光县"
+ 2928 county="[-1993]南皮县"
+ 2929 county="[-1993]盐山县"
+ 2930 county="[-1989]黄骅县"
+ 2931 county="[-1993]孟村回族自治县"
+ 2932 county="[-1986]青县"
+ 2933 county="[-1986]任丘县"
+ 2934 county="[-1993]海兴县"
+ 3000 county="[-1996]衡水地区"
+ 3001 county="[1982-1996]衡水市"
+ 3002 county="[1993-1996]冀州市"
+ 3003 county="[1994-1996]深州市"
+ 3021 county="[-1983]衡水县"
+ 3022 county="[-1993]冀县"
+ 3023 county="[-1996]枣强县"
+ 3024 county="[-1996]武邑县"
+ 3025 county="[-1994]深县"
+ 3026 county="[-1996]武强县"
+ 3027 county="[-1996]饶阳县"
+ 3028 county="[-1996]安平县"
+ 3029 county="[-1996]故城县"
+ 3030 county="[-1996]景县"
+ 3031 county="[-1996]阜城县"
+ 9000 county="[1988-1989]省直辖县级行政单位"
+ 9001 county="[1988-1989]武安市"
+14 province="山西省"
+ 0000 county="山西省"
+ 0100 county="太原市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-1997]南城区"
+ 0103 county="[1983-1997]北城区"
+ 0104 county="[1983-1997]河西区"
+ 0105 county="[1997-]小店区"
+ 0106 county="[1997-]迎泽区"
+ 0107 county="[1997-]杏花岭区"
+ 0108 county="[1997-]尖草坪区"
+ 0109 county="[1997-]万柏林区"
+ 0110 county="[1997-]晋源区"
+ 0111 county="[1983-1988]古交工矿区"
+ 0112 county="[1983-1997]南郊区"
+ 0113 county="[1983-1997]北郊区"
+ 0120 county="[-1983]市区"
+ 0121 county="清徐县"
+ 0122 county="阳曲县"
+ 0123 county="娄烦县"
+ 0181 county="[1989-]古交市"
+ 0200 county="大同市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-2018]城区"
+ 0203 county="[1983-2018]矿区"
+ 0211 county="[1983-2018]南郊区"
+ 0212 county="[1983-]新荣区"
+ 0213 county="[2018-]平城区"
+ 0214 county="[2018-]云冈区"
+ 0215 county="[2018-]云州区"
+ 0221 county="[1993-]阳高县"
+ 0222 county="[1993-]天镇县"
+ 0223 county="[1993-]广灵县"
+ 0224 county="[1993-]灵丘县"
+ 0225 county="[1993-]浑源县"
+ 0226 county="[1993-]左云县"
+ 0227 county="[1993-2018]大同县"
+ 0300 county="阳泉市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]城区"
+ 0303 county="[1983-]矿区"
+ 0311 county="[1983-]郊区"
+ 0321 county="[1983-]平定县"
+ 0322 county="[1983-]盂县"
+ 0400 county="长治市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-2018]城区"
+ 0403 county="[2018-]潞州区"
+ 0404 county="[2018-]上党区"
+ 0405 county="[2018-]屯留区"
+ 0406 county="[2018-]潞城区"
+ 0411 county="[1983-2018]郊区"
+ 0421 county="[1983-2018]长治县"
+ 0422 county="[1983-1994]潞城县"
+ 0423 county="[1985-]襄垣县"
+ 0424 county="[1985-2018]屯留县"
+ 0425 county="[1985-]平顺县"
+ 0426 county="[1985-]黎城县"
+ 0427 county="[1985-]壶关县"
+ 0428 county="[1985-]长子县"
+ 0429 county="[1985-]武乡县"
+ 0430 county="[1985-]沁县"
+ 0431 county="[1985-]沁源县"
+ 0481 county="[1994-2018]潞城市"
+ 0500 county="[1985-]晋城市"
+ 0501 county="[1985-]市辖区"
+ 0502 county="[1985-]城区"
+ 0511 county="[1985-1996]郊区"
+ 0521 county="[1985-]沁水县"
+ 0522 county="[1985-]阳城县"
+ 0523 county="[1985-1993]高平县"
+ 0524 county="[1985-]陵川县"
+ 0525 county="[1996-]泽州县"
+ 0581 county="[1993-]高平市"
+ 0600 county="[1988-]朔州市"
+ 0601 county="[1988-]市辖区"
+ 0602 county="[1988-]朔城区"
+ 0603 county="[1988-]平鲁区"
+ 0621 county="[1988-]山阴县"
+ 0622 county="[1993-]应县"
+ 0623 county="[1993-]右玉县"
+ 0624 county="[1993-2018]怀仁县"
+ 0681 county="[2018-]怀仁市"
+ 0700 county="[1999-]晋中市"
+ 0701 county="[1999-]市辖区"
+ 0702 county="[1999-]榆次区"
+ 0703 county="[2019-]太谷区"
+ 0721 county="[1999-]榆社县"
+ 0722 county="[1999-]左权县"
+ 0723 county="[1999-]和顺县"
+ 0724 county="[1999-]昔阳县"
+ 0725 county="[1999-]寿阳县"
+ 0726 county="[1999-2019]太谷县"
+ 0727 county="[1999-]祁县"
+ 0728 county="[1999-]平遥县"
+ 0729 county="[1999-]灵石县"
+ 0781 county="[1999-]介休市"
+ 0800 county="[2000-]运城市"
+ 0801 county="[2000-]市辖区"
+ 0802 county="[2000-]盐湖区"
+ 0821 county="[2000-]临猗县"
+ 0822 county="[2000-]万荣县"
+ 0823 county="[2000-]闻喜县"
+ 0824 county="[2000-]稷山县"
+ 0825 county="[2000-]新绛县"
+ 0826 county="[2000-]绛县"
+ 0827 county="[2000-]垣曲县"
+ 0828 county="[2000-]夏县"
+ 0829 county="[2000-]平陆县"
+ 0830 county="[2000-]芮城县"
+ 0881 county="[2000-]永济市"
+ 0882 county="[2000-]河津市"
+ 0900 county="[2000-]忻州市"
+ 0901 county="[2000-]市辖区"
+ 0902 county="[2000-]忻府区"
+ 0921 county="[2000-]定襄县"
+ 0922 county="[2000-]五台县"
+ 0923 county="[2000-]代县"
+ 0924 county="[2000-]繁峙县"
+ 0925 county="[2000-]宁武县"
+ 0926 county="[2000-]静乐县"
+ 0927 county="[2000-]神池县"
+ 0928 county="[2000-]五寨县"
+ 0929 county="[2000-]岢岚县"
+ 0930 county="[2000-]河曲县"
+ 0931 county="[2000-]保德县"
+ 0932 county="[2000-]偏关县"
+ 0981 county="[2000-]原平市"
+ 1000 county="[2000-]临汾市"
+ 1001 county="[2000-]市辖区"
+ 1002 county="[2000-]尧都区"
+ 1021 county="[2000-]曲沃县"
+ 1022 county="[2000-]翼城县"
+ 1023 county="[2000-]襄汾县"
+ 1024 county="[2000-]洪洞县"
+ 1025 county="[2000-]古县"
+ 1026 county="[2000-]安泽县"
+ 1027 county="[2000-]浮山县"
+ 1028 county="[2000-]吉县"
+ 1029 county="[2000-]乡宁县"
+ 1030 county="[2000-]大宁县"
+ 1031 county="[2000-]隰县"
+ 1032 county="[2000-]永和县"
+ 1033 county="[2000-]蒲县"
+ 1034 county="[2000-]汾西县"
+ 1081 county="[2000-]侯马市"
+ 1082 county="[2000-]霍州市"
+ 1100 county="[2003-]吕梁市"
+ 1101 county="[2003-]市辖区"
+ 1102 county="[2003-]离石区"
+ 1121 county="[2003-]文水县"
+ 1122 county="[2003-]交城县"
+ 1123 county="[2003-]兴县"
+ 1124 county="[2003-]临县"
+ 1125 county="[2003-]柳林县"
+ 1126 county="[2003-]石楼县"
+ 1127 county="[2003-]岚县"
+ 1128 county="[2003-]方山县"
+ 1129 county="[2003-]中阳县"
+ 1130 county="[2003-]交口县"
+ 1181 county="[2003-]孝义市"
+ 1182 county="[2003-]汾阳市"
+ 2100 county="[-1993]雁北地区"
+ 2121 county="[-1993]阳高县"
+ 2122 county="[-1993]天镇县"
+ 2123 county="[-1993]广灵县"
+ 2124 county="[-1993]灵丘县"
+ 2125 county="[-1993]浑源县"
+ 2126 county="[-1993]应县"
+ 2127 county="[-1988]山阴县"
+ 2128 county="[-1988]朔县"
+ 2129 county="[-1988]平鲁县"
+ 2130 county="[-1993]左云县"
+ 2131 county="[-1993]右玉县"
+ 2132 county="[-1993]大同县"
+ 2133 county="[-1993]怀仁县"
+ 2200 county="[-1982]忻县地区,[1983-1999]忻州地区"
+ 2201 county="[1983-2000]忻州市"
+ 2202 county="[1993-2000]原平市"
+ 2221 county="[-1983]忻县"
+ 2222 county="[-2000]定襄县"
+ 2223 county="[-2000]五台县"
+ 2224 county="[-1993]原平县"
+ 2225 county="[-2000]代县"
+ 2226 county="[-2000]繁峙县"
+ 2227 county="[-2000]宁武县"
+ 2228 county="[-2000]静乐县"
+ 2229 county="[-2000]神池县"
+ 2230 county="[-2000]五寨县"
+ 2231 county="[-2000]岢岚县"
+ 2232 county="[-2000]河曲县"
+ 2233 county="[-2000]保德县"
+ 2234 county="[-2000]偏关县"
+ 2300 county="[-2003]吕梁地区"
+ 2301 county="[1992-2003]孝义市"
+ 2302 county="[1996-2003]离石市"
+ 2303 county="[1996-2003]汾阳市"
+ 2321 county="[-1996]汾阳县"
+ 2322 county="[-2003]文水县"
+ 2323 county="[-2003]交城县"
+ 2324 county="[-1992]孝义县"
+ 2325 county="[-2003]兴县"
+ 2326 county="[-2003]临县"
+ 2327 county="[-2003]柳林县"
+ 2328 county="[-2003]石楼县"
+ 2329 county="[-2003]岚县"
+ 2330 county="[-2003]方山县"
+ 2331 county="[-1996]离石县"
+ 2332 county="[-2003]中阳县"
+ 2333 county="[-2003]交口县"
+ 2400 county="[-1999]晋中地区"
+ 2401 county="[-1999]榆次市"
+ 2402 county="[1992-1999]介休市"
+ 2421 county="[-1999]榆社县"
+ 2422 county="[-1999]左权县"
+ 2423 county="[-1999]和顺县"
+ 2424 county="[-1999]昔阳县"
+ 2425 county="[-1983]平定县"
+ 2426 county="[-1983]盂县"
+ 2427 county="[-1999]寿阳县"
+ 2428 county="[-1983]榆次县"
+ 2429 county="[-1999]太谷县"
+ 2430 county="[-1999]祁县"
+ 2431 county="[-1999]平遥县"
+ 2432 county="[-1992]介休县"
+ 2433 county="[-1999]灵石县"
+ 2500 county="[-1985]晋东南地区"
+ 2501 county="[1983-1985]晋城市"
+ 2521 county="[-1983]长治县"
+ 2522 county="[-1983]潞城县"
+ 2523 county="[-1985]屯留县"
+ 2524 county="[-1985]长子县"
+ 2525 county="[-1985]沁水县"
+ 2526 county="[-1985]阳城县"
+ 2527 county="[-1983]晋城县"
+ 2528 county="[-1985]高平县"
+ 2529 county="[-1985]陵川县"
+ 2530 county="[-1985]壶关县"
+ 2531 county="[-1985]平顺县"
+ 2532 county="[-1985]黎城县"
+ 2533 county="[-1985]武乡县"
+ 2534 county="[-1985]襄垣县"
+ 2535 county="[-1985]沁县"
+ 2536 county="[-1985]沁源县"
+ 2600 county="[-2000]临汾地区"
+ 2601 county="[-2000]临汾市"
+ 2602 county="[-2000]侯马市"
+ 2603 county="[1989-2000]霍州市"
+ 2621 county="[-2000]曲沃县"
+ 2622 county="[-2000]翼城县"
+ 2623 county="[-2000]襄汾县"
+ 2624 county="[-1983]临汾县"
+ 2625 county="[-2000]洪洞县"
+ 2626 county="[-1989]霍县"
+ 2627 county="[-2000]古县"
+ 2628 county="[-2000]安泽县"
+ 2629 county="[-2000]浮山县"
+ 2630 county="[-2000]吉县"
+ 2631 county="[-2000]乡宁县"
+ 2632 county="[-2000]蒲县"
+ 2633 county="[-2000]大宁县"
+ 2634 county="[-2000]永和县"
+ 2635 county="[-2000]隰县"
+ 2636 county="[-2000]汾西县"
+ 2700 county="[-2000]运城地区"
+ 2701 county="[1983-2000]运城市"
+ 2702 county="[1994-2000]永济市"
+ 2703 county="[1994-2000]河津市"
+ 2721 county="[-1983]运城县"
+ 2722 county="[-1994]永济县"
+ 2723 county="[-2000]芮城县"
+ 2724 county="[-2000]临猗县"
+ 2725 county="[-2000]万荣县"
+ 2726 county="[-2000]新绛县"
+ 2727 county="[-2000]稷山县"
+ 2728 county="[-1994]河津县"
+ 2729 county="[-2000]闻喜县"
+ 2730 county="[-2000]夏县"
+ 2731 county="[-2000]绛县"
+ 2732 county="[-2000]平陆县"
+ 2733 county="[-2000]垣曲县"
+ 9000 county="[1988-1989]省直辖县级行政单位"
+ 9001 county="[1988-1989]古交市"
+15 province="内蒙古自治区"
+ 0000 county="内蒙古自治区"
+ 0100 county="呼和浩特市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]新城区"
+ 0103 county="[1983-]回民区"
+ 0104 county="[1983-]玉泉区"
+ 0105 county="[1983-1999]郊区,[2000-]赛罕区"
+ 0120 county="[-1983]市区"
+ 0121 county="土默特左旗"
+ 0122 county="托克托县"
+ 0123 county="[1995-]和林格尔县"
+ 0124 county="[1995-]清水河县"
+ 0125 county="[1996-]武川县"
+ 0200 county="包头市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]东河区"
+ 0203 county="[1983-]昆都仑区"
+ 0204 county="[1983-]青山区"
+ 0205 county="[1983-1998]石拐矿区,[1999-]石拐区"
+ 0206 county="[1983-]白云鄂博矿区"
+ 0207 county="[1983-1998]郊区,[1999-]九原区"
+ 0220 county="[-1983]市区"
+ 0221 county="土默特右旗"
+ 0222 county="固阳县"
+ 0223 county="[1996-]达尔罕茂明安联合旗"
+ 0300 county="乌海市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]海勃湾区"
+ 0303 county="[1983-]海南区"
+ 0304 county="[1983-]乌达区"
+ 0400 county="[1983-]赤峰市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]红山区"
+ 0403 county="[1983-]元宝山区"
+ 0404 county="[1983-1992]郊区,[1993-]松山区"
+ 0421 county="[1983-]阿鲁科尔沁旗"
+ 0422 county="[1983-]巴林左旗"
+ 0423 county="[1983-]巴林右旗"
+ 0424 county="[1983-]林西县"
+ 0425 county="[1983-]克什克腾旗"
+ 0426 county="[1983-]翁牛特旗"
+ 0427 county="[1983-1983]赤峰县"
+ 0428 county="[1983-]喀喇沁旗"
+ 0429 county="[1983-]宁城县"
+ 0430 county="[1983-]敖汉旗"
+ 0500 county="[1999-]通辽市"
+ 0501 county="[1999-]市辖区"
+ 0502 county="[1999-]科尔沁区"
+ 0521 county="[1999-]科尔沁左翼中旗"
+ 0522 county="[1999-]科尔沁左翼后旗"
+ 0523 county="[1999-]开鲁县"
+ 0524 county="[1999-]库伦旗"
+ 0525 county="[1999-]奈曼旗"
+ 0526 county="[1999-]扎鲁特旗"
+ 0581 county="[1999-]霍林郭勒市"
+ 0600 county="[2001-]鄂尔多斯市"
+ 0601 county="[2001-]市辖区"
+ 0602 county="[2001-]东胜区"
+ 0603 county="[2016-]康巴什区"
+ 0621 county="[2001-]达拉特旗"
+ 0622 county="[2001-]准格尔旗"
+ 0623 county="[2001-]鄂托克前旗"
+ 0624 county="[2001-]鄂托克旗"
+ 0625 county="[2001-]杭锦旗"
+ 0626 county="[2001-]乌审旗"
+ 0627 county="[2001-]伊金霍洛旗"
+ 0700 county="[2001-]呼伦贝尔市"
+ 0701 county="[2001-]市辖区"
+ 0702 county="[2001-]海拉尔区"
+ 0703 county="[2013-]扎赉诺尔区"
+ 0721 county="[2001-]阿荣旗"
+ 0722 county="[2001-]莫力达瓦达斡尔族自治旗"
+ 0723 county="[2001-]鄂伦春自治旗"
+ 0724 county="[2001-]鄂温克族自治旗"
+ 0725 county="[2001-]陈巴尔虎旗"
+ 0726 county="[2001-]新巴尔虎左旗"
+ 0727 county="[2001-]新巴尔虎右旗"
+ 0781 county="[2001-]满洲里市"
+ 0782 county="[2001-]牙克石市"
+ 0783 county="[2001-]扎兰屯市"
+ 0784 county="[2001-]额尔古纳市"
+ 0785 county="[2001-]根河市"
+ 0800 county="[2003-]巴彦淖尔市"
+ 0801 county="[2003-]市辖区"
+ 0802 county="[2003-]临河区"
+ 0821 county="[2003-]五原县"
+ 0822 county="[2003-]磴口县"
+ 0823 county="[2003-]乌拉特前旗"
+ 0824 county="[2003-]乌拉特中旗"
+ 0825 county="[2003-]乌拉特后旗"
+ 0826 county="[2003-]杭锦后旗"
+ 0900 county="[2003-]乌兰察布市"
+ 0901 county="[2003-]市辖区"
+ 0902 county="[2003-]集宁区"
+ 0921 county="[2003-]卓资县"
+ 0922 county="[2003-]化德县"
+ 0923 county="[2003-]商都县"
+ 0924 county="[2003-]兴和县"
+ 0925 county="[2003-]凉城县"
+ 0926 county="[2003-]察哈尔右翼前旗"
+ 0927 county="[2003-]察哈尔右翼中旗"
+ 0928 county="[2003-]察哈尔右翼后旗"
+ 0929 county="[2003-]四子王旗"
+ 0981 county="[2003-]丰镇市"
+ 2100 county="[-2001]呼伦贝尔盟"
+ 2101 county="[-2001]海拉尔市"
+ 2102 county="[-2001]满洲里市"
+ 2103 county="[1983-2001]扎兰屯市"
+ 2104 county="[1983-2001]牙克石市"
+ 2105 county="[1994-2001]根河市"
+ 2106 county="[1994-2001]额尔古纳市"
+ 2121 county="[-1983]布特哈旗"
+ 2122 county="[-2001]阿荣旗"
+ 2123 county="[-2001]莫力达瓦达斡尔族自治旗"
+ 2124 county="[-1983]喜桂图旗"
+ 2125 county="[-1994]额尔古纳右旗"
+ 2126 county="[-1994]额尔古纳左旗"
+ 2127 county="[-2001]鄂伦春自治旗"
+ 2128 county="[-2001]鄂温克族自治旗"
+ 2129 county="[-2001]新巴尔虎右旗"
+ 2130 county="[-2001]新巴尔虎左旗"
+ 2131 county="[-2001]陈巴尔虎旗"
+ 2200 county="兴安盟"
+ 2201 county="乌兰浩特市"
+ 2202 county="[1996-]阿尔山市"
+ 2221 county="科尔沁右翼前旗"
+ 2222 county="科尔沁右翼中旗"
+ 2223 county="扎赉特旗"
+ 2224 county="突泉县"
+ 2300 county="[-1999]哲里木盟"
+ 2301 county="[-1999]通辽市"
+ 2302 county="[1985-1999]霍林郭勒市"
+ 2321 county="[-1986]通辽县"
+ 2322 county="[-1999]科尔沁左翼中旗"
+ 2323 county="[-1999]科尔沁左翼后旗"
+ 2324 county="[-1999]开鲁县"
+ 2325 county="[-1999]库伦旗"
+ 2326 county="[-1999]奈曼旗"
+ 2327 county="[-1999]扎鲁特旗"
+ 2400 county="[-1983]昭乌达盟"
+ 2401 county="[-1983]赤峰市"
+ 2421 county="[-1983]阿鲁科尔沁旗"
+ 2422 county="[-1983]巴林左旗"
+ 2423 county="[-1983]巴林右旗"
+ 2424 county="[-1983]林西县"
+ 2425 county="[-1983]克什克腾旗"
+ 2426 county="[-1983]翁牛特旗"
+ 2427 county="[-1983]赤峰县"
+ 2428 county="[-1983]喀喇沁旗"
+ 2429 county="[-1983]宁城县"
+ 2430 county="[-1983]敖汉旗"
+ 2500 county="锡林郭勒盟"
+ 2501 county="二连浩特市"
+ 2502 county="[1983-]锡林浩特市"
+ 2521 county="[-1983]阿巴哈纳尔旗"
+ 2522 county="阿巴嘎旗"
+ 2523 county="苏尼特左旗"
+ 2524 county="苏尼特右旗"
+ 2525 county="东乌珠穆沁旗"
+ 2526 county="西乌珠穆沁旗"
+ 2527 county="太仆寺旗"
+ 2528 county="镶黄旗"
+ 2529 county="正镶白旗"
+ 2530 county="正蓝旗"
+ 2531 county="多伦县"
+ 2600 county="[-2003]乌兰察布盟"
+ 2601 county="[-2003]集宁市"
+ 2602 county="[1990-2003]丰镇市"
+ 2621 county="[-1996]武川县"
+ 2622 county="[-1995]和林格尔县"
+ 2623 county="[-1995]清水河县"
+ 2624 county="[-2003]卓资县"
+ 2625 county="[-2003]化德县"
+ 2626 county="[-2003]商都县"
+ 2627 county="[-2003]兴和县"
+ 2628 county="[-1990]丰镇县"
+ 2629 county="[-2003]凉城县"
+ 2630 county="[-2003]察哈尔右翼前旗"
+ 2631 county="[-2003]察哈尔右翼中旗"
+ 2632 county="[-2003]察哈尔右翼后旗"
+ 2633 county="[-1996]达尔罕茂明安联合旗"
+ 2634 county="[-2003]四子王旗"
+ 2700 county="[-2001]伊克昭盟"
+ 2701 county="[1983-2001]东胜市"
+ 2721 county="[-1983]东胜县"
+ 2722 county="[-2001]达拉特旗"
+ 2723 county="[-2001]准格尔旗"
+ 2724 county="[-2001]鄂托克前旗"
+ 2725 county="[-2001]鄂托克旗"
+ 2726 county="[-2001]杭锦旗"
+ 2727 county="[-2001]乌审旗"
+ 2728 county="[-2001]伊金霍洛旗"
+ 2800 county="[-2003]巴彦淖尔盟"
+ 2801 county="[1984-2003]临河市"
+ 2821 county="[-1984]临河县"
+ 2822 county="[-2003]五原县"
+ 2823 county="[-2003]磴口县"
+ 2824 county="[-2003]乌拉特前旗"
+ 2825 county="[-2003]乌拉特中旗"
+ 2826 county="[-2003]乌拉特后旗"
+ 2827 county="[-2003]杭锦后旗"
+ 2900 county="阿拉善盟"
+ 2921 county="阿拉善左旗"
+ 2922 county="阿拉善右旗"
+ 2923 county="额济纳旗"
+21 province="辽宁省"
+ 0000 county="辽宁省"
+ 0100 county="沈阳市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]和平区"
+ 0103 county="[1983-]沈河区"
+ 0104 county="[1983-]大东区"
+ 0105 county="[1983-]皇姑区"
+ 0106 county="[1983-]铁西区"
+ 0111 county="[1983-]苏家屯区"
+ 0112 county="[1983-2013]东陵区,[2014-]浑南区"
+ 0113 county="[1983-2005]新城子区,[2006-]沈北新区"
+ 0114 county="[1983-]于洪区"
+ 0115 county="[2016-]辽中区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-1993]新民县"
+ 0122 county="[-2016]辽中县"
+ 0123 county="[1992-]康平县"
+ 0124 county="[1992-]法库县"
+ 0181 county="[1993-]新民市"
+ 0200 county="[-1980]旅大市,[1981-]大连市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]中山区"
+ 0203 county="[1983-]西岗区"
+ 0204 county="[1983-]沙河口区"
+ 0211 county="[1983-]甘井子区"
+ 0212 county="[1983-]旅顺口区"
+ 0213 county="[1987-]金州区"
+ 0214 county="[2015-]普兰店区"
+ 0219 county="[1985-1986]瓦房店市"
+ 0220 county="[-1983]市区"
+ 0221 county="[-1987]金县"
+ 0222 county="[-1991]新金县"
+ 0223 county="[-1985]复县"
+ 0224 county="长海县"
+ 0225 county="[-1992]庄河县"
+ 0281 county="[1989-]瓦房店市"
+ 0282 county="[1991-2015]普兰店市"
+ 0283 county="[1992-]庄河市"
+ 0300 county="鞍山市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]铁东区"
+ 0303 county="[1983-]铁西区"
+ 0304 county="[1983-]立山区"
+ 0311 county="[1983-1982]郊区,[1983-1995]旧堡区,[1996-]千山区"
+ 0319 county="[1985-1986]海城市"
+ 0320 county="[-1983]市区"
+ 0321 county="台安县"
+ 0322 county="[-1985]海城县"
+ 0323 county="[1992-]岫岩满族自治县"
+ 0381 county="[1989-]海城市"
+ 0400 county="抚顺市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]新抚区"
+ 0403 county="[1983-1998]露天区,[1999-]东洲区"
+ 0404 county="[1983-]望花区"
+ 0411 county="[1983-1987]郊区,[1988-]顺城区"
+ 0420 county="[-1983]市区"
+ 0421 county="抚顺县"
+ 0422 county="[-1984]新宾县,[1985-]新宾满族自治县"
+ 0423 county="[-1988]清原县,[1989-]清原满族自治县"
+ 0500 county="本溪市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-]平山区"
+ 0503 county="[1983-]溪湖区"
+ 0504 county="[1984-]明山区"
+ 0505 county="[1984-]南芬区"
+ 0511 county="[1983-1984]立新区"
+ 0520 county="[-1983]市区"
+ 0521 county="[-1988]本溪县,[1989-]本溪满族自治县"
+ 0522 county="[-1988]桓仁县,[1989-]桓仁满族自治县"
+ 0600 county="丹东市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-]元宝区"
+ 0603 county="[1983-]振兴区"
+ 0604 county="[1983-]振安区"
+ 0620 county="[-1983]市区"
+ 0621 county="[-1984]凤城县,[1985-1993]凤城满族自治县"
+ 0622 county="[-1984]岫岩县,[1985-1992]岫岩满族自治县"
+ 0623 county="[-1993]东沟县"
+ 0624 county="[-1988]宽甸县,[1989-]宽甸满族自治县"
+ 0681 county="[1993-]东港市"
+ 0682 county="[1994-]凤城市"
+ 0700 county="锦州市"
+ 0701 county="[1983-]市辖区"
+ 0702 county="[1983-]古塔区"
+ 0703 county="[1983-]凌河区"
+ 0704 county="[1983-1989]南票区"
+ 0705 county="[1983-1989]葫芦岛区"
+ 0711 county="[1983-]太和区"
+ 0719 county="[1985-1986]锦西市"
+ 0720 county="[-1983]市区"
+ 0721 county="[-1985]锦西县"
+ 0722 county="[-1986]兴城县"
+ 0723 county="[-1989]绥中县"
+ 0724 county="[-1993]锦县"
+ 0725 county="[-1988]北镇县,[1989-1994]北镇满族自治县"
+ 0726 county="黑山县"
+ 0727 county="义县"
+ 0781 county="[1993-]凌海市"
+ 0782 county="[1995-2005]北宁市,[2006-]北镇市"
+ 0800 county="营口市"
+ 0801 county="[1983-]市辖区"
+ 0802 county="[1983-]站前区"
+ 0803 county="[1983-]西市区"
+ 0804 county="[1986-]鲅鱼圈区"
+ 0811 county="[1983-1983]郊区,[1984-]老边区"
+ 0812 county="[1984-1986]鲅鱼圈区"
+ 0820 county="[-1983]市区"
+ 0821 county="[-1992]营口县"
+ 0822 county="[-1984]盘山县"
+ 0823 county="[-1984]大洼县"
+ 0824 county="[-1992]盖县"
+ 0881 county="[1992-]盖州市"
+ 0882 county="[1992-]大石桥市"
+ 0900 county="阜新市"
+ 0901 county="[1983-]市辖区"
+ 0902 county="[1983-]海州区"
+ 0903 county="[1983-]新邱区"
+ 0904 county="[1983-]太平区"
+ 0905 county="[1983-]清河门区"
+ 0911 county="[1983-1983]郊区,[1984-]细河区"
+ 0920 county="[-1983]市区"
+ 0921 county="阜新蒙古族自治县"
+ 0922 county="彰武县"
+ 1000 county="辽阳市"
+ 1001 county="[1983-]市辖区"
+ 1002 county="[1983-]白塔区"
+ 1003 county="[1983-]文圣区"
+ 1004 county="[1983-]宏伟区"
+ 1005 county="[1984-]弓长岭区"
+ 1011 county="[1983-1983]郊区,[1984-]太子河区"
+ 1020 county="[-1983]市区"
+ 1021 county="辽阳县"
+ 1022 county="[-1996]灯塔县"
+ 1081 county="[1996-]灯塔市"
+ 1100 county="[1984-]盘锦市"
+ 1101 county="[1984-]市辖区"
+ 1102 county="[1984-1985]盘山区,[1986-]双台子区"
+ 1103 county="[1984-]兴隆台区"
+ 1104 county="[2016-]大洼区"
+ 1111 county="[1984-1986]郊区"
+ 1121 county="[1984-2016]大洼县"
+ 1122 county="[1986-]盘山县"
+ 1200 county="[1984-]铁岭市"
+ 1201 county="[1984-]市辖区"
+ 1202 county="[1984-]银州区"
+ 1203 county="[1984-1986]铁法区"
+ 1204 county="[1984-]清河区"
+ 1221 county="[1984-]铁岭县"
+ 1222 county="[1984-1988]开原县"
+ 1223 county="[1984-]西丰县"
+ 1224 county="[1984-]昌图县"
+ 1225 county="[1984-1992]康平县"
+ 1226 county="[1984-1992]法库县"
+ 1281 county="[1989-2001]铁法市,[2002-]调兵山市"
+ 1282 county="[1989-]开原市"
+ 1300 county="[1984-]朝阳市"
+ 1301 county="[1984-]市辖区"
+ 1302 county="[1984-]双塔区"
+ 1303 county="[1984-]龙城区"
+ 1319 county="[1985-1986]北票市"
+ 1321 county="[1984-]朝阳县"
+ 1322 county="[1984-]建平县"
+ 1323 county="[1984-1991]凌源县"
+ 1324 county="[1984-]喀喇沁左翼蒙古族自治县"
+ 1325 county="[1984-1989]建昌县"
+ 1326 county="[1984-1985]北票县"
+ 1381 county="[1989-]北票市"
+ 1382 county="[1991-]凌源市"
+ 1400 county="[1989-1993]锦西市,[1994-]葫芦岛市"
+ 1401 county="[1989-]市辖区"
+ 1402 county="[1989-]连山区"
+ 1403 county="[1989-1993]葫芦岛区,[1994-]龙港区"
+ 1404 county="[1989-]南票区"
+ 1421 county="[1989-]绥中县"
+ 1422 county="[1989-]建昌县"
+ 1481 county="[1989-]兴城市"
+ 2100 county="[-1984]铁岭地区"
+ 2101 county="[-1984]铁岭市"
+ 2102 county="[1981-1984]铁法市"
+ 2121 county="[-1984]铁岭县"
+ 2122 county="[-1984]开原县"
+ 2123 county="[-1984]西丰县"
+ 2124 county="[-1984]昌图县"
+ 2125 county="[-1984]康平县"
+ 2126 county="[-1984]法库县"
+ 2200 county="[-1984]朝阳地区"
+ 2201 county="[-1984]朝阳市"
+ 2221 county="[-1984]朝阳县"
+ 2222 county="[-1984]建平县"
+ 2223 county="[-1984]凌源县"
+ 2224 county="[-1984]喀喇沁左翼蒙古族自治县"
+ 2225 county="[-1984]建昌县"
+ 2226 county="[-1984]北票县"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]瓦房店市"
+ 9002 county="[1986-1989]海城市"
+ 9003 county="[1986-1989]锦西市"
+ 9004 county="[1986-1989]兴城市"
+ 9005 county="[1986-1989]铁法市"
+ 9006 county="[1986-1989]北票市"
+ 9007 county="[1988-1989]开原市"
+22 province="吉林省"
+ 0000 county="吉林省"
+ 0100 county="长春市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]南关区"
+ 0103 county="[1983-]宽城区"
+ 0104 county="[1983-]朝阳区"
+ 0105 county="[1983-1994]二道河子区,[1995-]二道区"
+ 0106 county="[1995-]绿园区"
+ 0111 county="[1983-1995]郊区"
+ 0112 county="[1995-]双阳区"
+ 0113 county="[2014-]九台区"
+ 0120 county="[-1983]市区"
+ 0121 county="[1983-1990]榆树县"
+ 0122 county="[1983-]农安县"
+ 0123 county="[1983-1988]九台县"
+ 0124 county="[1983-1994]德惠县"
+ 0125 county="[1983-1995]双阳县"
+ 0181 county="[1989-2014]九台市"
+ 0182 county="[1990-]榆树市"
+ 0183 county="[1994-]德惠市"
+ 0184 county="[2020-]公主岭市"
+ 0200 county="吉林市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]昌邑区"
+ 0203 county="[1983-]龙潭区"
+ 0204 county="[1983-]船营区"
+ 0211 county="[1983-1991]郊区,[1992-]丰满区"
+ 0220 county="[-1983]市区"
+ 0221 county="[1983-]永吉县"
+ 0222 county="[1983-1992]舒兰县"
+ 0223 county="[1983-1995]磐石县"
+ 0224 county="[1983-1989]蛟河县"
+ 0225 county="[1983-1988]桦甸县"
+ 0281 county="[1989-]蛟河市"
+ 0282 county="[1989-]桦甸市"
+ 0283 county="[1992-]舒兰市"
+ 0284 county="[1995-]磐石市"
+ 0300 county="[1983-]四平市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]铁西区"
+ 0303 county="[1983-]铁东区"
+ 0319 county="[1985-1986]公主岭市"
+ 0321 county="[1983-1985]怀德县"
+ 0322 county="[1983-]梨树县"
+ 0323 county="[1983-1987]伊通县,[1988-]伊通满族自治县"
+ 0324 county="[1983-1996]双辽县"
+ 0381 county="[1989-2020]公主岭市"
+ 0382 county="[1996-]双辽市"
+ 0400 county="[1983-]辽源市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]龙山区"
+ 0403 county="[1983-]西安区"
+ 0421 county="[1983-]东丰县"
+ 0422 county="[1983-]东辽县"
+ 0500 county="[1985-]通化市"
+ 0501 county="[1986-]市辖区"
+ 0502 county="[1986-]东昌区"
+ 0503 county="[1986-]二道江区"
+ 0519 county="[1985-1986]梅河口市"
+ 0521 county="[1985-]通化县"
+ 0522 county="[1985-1988]集安县"
+ 0523 county="[1985-]辉南县"
+ 0524 county="[1985-]柳河县"
+ 0581 county="[1989-]梅河口市"
+ 0582 county="[1989-]集安市"
+ 0600 county="[1985-1993]浑江市,[1994-]白山市"
+ 0601 county="[1986-]市辖区"
+ 0602 county="[1986-2009]八道江区,[2010-]浑江区"
+ 0603 county="[1986-1995]三岔子区"
+ 0604 county="[1986-1992]临江区"
+ 0605 county="[2006-]江源区"
+ 0621 county="[1985-]抚松县"
+ 0622 county="[1985-]靖宇县"
+ 0623 county="[1985-]长白朝鲜族自治县"
+ 0624 county="[1992-1993]临江县"
+ 0625 county="[1995-2006]江源县"
+ 0681 county="[1993-]临江市"
+ 0700 county="[1992-]松原市"
+ 0701 county="[1992-]市辖区"
+ 0702 county="[1992-1994]扶余区,[1995-]宁江区"
+ 0721 county="[1992-]前郭尔罗斯蒙古族自治县"
+ 0722 county="[1992-]长岭县"
+ 0723 county="[1992-]乾安县"
+ 0724 county="[1995-2013]扶余县"
+ 0781 county="[2013-]扶余市"
+ 0800 county="[1993-]白城市"
+ 0801 county="[1993-]市辖区"
+ 0802 county="[1993-]洮北区"
+ 0821 county="[1993-]镇赉县"
+ 0822 county="[1993-]通榆县"
+ 0881 county="[1993-]洮南市"
+ 0882 county="[1993-]大安市"
+ 2100 county="[-1983]四平地区"
+ 2101 county="[-1983]四平市"
+ 2102 county="[-1983]辽源市"
+ 2121 county="[-1983]怀德县"
+ 2122 county="[-1983]梨树县"
+ 2123 county="[-1983]伊通县"
+ 2124 county="[-1983]双辽县"
+ 2125 county="[-1983]东丰县"
+ 2200 county="[-1985]通化地区"
+ 2201 county="[-1985]通化市"
+ 2202 county="[-1985]浑江市"
+ 2221 county="[-1985]海龙县"
+ 2222 county="[-1985]通化县"
+ 2223 county="[-1985]柳河县"
+ 2224 county="[-1985]辉南县"
+ 2225 county="[-1985]集安县"
+ 2226 county="[-1985]抚松县"
+ 2227 county="[-1985]靖宇县"
+ 2228 county="[-1985]长白朝鲜族自治县"
+ 2300 county="[-1993]白城地区"
+ 2301 county="[-1993]白城市"
+ 2302 county="[1987-1993]洮南市"
+ 2303 county="[1987-1992]扶余市"
+ 2304 county="[1988-1993]大安市"
+ 2321 county="[-1987]扶余县"
+ 2322 county="[-1987]洮安县"
+ 2323 county="[-1992]长岭县"
+ 2324 county="[-1992]前郭尔罗斯蒙古族自治县"
+ 2325 county="[-1988]大安县"
+ 2326 county="[-1993]镇赉县"
+ 2327 county="[-1993]通榆县"
+ 2328 county="[-1992]乾安县"
+ 2400 county="延边朝鲜族自治州"
+ 2401 county="延吉市"
+ 2402 county="图们市"
+ 2403 county="[1985-]敦化市"
+ 2404 county="[1988-]珲春市"
+ 2405 county="[1988-]龙井市"
+ 2406 county="[1993-]和龙市"
+ 2421 county="[-1982]延吉县,[1983-1987]龙井县"
+ 2422 county="[-1985]敦化县"
+ 2423 county="[-1993]和龙县"
+ 2424 county="汪清县"
+ 2425 county="[-1988]珲春县"
+ 2426 county="安图县"
+ 2500 county="[1982-1983]德惠地区"
+ 2521 county="[1982-1983]榆树县"
+ 2522 county="[1982-1983]农安县"
+ 2523 county="[1982-1983]九台县"
+ 2524 county="[1982-1983]德惠县"
+ 2525 county="[1982-1983]双阳县"
+ 2600 county="[1982-1983]永吉地区"
+ 2621 county="[1982-1983]永吉县"
+ 2622 county="[1982-1983]舒兰县"
+ 2623 county="[1982-1983]磐石县"
+ 2624 county="[1982-1983]蛟河县"
+ 2625 county="[1982-1983]桦甸县"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]公主岭市"
+ 9002 county="[1986-1989]梅河口市"
+ 9003 county="[1988-1989]集安市"
+ 9004 county="[1988-1989]桦甸市"
+ 9005 county="[1988-1989]九台市"
+23 province="黑龙江省"
+ 0000 county="黑龙江省"
+ 0100 county="哈尔滨市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]道里区"
+ 0103 county="[1983-]南岗区"
+ 0104 county="[1983-]道外区"
+ 0105 county="[1983-2004]太平区"
+ 0106 county="[1983-2006]香坊区"
+ 0107 county="[1983-2006]动力区"
+ 0108 county="[1983-]平房区"
+ 0109 county="[2004-]松北区"
+ 0110 county="[2006-]香坊区"
+ 0111 county="[2004-]呼兰区"
+ 0112 county="[2006-]阿城区"
+ 0113 county="[2014-]双城区"
+ 0121 county="[1983-2004]呼兰县"
+ 0122 county="[1983-1987]阿城县"
+ 0123 county="[1991-]依兰县"
+ 0124 county="[1991-]方正县"
+ 0125 county="[1991-]宾县"
+ 0126 county="[1996-]巴彦县"
+ 0127 county="[1996-]木兰县"
+ 0128 county="[1996-]通河县"
+ 0129 county="[1996-]延寿县"
+ 0181 county="[1989-2006]阿城市"
+ 0182 county="[1996-2014]双城市"
+ 0183 county="[1996-]尚志市"
+ 0184 county="[1996-]五常市"
+ 0200 county="齐齐哈尔市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]龙沙区"
+ 0203 county="[1983-]建华区"
+ 0204 county="[1983-]铁锋区"
+ 0205 county="[1983-]昂昂溪区"
+ 0206 county="[1983-]富拉尔基区"
+ 0207 county="[1983-1982]华安区,[1983-]碾子山区"
+ 0208 county="[1983-1987]梅里斯区,[1988-]梅里斯达斡尔族区"
+ 0221 county="[1984-]龙江县"
+ 0222 county="[1984-1992]讷河县"
+ 0223 county="[1984-]依安县"
+ 0224 county="[1984-]泰来县"
+ 0225 county="[1984-]甘南县"
+ 0226 county="[1984-1992]杜尔伯特蒙古族自治县"
+ 0227 county="[1984-]富裕县"
+ 0228 county="[1984-1992]林甸县"
+ 0229 county="[1984-]克山县"
+ 0230 county="[1984-]克东县"
+ 0231 county="[1984-]拜泉县"
+ 0281 county="[1992-]讷河市"
+ 0300 county="鸡西市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]鸡冠区"
+ 0303 county="[1983-]恒山区"
+ 0304 county="[1983-]滴道区"
+ 0305 county="[1983-]梨树区"
+ 0306 county="[1983-]城子河区"
+ 0307 county="[1983-]麻山区"
+ 0321 county="[1983-]鸡东县"
+ 0322 county="[1993-1996]虎林县"
+ 0381 county="[1996-]虎林市"
+ 0382 county="[1996-]密山市"
+ 0400 county="鹤岗市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]向阳区"
+ 0403 county="[1983-]工农区"
+ 0404 county="[1983-]南山区"
+ 0405 county="[1983-]兴安区"
+ 0406 county="[1983-]东山区"
+ 0407 county="[1983-]兴山区"
+ 0421 county="[1987-]萝北县"
+ 0422 county="[1987-]绥滨县"
+ 0500 county="双鸭山市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-]尖山区"
+ 0503 county="[1983-]岭东区"
+ 0504 county="[1983-1987]岭西区"
+ 0505 county="[1983-]四方台区"
+ 0506 county="[1983-]宝山区"
+ 0521 county="[1987-]集贤县"
+ 0522 county="[1991-]友谊县"
+ 0523 county="[1991-]宝清县"
+ 0524 county="[1993-]饶河县"
+ 0600 county="大庆市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-]萨尔图区"
+ 0603 county="[1983-]龙凤区"
+ 0604 county="[1983-]让胡路区"
+ 0605 county="[1983-]红岗区"
+ 0606 county="[1983-]大同区"
+ 0621 county="[1992-]肇州县"
+ 0622 county="[1992-]肇源县"
+ 0623 county="[1992-]林甸县"
+ 0624 county="[1992-]杜尔伯特蒙古族自治县"
+ 0700 county="伊春市"
+ 0701 county="[1983-]市辖区"
+ 0702 county="[1983-2019]伊春区"
+ 0703 county="[1983-2019]南岔区"
+ 0704 county="[1983-2019]友好区"
+ 0705 county="[1983-2019]西林区"
+ 0706 county="[1983-2019]翠峦区"
+ 0707 county="[1983-2019]新青区"
+ 0708 county="[1983-2019]美溪区"
+ 0709 county="[1983-1982]大丰区,[1983-2019]金山屯区"
+ 0710 county="[1983-2019]五营区"
+ 0711 county="[1983-1982]乌敏河区,[1983-2019]乌马河区"
+ 0712 county="[1983-1982]东风区,[1983-2019]汤旺河区"
+ 0713 county="[1983-2019]带岭区"
+ 0714 county="[1983-2019]乌伊岭区"
+ 0715 county="[1983-2019]红星区"
+ 0716 county="[1983-2019]上甘岭区"
+ 0717 county="[2019-]伊美区"
+ 0718 county="[2019-]乌翠区"
+ 0719 county="[2019-]友好区"
+ 0720 county="[-1983]市区"
+ 0721 county="[-1988]铁力县"
+ 0722 county="嘉荫县"
+ 0723 county="[2019-]汤旺县"
+ 0724 county="[2019-]丰林县"
+ 0725 county="[2019-]大箐山县"
+ 0726 county="[2019-]南岔县"
+ 0751 county="[2019-]金林区"
+ 0781 county="[1989-]铁力市"
+ 0800 county="[1983-]佳木斯市"
+ 0801 county="[1983-]市辖区"
+ 0802 county="[1983-2006]永红区"
+ 0803 county="[1983-]向阳区"
+ 0804 county="[1983-]前进区"
+ 0805 county="[1983-]东风区"
+ 0811 county="[1983-]郊区"
+ 0821 county="[1984-1988]富锦县"
+ 0822 county="[1984-]桦南县"
+ 0823 county="[1984-1991]依兰县"
+ 0824 county="[1984-1991]友谊县"
+ 0825 county="[1984-1987]集贤县"
+ 0826 county="[1984-]桦川县"
+ 0827 county="[1984-1991]宝清县"
+ 0828 county="[1984-]汤原县"
+ 0829 county="[1984-1987]绥滨县"
+ 0830 county="[1984-1987]萝北县"
+ 0831 county="[1984-1987]同江县"
+ 0832 county="[1984-1993]饶河县"
+ 0833 county="[1984-2016]抚远县"
+ 0881 county="[1989-]同江市"
+ 0882 county="[1989-]富锦市"
+ 0883 county="[2016-]抚远市"
+ 0900 county="[1983-]七台河市"
+ 0901 county="[1984-]市辖区"
+ 0902 county="[1984-]新兴区"
+ 0903 county="[1984-]桃山区"
+ 0904 county="[1984-]茄子河区"
+ 0921 county="[1983-]勃利县"
+ 1000 county="[1983-]牡丹江市"
+ 1001 county="[1983-]市辖区"
+ 1002 county="[1983-]东安区"
+ 1003 county="[1983-]阳明区"
+ 1004 county="[1983-]爱民区"
+ 1005 county="[1983-]西安区"
+ 1011 county="[1983-1997]郊区"
+ 1019 county="[1986-1987]镜泊湖市"
+ 1020 county="[1983-1986]绥芬河市"
+ 1021 county="[1983-1993]宁安县"
+ 1022 county="[1983-1992]海林县"
+ 1023 county="[1983-1995]穆棱县"
+ 1024 county="[1983-2015]东宁县"
+ 1025 county="[1983-]林口县"
+ 1026 county="[1983-1988]密山县"
+ 1027 county="[1983-1993]虎林县"
+ 1081 county="[1989-]绥芬河市"
+ 1082 county="[1989-1996]密山市"
+ 1083 county="[1992-]海林市"
+ 1084 county="[1993-]宁安市"
+ 1085 county="[1995-]穆棱市"
+ 1086 county="[2015-]东宁市"
+ 1100 county="[1993-]黑河市"
+ 1101 county="[1993-]市辖区"
+ 1102 county="[1993-]爱辉区"
+ 1121 county="[1993-2019]嫩江县"
+ 1122 county="[1993-1996]德都县"
+ 1123 county="[1993-]逊克县"
+ 1124 county="[1993-]孙吴县"
+ 1181 county="[1993-]北安市"
+ 1182 county="[1993-]五大连池市"
+ 1183 county="[2019-]嫩江市"
+ 1200 county="[1999-]绥化市"
+ 1201 county="[1999-]市辖区"
+ 1202 county="[1999-]北林区"
+ 1221 county="[1999-]望奎县"
+ 1222 county="[1999-]兰西县"
+ 1223 county="[1999-]青冈县"
+ 1224 county="[1999-]庆安县"
+ 1225 county="[1999-]明水县"
+ 1226 county="[1999-]绥棱县"
+ 1281 county="[1999-]安达市"
+ 1282 county="[1999-]肇东市"
+ 1283 county="[1999-]海伦市"
+ 2100 county="[-1996]松花江地区"
+ 2101 county="[1988-1996]双城市"
+ 2102 county="[1988-1996]尚志市"
+ 2103 county="[1993-1996]五常市"
+ 2121 county="[-1983]阿城县"
+ 2122 county="[-1991]宾县"
+ 2123 county="[-1983]呼兰县"
+ 2124 county="[-1988]双城县"
+ 2125 county="[-1993]五常县"
+ 2126 county="[-1996]巴彦县"
+ 2127 county="[-1996]木兰县"
+ 2128 county="[-1996]通河县"
+ 2129 county="[-1988]尚志县"
+ 2130 county="[-1991]方正县"
+ 2131 county="[-1996]延寿县"
+ 2200 county="[-1984]嫩江地区"
+ 2221 county="[-1984]龙江县"
+ 2222 county="[-1984]讷河县"
+ 2223 county="[-1984]依安县"
+ 2224 county="[-1984]泰来县"
+ 2225 county="[-1984]甘南县"
+ 2226 county="[-1984]杜尔伯特蒙古族自治县"
+ 2227 county="[-1984]富裕县"
+ 2228 county="[-1984]林甸县"
+ 2229 county="[-1984]克山县"
+ 2230 county="[-1984]克东县"
+ 2231 county="[-1984]拜泉县"
+ 2300 county="[-1999]绥化地区"
+ 2301 county="[1982-1999]绥化市"
+ 2302 county="[1984-1999]安达市"
+ 2303 county="[1986-1999]肇东市"
+ 2304 county="[1989-1999]海伦市"
+ 2321 county="[-1989]海伦县"
+ 2322 county="[-1986]肇东县"
+ 2323 county="[-1982]绥化县"
+ 2324 county="[-1999]望奎县"
+ 2325 county="[-1999]兰西县"
+ 2326 county="[-1999]青冈县"
+ 2327 county="[-1984]安达县"
+ 2328 county="[-1992]肇源县"
+ 2329 county="[-1992]肇州县"
+ 2330 county="[-1999]庆安县"
+ 2331 county="[-1999]明水县"
+ 2332 county="[-1999]绥棱县"
+ 2400 county="[-1984]合江地区"
+ 2401 county="[-1984]佳木斯市"
+ 2402 county="[-1984]七台河市"
+ 2421 county="[-1984]富锦县"
+ 2422 county="[-1984]桦南县"
+ 2423 county="[-1984]依兰县"
+ 2424 county="[-1983]勃利县"
+ 2425 county="[-1984]集贤县"
+ 2426 county="[-1984]桦川县"
+ 2427 county="[-1984]宝清县"
+ 2428 county="[-1984]汤原县"
+ 2429 county="[-1984]绥滨县"
+ 2430 county="[-1984]萝北县"
+ 2431 county="[-1984]同江县"
+ 2432 county="[-1984]饶河县"
+ 2433 county="[-1984]抚远县"
+ 2434 county="[1984-1984]友谊县"
+ 2500 county="[-1983]牡丹江地区"
+ 2501 county="[-1983]牡丹江市"
+ 2502 county="[-1983]绥芬河市"
+ 2521 county="[-1983]宁安县"
+ 2522 county="[-1983]海林县"
+ 2523 county="[-1983]穆棱县"
+ 2524 county="[-1983]东宁县"
+ 2525 county="[-1983]林口县"
+ 2526 county="[-1983]鸡东县"
+ 2527 county="[-1983]密山县"
+ 2528 county="[-1983]虎林县"
+ 2600 county="[-1993]黑河地区"
+ 2601 county="[-1993]黑河市"
+ 2602 county="[1982-1993]北安市"
+ 2603 county="[1983-1993]五大连池市"
+ 2621 county="[-1982]北安县"
+ 2622 county="[-1993]嫩江县"
+ 2623 county="[-1993]德都县"
+ 2624 county="[-1983]爱辉县"
+ 2625 county="[-1993]逊克县"
+ 2626 county="[-1993]孙吴县"
+ 2627 county="[1982-1983]通北县"
+ 2700 county="大兴安岭地区"
+ 2701 county="[1981-2018]加格達奇區,[2018-]漠河市"
+ 2702 county="[1981-2018]松嶺區"
+ 2703 county="[1981-2018]新林區"
+ 2704 county="[1981-2018]呼中區"
+ 2721 county="呼玛县"
+ 2722 county="[1981-]塔河县"
+ 2723 county="[1981-2018]漠河县"
+ 2761 county="[2018-]加格達奇區"
+ 2762 county="[2018-]松嶺區"
+ 2763 county="[2018-]新林區"
+ 2764 county="[2018-]呼中區"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]绥芬河市"
+ 9002 county="[1987-1989]阿城市"
+ 9003 county="[1987-1989]同江市"
+ 9004 county="[1988-1989]富锦市"
+ 9005 county="[1988-1989]铁力市"
+ 9006 county="[1988-1989]密山市"
+31 province="上海市"
+ 0000 county="上海市"
+ 0100 county="市辖区"
+ 0101 county="黄浦区"
+ 0102 county="[-2000]南市区"
+ 0103 county="[-2011]卢湾区"
+ 0104 county="徐汇区"
+ 0105 county="长宁区"
+ 0106 county="静安区"
+ 0107 county="普陀区"
+ 0108 county="[-2015]闸北区"
+ 0109 county="虹口区"
+ 0110 county="杨浦区"
+ 0111 county="[-1988]吴淞区"
+ 0112 county="[1981-]闵行区"
+ 0113 county="[1988-]宝山区"
+ 0114 county="[1992-]嘉定区"
+ 0115 county="[1992-]浦东新区"
+ 0116 county="[1997-]金山区"
+ 0117 county="[1998-]松江区"
+ 0118 county="[1999-]青浦区"
+ 0119 county="[2001-2009]南汇区"
+ 0120 county="[2001-]奉贤区"
+ 0151 county="[2016-]崇明区"
+ 0200 county="[-2016]县"
+ 0201 county="[-1982]上海县"
+ 0202 county="[-1982]嘉定县"
+ 0203 county="[-1982]宝山县"
+ 0204 county="[-1982]川沙县"
+ 0205 county="[-1982]南汇县"
+ 0206 county="[-1982]奉贤县"
+ 0207 county="[-1982]松江县"
+ 0208 county="[-1982]金山县"
+ 0209 county="[-1982]青浦县"
+ 0210 county="[-1982]崇明县"
+ 0221 county="[1982-1992]上海县"
+ 0222 county="[1982-1992]嘉定县"
+ 0223 county="[1982-1988]宝山县"
+ 0224 county="[1982-1992]川沙县"
+ 0225 county="[1982-2001]南汇县"
+ 0226 county="[1982-2001]奉贤县"
+ 0227 county="[1982-1998]松江县"
+ 0228 county="[1982-1997]金山县"
+ 0229 county="[1982-1999]青浦县"
+ 0230 county="[1982-2016]崇明县"
+32 province="江苏省"
+ 0000 county="江苏省"
+ 0100 county="南京市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]玄武区"
+ 0103 county="[1983-2013]白下区"
+ 0104 county="[1983-]秦淮区"
+ 0105 county="[1983-]建邺区"
+ 0106 county="[1983-]鼓楼区"
+ 0107 county="[1983-2013]下关区"
+ 0111 county="[1983-]浦口区"
+ 0112 county="[1983-2002]大厂区"
+ 0113 county="[1983-]栖霞区"
+ 0114 county="[1983-]雨花台区"
+ 0115 county="[2000-]江宁区"
+ 0116 county="[2002-]六合区"
+ 0117 county="[2013-]溧水区"
+ 0118 county="[2013-]高淳区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-2000]江宁县"
+ 0122 county="[-2002]江浦县"
+ 0123 county="[-2002]六合县"
+ 0124 county="[1983-2013]溧水县"
+ 0125 county="[1983-2013]高淳县"
+ 0200 county="无锡市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-2015]崇安区"
+ 0203 county="[1983-2015]南长区"
+ 0204 county="[1983-2015]北塘区"
+ 0205 county="[2000-]锡山区"
+ 0206 county="[2000-]惠山区"
+ 0211 county="[1983-1999]郊区,[2000-]滨湖区"
+ 0212 county="[1987-2000]马山区"
+ 0213 county="[2015-]梁溪区"
+ 0214 county="[2015-]新吴区"
+ 0221 county="[1983-1987]江阴县"
+ 0222 county="[1983-1995]无锡县"
+ 0223 county="[1983-1988]宜兴县"
+ 0281 county="[1989-]江阴市"
+ 0282 county="[1989-]宜兴市"
+ 0283 county="[1995-2000]锡山市"
+ 0300 county="徐州市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]鼓楼区"
+ 0303 county="[1983-]云龙区"
+ 0304 county="[1983-1994]矿区,[1995-2009]九里区"
+ 0305 county="[1983-]贾汪区"
+ 0311 county="[1983-1992]郊区,[1993-]泉山区"
+ 0312 county="[2010-]铜山区"
+ 0321 county="[1983-]丰县"
+ 0322 county="[1983-]沛县"
+ 0323 county="[1983-2010]铜山县"
+ 0324 county="[1983-]睢宁县"
+ 0325 county="[1983-1992]邳县"
+ 0326 county="[1983-1990]新沂县"
+ 0381 county="[1990-]新沂市"
+ 0382 county="[1992-]邳州市"
+ 0400 county="常州市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]天宁区"
+ 0403 county="[1983-1986]广化区"
+ 0404 county="[1983-]钟楼区"
+ 0405 county="[1983-2015]戚墅堰区"
+ 0411 county="[1983-2001]郊区,[2002-]新北区"
+ 0412 county="[2002-]武进区"
+ 0413 county="[2015-]金坛区"
+ 0421 county="[1983-1995]武进县"
+ 0422 county="[1983-1993]金坛县"
+ 0423 county="[1983-1990]溧阳县"
+ 0481 county="[1990-]溧阳市"
+ 0482 county="[1993-2015]金坛市"
+ 0483 county="[1995-2002]武进市"
+ 0500 county="苏州市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-2012]沧浪区"
+ 0503 county="[1983-2012]平江区"
+ 0504 county="[1983-2012]金阊区"
+ 0505 county="[2000-]虎丘区"
+ 0506 county="[2000-]吴中区"
+ 0507 county="[2000-]相城区"
+ 0508 county="[2012-]姑苏区"
+ 0509 county="[2012-]吴江区"
+ 0511 county="[1983-2000]郊区"
+ 0520 county="[1983-1986]常熟市"
+ 0521 county="[1983-1986]沙洲县"
+ 0522 county="[1983-1993]太仓县"
+ 0523 county="[1983-1989]昆山县"
+ 0524 county="[1983-1995]吴县"
+ 0525 county="[1983-1992]吴江县"
+ 0581 county="[1989-]常熟市"
+ 0582 county="[1989-]张家港市"
+ 0583 county="[1989-]昆山市"
+ 0584 county="[1992-2012]吴江市"
+ 0585 county="[1993-]太仓市"
+ 0586 county="[1995-2000]吴县市"
+ 0600 county="南通市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-1990]城区,[1991-2019]崇川区"
+ 0611 county="[1983-1990]郊区,[1991-2019]港闸区"
+ 0612 county="[2009-]通州区"
+ 0613 county="[2020-]崇川区"
+ 0614 county="[2020-]海门区"
+ 0621 county="[1983-2018]海安县"
+ 0622 county="[1983-1991]如皋县"
+ 0623 county="[1983-]如东县"
+ 0624 county="[1983-1993]南通县"
+ 0625 county="[1983-1994]海门县"
+ 0626 county="[1983-1989]启东县"
+ 0681 county="[1989-]启东市"
+ 0682 county="[1991-]如皋市"
+ 0683 county="[1993-2009]通州市"
+ 0684 county="[1994-2020]海门市"
+ 0685 county="[2018-]海安市"
+ 0700 county="连云港市"
+ 0701 county="[1983-]市辖区"
+ 0702 county="[1983-1986]新海区"
+ 0703 county="[1983-]连云区"
+ 0704 county="[1983-2001]云台区"
+ 0705 county="[1986-2014]新浦区"
+ 0706 county="[1986-]海州区"
+ 0707 county="[2014-]赣榆区"
+ 0721 county="[1983-2014]赣榆县"
+ 0722 county="[1983-]东海县"
+ 0723 county="[1983-]灌云县"
+ 0724 county="[1996-]灌南县"
+ 0800 county="[1983-1999]淮阴市,[2000-]淮安市"
+ 0801 county="[1983-]市辖区"
+ 0802 county="[1983-2016]清河区"
+ 0803 county="[2000-2010]楚州区,[2011-]淮安区"
+ 0804 county="[2000-]淮阴区"
+ 0811 county="[1983-2016]清浦区"
+ 0812 county="[2016-]清江浦区"
+ 0813 county="[2016-]洪泽区"
+ 0821 county="[1983-2000]淮阴县"
+ 0822 county="[1983-1996]灌南县"
+ 0823 county="[1983-1996]沭阳县"
+ 0824 county="[1983-1987]宿迁县"
+ 0825 county="[1983-1996]泗阳县"
+ 0826 county="[1983-]涟水县"
+ 0827 county="[1983-1996]泗洪县"
+ 0828 county="[1983-1987]淮安县"
+ 0829 county="[1983-2016]洪泽县"
+ 0830 county="[1983-]盱眙县"
+ 0831 county="[1983-]金湖县"
+ 0881 county="[1989-1996]宿迁市"
+ 0882 county="[1989-2000]淮安市"
+ 0900 county="[1983-]盐城市"
+ 0901 county="[1983-]市辖区"
+ 0902 county="[1983-2002]城区,[2003-]亭湖区"
+ 0903 county="[2003-]盐都区"
+ 0904 county="[2015-]大丰区"
+ 0911 county="[1983-1996]郊区"
+ 0921 county="[1983-]响水县"
+ 0922 county="[1983-]滨海县"
+ 0923 county="[1983-]阜宁县"
+ 0924 county="[1983-]射阳县"
+ 0925 county="[1983-]建湖县"
+ 0926 county="[1983-1996]大丰县"
+ 0927 county="[1983-1987]东台县"
+ 0928 county="[1996-2003]盐都县"
+ 0981 county="[1989-]东台市"
+ 0982 county="[1996-2015]大丰市"
+ 1000 county="[1983-]扬州市"
+ 1001 county="[1983-]市辖区"
+ 1002 county="[1983-]广陵区"
+ 1003 county="[2000-]邗江区"
+ 1011 county="[1983-2001]郊区,[2002-2010]维扬区"
+ 1012 county="[2011-]江都区"
+ 1020 county="[1983-1986]泰州市"
+ 1021 county="[1983-1987]兴化县"
+ 1022 county="[1983-1991]高邮县"
+ 1023 county="[1983-]宝应县"
+ 1024 county="[1983-1993]靖江县"
+ 1025 county="[1983-1992]泰兴县"
+ 1026 county="[1983-1994]江都县"
+ 1027 county="[1983-2000]邗江县"
+ 1028 county="[1983-1994]泰县"
+ 1029 county="[1983-1986]仪征县"
+ 1081 county="[1989-]仪征市"
+ 1082 county="[1989-1996]泰州市"
+ 1083 county="[1989-1996]兴化市"
+ 1084 county="[1991-]高邮市"
+ 1085 county="[1992-1996]泰兴市"
+ 1086 county="[1993-1996]靖江市"
+ 1087 county="[1994-1996]姜堰市"
+ 1088 county="[1994-2011]江都市"
+ 1100 county="[1983-]镇江市"
+ 1101 county="[1983-]市辖区"
+ 1102 county="[1983-1983]城区,[1984-]京口区"
+ 1111 county="[1983-1983]郊区,[1984-]润州区"
+ 1112 county="[2002-]丹徒区"
+ 1121 county="[1983-2002]丹徒县"
+ 1122 county="[1983-1987]丹阳县"
+ 1123 county="[1983-1995]句容县"
+ 1124 county="[1983-1994]扬中县"
+ 1181 county="[1989-]丹阳市"
+ 1182 county="[1994-]扬中市"
+ 1183 county="[1995-]句容市"
+ 1200 county="[1996-]泰州市"
+ 1201 county="[1996-]市辖区"
+ 1202 county="[1996-]海陵区"
+ 1203 county="[1997-]高港区"
+ 1204 county="[2012-]姜堰区"
+ 1281 county="[1996-]兴化市"
+ 1282 county="[1996-]靖江市"
+ 1283 county="[1996-]泰兴市"
+ 1284 county="[1996-2012]姜堰市"
+ 1300 county="[1996-]宿迁市"
+ 1301 county="[1996-]市辖区"
+ 1302 county="[1996-]宿城区"
+ 1311 county="[2004-]宿豫区"
+ 1321 county="[1996-2004]宿豫县"
+ 1322 county="[1996-]沭阳县"
+ 1323 county="[1996-]泗阳县"
+ 1324 county="[1996-]泗洪县"
+ 2100 county="[-1983]徐州地区"
+ 2121 county="[-1983]丰县"
+ 2122 county="[-1983]沛县"
+ 2123 county="[-1983]铜山县"
+ 2124 county="[-1983]睢宁县"
+ 2125 county="[-1983]邳县"
+ 2126 county="[-1983]新沂县"
+ 2127 county="[-1983]东海县"
+ 2128 county="[-1983]赣榆县"
+ 2200 county="[-1983]淮阴地区"
+ 2201 county="[-1983]清江市"
+ 2221 county="[-1983]淮阴县"
+ 2222 county="[-1983]灌云县"
+ 2223 county="[-1983]灌南县"
+ 2224 county="[-1983]沭阳县"
+ 2225 county="[-1983]宿迁县"
+ 2226 county="[-1983]泗阳县"
+ 2227 county="[-1983]涟水县"
+ 2228 county="[-1983]泗洪县"
+ 2229 county="[-1983]淮安县"
+ 2230 county="[-1983]洪泽县"
+ 2231 county="[-1983]盱眙县"
+ 2232 county="[-1983]金湖县"
+ 2300 county="[-1983]盐城地区"
+ 2321 county="[-1983]响水县"
+ 2322 county="[-1983]滨海县"
+ 2323 county="[-1983]阜宁县"
+ 2324 county="[-1983]射阳县"
+ 2325 county="[-1983]建湖县"
+ 2326 county="[-1983]盐城县"
+ 2327 county="[-1983]大丰县"
+ 2328 county="[-1983]东台县"
+ 2400 county="[-1983]扬州地区"
+ 2401 county="[-1983]扬州市"
+ 2402 county="[-1983]泰州市"
+ 2421 county="[-1983]兴化县"
+ 2422 county="[-1983]高邮县"
+ 2423 county="[-1983]宝应县"
+ 2424 county="[-1983]靖江县"
+ 2425 county="[-1983]泰兴县"
+ 2426 county="[-1983]江都县"
+ 2427 county="[-1983]邗江县"
+ 2428 county="[-1983]泰县"
+ 2429 county="[-1983]仪征县"
+ 2500 county="[-1983]南通地区"
+ 2521 county="[-1983]海安县"
+ 2522 county="[-1983]如皋县"
+ 2523 county="[-1983]如东县"
+ 2524 county="[-1983]南通县"
+ 2525 county="[-1983]海门县"
+ 2526 county="[-1983]启东县"
+ 2600 county="[-1983]镇江地区"
+ 2601 county="[-1983]镇江市"
+ 2621 county="[-1983]丹徒县"
+ 2622 county="[-1983]武进县"
+ 2623 county="[-1983]丹阳县"
+ 2624 county="[-1983]句容县"
+ 2625 county="[-1983]金坛县"
+ 2626 county="[-1983]溧水县"
+ 2627 county="[-1983]高淳县"
+ 2628 county="[-1983]溧阳县"
+ 2629 county="[-1983]宜兴县"
+ 2630 county="[-1983]扬中县"
+ 2700 county="[-1983]苏州地区"
+ 2721 county="[-1983]江阴县"
+ 2722 county="[-1983]无锡县"
+ 2723 county="[-1983]沙洲县"
+ 2724 county="[-1983]常熟县"
+ 2725 county="[-1983]太仓县"
+ 2726 county="[-1983]昆山县"
+ 2727 county="[-1983]吴县"
+ 2728 county="[-1983]吴江县"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]泰州市"
+ 9002 county="[1986-1989]仪征市"
+ 9003 county="[1986-1989]常熟市"
+ 9004 county="[1986-1989]张家港市"
+ 9005 county="[1987-1989]江阴市"
+ 9006 county="[1987-1989]宿迁市"
+ 9007 county="[1987-1989]丹阳市"
+ 9008 county="[1987-1989]东台市"
+ 9009 county="[1987-1989]兴化市"
+ 9010 county="[1987-1989]淮安市"
+ 9011 county="[1988-1989]宜兴市"
+33 province="浙江省"
+ 0000 county="浙江省"
+ 0100 county="杭州市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]上城区"
+ 0103 county="[1983-2021]下城区"
+ 0104 county="[1983-2021]江干区"
+ 0105 county="[1983-]拱墅区"
+ 0106 county="[1983-]西湖区"
+ 0107 county="[1983-1990]半山区"
+ 0108 county="[1996-]滨江区"
+ 0109 county="[2001-]萧山区"
+ 0110 county="[2001-]余杭区"
+ 0111 county="[2014-]富阳区"
+ 0112 county="[2017-]临安区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-1987]萧山县"
+ 0122 county="桐庐县"
+ 0123 county="[-1994]富阳县"
+ 0124 county="[-1996]临安县"
+ 0125 county="[-1994]余杭县"
+ 0126 county="[-1992]建德县"
+ 0127 county="淳安县"
+ 0181 county="[1989-2001]萧山市"
+ 0182 county="[1992-]建德市"
+ 0183 county="[1994-2014]富阳市"
+ 0184 county="[1994-2001]余杭市"
+ 0185 county="[1996-2017]临安市"
+ 0200 county="宁波市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-1984]镇明区"
+ 0203 county="[1983-]海曙区"
+ 0204 county="[1983-2016]江东区"
+ 0205 county="[1983-]江北区"
+ 0206 county="[1985-1986]滨海区,[1987-]北仑区"
+ 0211 county="[1985-]镇海区"
+ 0212 county="[2002-]鄞州区"
+ 0213 county="[2016-]奉化区"
+ 0219 county="[1985-1986]余姚市"
+ 0220 county="[-1983]市区"
+ 0221 county="[1982-1985]镇海县"
+ 0222 county="[1983-1988]慈溪县"
+ 0223 county="[1983-1985]余姚县"
+ 0224 county="[1983-1988]奉化县"
+ 0225 county="[1983-]象山县"
+ 0226 county="[1983-]宁海县"
+ 0227 county="[1983-2002]鄞县"
+ 0281 county="[1989-]余姚市"
+ 0282 county="[1989-]慈溪市"
+ 0283 county="[1989-2016]奉化市"
+ 0300 county="温州市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-1983]城区,[1984-]鹿城区"
+ 0303 county="[1984-]龙湾区"
+ 0304 county="[1992-]瓯海区"
+ 0305 county="[2015-]洞头区"
+ 0320 county="[-1983]市区"
+ 0321 county="[1981-1992]瓯海县"
+ 0322 county="[1981-2015]洞头县"
+ 0323 county="[1981-1993]乐清县"
+ 0324 county="[1981-]永嘉县"
+ 0325 county="[1981-1987]瑞安县"
+ 0326 county="[1981-]平阳县"
+ 0327 county="[1981-]苍南县"
+ 0328 county="[1981-]文成县"
+ 0329 county="[1981-]泰顺县"
+ 0381 county="[1989-]瑞安市"
+ 0382 county="[1993-]乐清市"
+ 0383 county="[2019-]龙港市"
+ 0400 county="[1983-]嘉兴市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-1992]城区,[1993-2004]秀城区,[2005-]南湖区"
+ 0411 county="[1983-1998]郊区,[1999-]秀洲区"
+ 0421 county="[1983-]嘉善县"
+ 0422 county="[1983-1991]平湖县"
+ 0423 county="[1983-1986]海宁县"
+ 0424 county="[1983-]海盐县"
+ 0425 county="[1983-1993]桐乡县"
+ 0481 county="[1989-]海宁市"
+ 0482 county="[1991-]平湖市"
+ 0483 county="[1993-]桐乡市"
+ 0500 county="[1983-]湖州市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-1987]城区,[2003-]吴兴区"
+ 0503 county="[2003-]南浔区"
+ 0511 county="[1983-1988]郊区"
+ 0521 county="[1983-]德清县"
+ 0522 county="[1983-]长兴县"
+ 0523 county="[1983-]安吉县"
+ 0600 county="[1983-]绍兴市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-]越城区"
+ 0603 county="[2013-]柯桥区"
+ 0604 county="[2013-]上虞区"
+ 0621 county="[1983-2013]绍兴县"
+ 0622 county="[1983-1992]上虞县"
+ 0623 county="[1983-1995]嵊县"
+ 0624 county="[1983-]新昌县"
+ 0625 county="[1983-1989]诸暨县"
+ 0681 county="[1989-]诸暨市"
+ 0682 county="[1992-2013]上虞市"
+ 0683 county="[1995-]嵊州市"
+ 0700 county="[1985-]金华市"
+ 0701 county="[1985-]市辖区"
+ 0702 county="[1985-]婺城区"
+ 0703 county="[2000-]金东区"
+ 0719 county="[1985-1986]兰溪市"
+ 0721 county="[1985-2000]金华县"
+ 0722 county="[1985-1992]永康县"
+ 0723 county="[1985-]武义县"
+ 0724 county="[1985-1988]东阳县"
+ 0725 county="[1985-1988]义乌县"
+ 0726 county="[1985-]浦江县"
+ 0727 county="[1985-]磐安县"
+ 0781 county="[1989-]兰溪市"
+ 0782 county="[1989-]义乌市"
+ 0783 county="[1989-]东阳市"
+ 0784 county="[1992-]永康市"
+ 0800 county="[1985-]衢州市"
+ 0801 county="[1985-]市辖区"
+ 0802 county="[1985-]柯城区"
+ 0803 county="[2001-]衢江区"
+ 0821 county="[1985-2001]衢县"
+ 0822 county="[1985-]常山县"
+ 0823 county="[1985-1987]江山县"
+ 0824 county="[1985-]开化县"
+ 0825 county="[1985-]龙游县"
+ 0881 county="[1989-]江山市"
+ 0900 county="[1987-]舟山市"
+ 0901 county="[1987-]市辖区"
+ 0902 county="[1987-]定海区"
+ 0903 county="[1987-]普陀区"
+ 0921 county="[1987-]岱山县"
+ 0922 county="[1987-]嵊泗县"
+ 1000 county="[1994-]台州市"
+ 1001 county="[1994-]市辖区"
+ 1002 county="[1994-]椒江区"
+ 1003 county="[1994-]黄岩区"
+ 1004 county="[1994-]路桥区"
+ 1021 county="[1994-2017]玉环县"
+ 1022 county="[1994-]三门县"
+ 1023 county="[1994-]天台县"
+ 1024 county="[1994-]仙居县"
+ 1081 county="[1994-]温岭市"
+ 1082 county="[1994-]临海市"
+ 1083 county="[2017-]玉环市"
+ 1100 county="[2000-]丽水市"
+ 1101 county="[2000-]市辖区"
+ 1102 county="[2000-]莲都区"
+ 1121 county="[2000-]青田县"
+ 1122 county="[2000-]缙云县"
+ 1123 county="[2000-]遂昌县"
+ 1124 county="[2000-]松阳县"
+ 1125 county="[2000-]云和县"
+ 1126 county="[2000-]庆元县"
+ 1127 county="[2000-]景宁畲族自治县"
+ 1181 county="[2000-]龙泉市"
+ 2100 county="[-1983]嘉兴地区"
+ 2101 county="[-1983]湖州市"
+ 2102 county="[-1983]嘉兴市"
+ 2121 county="[-1981]嘉兴县"
+ 2122 county="[-1983]嘉善县"
+ 2123 county="[-1983]平湖县"
+ 2124 county="[-1983]海宁县"
+ 2125 county="[-1983]海盐县"
+ 2126 county="[-1983]桐乡县"
+ 2127 county="[-1983]德清县"
+ 2128 county="[-1981]吴兴县"
+ 2129 county="[-1983]长兴县"
+ 2130 county="[-1983]安吉县"
+ 2200 county="[-1983]宁波地区"
+ 2221 county="[-1983]慈溪县"
+ 2222 county="[-1983]余姚县"
+ 2223 county="[-1983]奉化县"
+ 2224 county="[-1983]象山县"
+ 2225 county="[-1983]宁海县"
+ 2226 county="[-1983]鄞县"
+ 2227 county="[-1982]镇海县"
+ 2300 county="[-1983]绍兴地区"
+ 2301 county="[-1983]绍兴市"
+ 2321 county="[-1981]绍兴县"
+ 2322 county="[-1983]上虞县"
+ 2323 county="[-1983]嵊县"
+ 2324 county="[-1983]新昌县"
+ 2325 county="[-1983]诸暨县"
+ 2400 county="[-1981]温州地区,[1982-1985]金华地区"
+ 2401 county="[1982-1985]金华市"
+ 2402 county="[1982-1985]衢州市"
+ 2421 county="[-1981]洞头县,[1982-1985]兰溪县"
+ 2422 county="[-1981]永嘉县,[1982-1985]永康县"
+ 2423 county="[-1981]瑞安县,[1982-1985]武义县"
+ 2424 county="[-1981]文成县,[1982-1985]东阳县"
+ 2425 county="[-1981]平阳县,[1982-1985]义乌县"
+ 2426 county="[-1981]乐清县,[1982-1985]浦江县"
+ 2427 county="[-1981]泰顺县,[1982-1985]常山县"
+ 2428 county="[1982-1985]江山县"
+ 2429 county="[1982-1985]开化县"
+ 2430 county="[1983-1985]龙游县"
+ 2431 county="[1983-1985]磐安县"
+ 2500 county="[-1982]金华地区"
+ 2501 county="[-1982]金华市"
+ 2502 county="[-1982]衢州市"
+ 2521 county="[-1981]金华县"
+ 2522 county="[-1982]兰溪县"
+ 2523 county="[-1982]永康县"
+ 2524 county="[-1982]武义县"
+ 2525 county="[-1982]东阳县"
+ 2526 county="[-1982]义乌县"
+ 2527 county="[-1982]浦江县"
+ 2528 county="[-1981]衢县"
+ 2529 county="[-1982]常山县"
+ 2530 county="[-1982]江山县"
+ 2531 county="[-1982]开化县"
+ 2600 county="[-1982]丽水地区,[1982-1994]台州地区"
+ 2601 county="[1982-1994]椒江市"
+ 2602 county="[1986-1994]临海市"
+ 2603 county="[1989-1994]黄岩市"
+ 2621 county="[-1982]丽水县,[1982-1986]临海县"
+ 2622 county="[-1982]青田县,[1982-1989]黄岩县"
+ 2623 county="[-1982]云和县,[1982-1994]温岭县"
+ 2624 county="[-1982]龙泉县,[1982-1994]仙居县"
+ 2625 county="[-1982]庆元县,[1982-1994]天台县"
+ 2626 county="[-1982]缙云县,[1982-1994]三门县"
+ 2627 county="[-1982]遂昌县,[1982-1994]玉环县"
+ 2628 county="[1982-1982]松阳县"
+ 2700 county="[-1982]台州地区,[1982-1987]舟山地区"
+ 2701 county="[1981-1982]椒江市"
+ 2721 county="[-1982]临海县,[1982-1987]定海县"
+ 2722 county="[-1982]黄岩县,[1982-1987]普陀县"
+ 2723 county="[-1982]温岭县,[1982-1987]岱山县"
+ 2724 county="[-1982]仙居县,[1982-1987]嵊泗县"
+ 2725 county="[-1982]天台县"
+ 2726 county="[-1982]三门县"
+ 2727 county="[-1982]玉环县"
+ 2800 county="[-1982]舟山地区,[1982-2000]丽水地区"
+ 2801 county="[1986-2000]丽水市"
+ 2802 county="[1990-2000]龙泉市"
+ 2821 county="[-1982]定海县,[1982-1986]丽水县"
+ 2822 county="[-1982]普陀县,[1982-2000]青田县"
+ 2823 county="[-1982]岱山县,[1982-2000]云和县"
+ 2824 county="[-1982]嵊泗县,[1982-1990]龙泉县"
+ 2825 county="[1982-2000]庆元县"
+ 2826 county="[1982-2000]缙云县"
+ 2827 county="[1982-2000]遂昌县"
+ 2828 county="[1982-2000]松阳县"
+ 2829 county="[1984-2000]景宁畲族自治县"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]余姚市"
+ 9002 county="[1986-1989]海宁市"
+ 9003 county="[1986-1989]兰溪市"
+ 9004 county="[1987-1989]瑞安市"
+ 9005 county="[1987-1989]萧山市"
+ 9006 county="[1987-1989]江山市"
+ 9007 county="[1988-1989]义乌市"
+ 9008 county="[1988-1989]东阳市"
+ 9009 county="[1988-1989]慈溪市"
+ 9010 county="[1988-1989]奉化市"
+34 province="安徽省"
+ 0000 county="安徽省"
+ 0100 county="合肥市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-2001]东市区,[2002-]瑶海区"
+ 0103 county="[1983-2001]中市区,[2002-]庐阳区"
+ 0104 county="[1983-2001]西市区,[2002-]蜀山区"
+ 0111 county="[1983-2001]郊区,[2002-]包河区"
+ 0120 county="[-1983]市区"
+ 0121 county="长丰县"
+ 0122 county="[1983-]肥东县"
+ 0123 county="[1983-]肥西县"
+ 0124 county="[2011-]庐江县"
+ 0181 county="[2011-]巢湖市"
+ 0200 county="芜湖市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]镜湖区"
+ 0203 county="[1983-2004]马塘区,[2005-2020]弋江区"
+ 0204 county="[1983-2005]新芜区"
+ 0205 county="[1983-1990]裕溪口区"
+ 0206 county="[1983-1990]四褐山区"
+ 0207 county="[1990-]鸠江区"
+ 0208 county="[2005-2020]三山区"
+ 0209 county="[2020-]弋江区"
+ 0210 county="[2020-]湾沚区"
+ 0211 county="[1983-1990]郊区"
+ 0212 county="[2020-]繁昌区"
+ 0220 county="[-1983]市区"
+ 0221 county="[-2020]芜湖县"
+ 0222 county="[1983-2020]繁昌县"
+ 0223 county="[1983-]南陵县"
+ 0224 county="[1983-1988]青阳县"
+ 0225 county="[2011-2019]无为县"
+ 0281 county="[2019-]无为市"
+ 0300 county="蚌埠市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-2003]东市区,[2004-]龙子湖区"
+ 0303 county="[1983-2003]中市区,[2004-]蚌山区"
+ 0304 county="[1983-2003]西市区,[2004-]禹会区"
+ 0311 county="[1983-2003]郊区,[2004-]淮上区"
+ 0321 county="[1983-]怀远县"
+ 0322 county="[1983-]五河县"
+ 0323 county="[1983-]固镇县"
+ 0400 county="淮南市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]大通区"
+ 0403 county="[1983-]田家庵区"
+ 0404 county="[1983-]谢家集区"
+ 0405 county="[1983-]八公山区"
+ 0406 county="[1983-]潘集区"
+ 0420 county="[-1983]市区"
+ 0421 county="凤台县"
+ 0422 county="[2015-]寿县"
+ 0500 county="马鞍山市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-2012]金家庄区"
+ 0503 county="[1983-]花山区"
+ 0504 county="[1983-]雨山区"
+ 0505 county="[1983-2001]向山区"
+ 0506 county="[2012-]博望区"
+ 0521 county="[1983-]当涂县"
+ 0522 county="[2011-]含山县"
+ 0523 county="[2011-]和县"
+ 0600 county="淮北市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-]杜集区"
+ 0603 county="[1983-]相山区"
+ 0604 county="[1983-]烈山区"
+ 0611 county="[1983-1984]郊区"
+ 0620 county="[-1983]市区"
+ 0621 county="濉溪县"
+ 0700 county="铜陵市"
+ 0701 county="[1983-]市辖区"
+ 0702 county="[1983-2015]铜官山区"
+ 0703 county="[1983-2015]狮子山区"
+ 0704 county="[1983-1987]铜山区"
+ 0705 county="[2015-]铜官区"
+ 0706 county="[2015-]义安区"
+ 0711 county="[1983-]郊区"
+ 0720 county="[-1983]市区"
+ 0721 county="[-2015]铜陵县"
+ 0722 county="[2015-]枞阳县"
+ 0800 county="安庆市"
+ 0801 county="[1983-]市辖区"
+ 0802 county="[1983-]迎江区"
+ 0803 county="[1983-]大观区"
+ 0811 county="[1983-2004]郊区,[2005-]宜秀区"
+ 0821 county="[1988-1996]桐城县"
+ 0822 county="[1988-]怀宁县"
+ 0823 county="[1988-2015]枞阳县"
+ 0824 county="[1988-2018]潜山县"
+ 0825 county="[1988-]太湖县"
+ 0826 county="[1988-]宿松县"
+ 0827 county="[1988-]望江县"
+ 0828 county="[1988-]岳西县"
+ 0881 county="[1996-]桐城市"
+ 0882 county="[2018-]潜山市"
+ 0900 county="[1983-1987]省直辖行政单位"
+ 0901 county="[1983-1987]黄山市"
+ 1000 county="[1987-]黄山市"
+ 1001 county="[1987-]市辖区"
+ 1002 county="[1987-]屯溪区"
+ 1003 county="[1987-]黄山区"
+ 1004 county="[1987-]徽州区"
+ 1021 county="[1987-]歙县"
+ 1022 county="[1987-]休宁县"
+ 1023 county="[1987-]黟县"
+ 1024 county="[1987-]祁门县"
+ 1100 county="[1992-]滁州市"
+ 1101 county="[1992-]市辖区"
+ 1102 county="[1992-]琅琊区"
+ 1103 county="[1992-]南谯区"
+ 1121 county="[1992-1993]天长县"
+ 1122 county="[1992-]来安县"
+ 1124 county="[1992-]全椒县"
+ 1125 county="[1992-]定远县"
+ 1126 county="[1992-]凤阳县"
+ 1127 county="[1992-1994]嘉山县"
+ 1181 county="[1993-]天长市"
+ 1182 county="[1994-]明光市"
+ 1200 county="[1996-]阜阳市"
+ 1201 county="[1996-]市辖区"
+ 1202 county="[1996-]颍州区"
+ 1203 county="[1996-]颍东区"
+ 1204 county="[1996-]颍泉区"
+ 1221 county="[1996-]临泉县"
+ 1222 county="[1996-]太和县"
+ 1223 county="[1996-2000]涡阳县"
+ 1224 county="[1996-2000]蒙城县"
+ 1225 county="[1996-]阜南县"
+ 1226 county="[1996-]颍上县"
+ 1227 county="[1996-2000]利辛县"
+ 1281 county="[1996-2000]亳州市"
+ 1282 county="[1996-]界首市"
+ 1300 county="[1998-]宿州市"
+ 1301 county="[1998-]市辖区"
+ 1302 county="[1998-]埇桥区"
+ 1321 county="[1998-]砀山县"
+ 1322 county="[1998-]萧县"
+ 1323 county="[1998-]灵璧县"
+ 1324 county="[1998-]泗县"
+ 1400 county="[1999-2011]巢湖市"
+ 1401 county="[1999-2011]市辖区"
+ 1402 county="[1999-2011]居巢区"
+ 1421 county="[1999-2011]庐江县"
+ 1422 county="[1999-2011]无为县"
+ 1423 county="[1999-2011]含山县"
+ 1424 county="[1999-2011]和县"
+ 1500 county="[1999-]六安市"
+ 1501 county="[1999-]市辖区"
+ 1502 county="[1999-]金安区"
+ 1503 county="[1999-]裕安区"
+ 1504 county="[2015-]叶集区"
+ 1521 county="[1999-2015]寿县"
+ 1522 county="[1999-]霍邱县"
+ 1523 county="[1999-]舒城县"
+ 1524 county="[1999-]金寨县"
+ 1525 county="[1999-]霍山县"
+ 1600 county="[2000-]亳州市"
+ 1601 county="[2000-]市辖区"
+ 1602 county="[2000-]谯城区"
+ 1621 county="[2000-]涡阳县"
+ 1622 county="[2000-]蒙城县"
+ 1623 county="[2000-]利辛县"
+ 1700 county="[2000-]池州市"
+ 1701 county="[2000-]市辖区"
+ 1702 county="[2000-]贵池区"
+ 1721 county="[2000-]东至县"
+ 1722 county="[2000-]石台县"
+ 1723 county="[2000-]青阳县"
+ 1800 county="[2000-]宣城市"
+ 1801 county="[2000-]市辖区"
+ 1802 county="[2000-]宣州区"
+ 1821 county="[2000-]郎溪县"
+ 1822 county="[2000-2019]广德县"
+ 1823 county="[2000-]泾县"
+ 1824 county="[2000-]绩溪县"
+ 1825 county="[2000-]旌德县"
+ 1881 county="[2000-]宁国市"
+ 1882 county="[2019-]广德市"
+ 2100 county="[-1996]阜阳地区"
+ 2101 county="[-1996]阜阳市"
+ 2102 county="[1986-1996]亳州市"
+ 2103 county="[1989-1996]界首市"
+ 2121 county="[-1992]阜阳县"
+ 2122 county="[-1996]临泉县"
+ 2123 county="[-1996]太和县"
+ 2124 county="[-1996]涡阳县"
+ 2125 county="[-1996]蒙城县"
+ 2126 county="[-1986]亳县"
+ 2127 county="[-1996]阜南县"
+ 2128 county="[-1996]颍上县"
+ 2129 county="[-1989]界首县"
+ 2130 county="[-1996]利辛县"
+ 2200 county="[-1998]宿县地区"
+ 2201 county="[-1998]宿州市"
+ 2221 county="[-1998]砀山县"
+ 2222 county="[-1998]萧县"
+ 2223 county="[-1992]宿县"
+ 2224 county="[-1998]灵璧县"
+ 2225 county="[-1998]泗县"
+ 2226 county="[-1983]怀远县"
+ 2227 county="[-1983]五河县"
+ 2228 county="[-1983]固镇县"
+ 2300 county="[-1992]滁县地区"
+ 2301 county="[1982-1992]滁州市"
+ 2321 county="[-1992]天长县"
+ 2322 county="[-1992]来安县"
+ 2323 county="[-1982]滁县"
+ 2324 county="[-1992]全椒县"
+ 2325 county="[-1992]定远县"
+ 2326 county="[-1992]凤阳县"
+ 2327 county="[-1992]嘉山县"
+ 2400 county="[-1999]六安地区"
+ 2401 county="[-1999]六安市"
+ 2421 county="[-1992]六安县"
+ 2422 county="[-1999]寿县"
+ 2423 county="[-1999]霍邱县"
+ 2424 county="[-1983]肥西县"
+ 2425 county="[-1999]舒城县"
+ 2426 county="[-1999]金寨县"
+ 2427 county="[-1999]霍山县"
+ 2500 county="[-2000]宣城地区"
+ 2501 county="[1987-2000]宣州市"
+ 2502 county="[1997-2000]宁国市"
+ 2521 county="[-1987]宣城县"
+ 2522 county="[-2000]郎溪县"
+ 2523 county="[-2000]广德县"
+ 2524 county="[-1997]宁国县"
+ 2525 county="[-1983]当涂县"
+ 2526 county="[-1983]繁昌县"
+ 2527 county="[-1983]南陵县"
+ 2528 county="[-1983]青阳县"
+ 2529 county="[-2000]泾县"
+ 2530 county="[1987-2000]旌德县"
+ 2531 county="[1987-2000]绩溪县"
+ 2600 county="[-1999]巢湖地区"
+ 2601 county="[1982-1999]巢湖市"
+ 2621 county="[-1983]肥东县"
+ 2622 county="[-1999]庐江县"
+ 2623 county="[-1999]无为县"
+ 2624 county="[-1983]巢县"
+ 2625 county="[-1999]含山县"
+ 2626 county="[-1999]和县"
+ 2700 county="[-1987]徽州地区"
+ 2701 county="[-1987]屯溪市"
+ 2721 county="[-1987]绩溪县"
+ 2722 county="[-1987]旌德县"
+ 2723 county="[-1987]歙县"
+ 2724 county="[-1987]休宁县"
+ 2725 county="[-1987]黟县"
+ 2726 county="[-1987]祁门县"
+ 2727 county="[-1983]太平县"
+ 2728 county="[-1987]石台县"
+ 2800 county="[-1988]安庆地区"
+ 2821 county="[-1988]怀宁县"
+ 2822 county="[-1988]桐城县"
+ 2823 county="[-1988]枞阳县"
+ 2824 county="[-1988]潜山县"
+ 2825 county="[-1988]太湖县"
+ 2826 county="[-1988]宿松县"
+ 2827 county="[-1988]望江县"
+ 2828 county="[-1988]岳西县"
+ 2829 county="[-1988]东至县"
+ 2830 county="[-1988]贵池县"
+ 2831 county="[1987-1988]石台县"
+ 2900 county="[1988-2000]池州地区"
+ 2901 county="[1988-2000]贵池市"
+ 2921 county="[1988-2000]东至县"
+ 2922 county="[1988-2000]石台县"
+ 2923 county="[1988-2000]青阳县"
+35 province="福建省"
+ 0000 county="福建省"
+ 0100 county="福州市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]鼓楼区"
+ 0103 county="[1983-]台江区"
+ 0104 county="[1983-]仓山区"
+ 0105 county="[1983-]马尾区"
+ 0111 county="[1983-1994]郊区,[1995-]晋安区"
+ 0112 county="[2017-]长乐区"
+ 0120 county="[-1983]市区"
+ 0121 county="闽侯县"
+ 0122 county="[1983-]连江县"
+ 0123 county="[1983-]罗源县"
+ 0124 county="[1983-]闽清县"
+ 0125 county="[1983-]永泰县"
+ 0126 county="[1983-1994]长乐县"
+ 0127 county="[1983-1990]福清县"
+ 0128 county="[1983-]平潭县"
+ 0181 county="[1990-]福清市"
+ 0182 county="[1994-2017]长乐市"
+ 0200 county="厦门市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-2003]鼓浪屿区"
+ 0203 county="[1983-]思明区"
+ 0204 county="[1983-2003]开元区"
+ 0205 county="[1983-2002]杏林区,[2003-]海沧区"
+ 0206 county="[1987-]湖里区"
+ 0211 county="[1983-1986]郊区,[1987-]集美区"
+ 0212 county="[1996-]同安区"
+ 0213 county="[2003-]翔安区"
+ 0220 county="[-1983]市区"
+ 0221 county="[-1996]同安县"
+ 0300 county="[1983-]莆田市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]城厢区"
+ 0303 county="[1983-]涵江区"
+ 0304 county="[2002-]荔城区"
+ 0305 county="[2002-]秀屿区"
+ 0321 county="[1983-2002]莆田县"
+ 0322 county="[1983-]仙游县"
+ 0400 county="[1983-]三明市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-2021]梅列区"
+ 0403 county="[1983-2021]三元区"
+ 0404 county="[2021-]三元区"
+ 0405 county="[2021-]沙县区"
+ 0420 county="[1984-1986]永安市"
+ 0421 county="[1983-]明溪县"
+ 0422 county="[1983-1984]永安县"
+ 0423 county="[1983-]清流县"
+ 0424 county="[1983-]宁化县"
+ 0425 county="[1983-]大田县"
+ 0426 county="[1983-]尤溪县"
+ 0427 county="[1983-2021]沙县"
+ 0428 county="[1983-]将乐县"
+ 0429 county="[1983-]泰宁县"
+ 0430 county="[1983-]建宁县"
+ 0481 county="[1989-]永安市"
+ 0500 county="[1985-]泉州市"
+ 0501 county="[1985-]市辖区"
+ 0502 county="[1985-]鲤城区"
+ 0503 county="[1997-]丰泽区"
+ 0504 county="[1997-]洛江区"
+ 0505 county="[2000-]泉港区"
+ 0521 county="[1985-]惠安县"
+ 0522 county="[1985-1992]晋江县"
+ 0523 county="[1985-1993]南安县"
+ 0524 county="[1985-]安溪县"
+ 0525 county="[1985-]永春县"
+ 0526 county="[1985-]德化县"
+ 0527 county="[1985-]金门县"
+ 0581 county="[1989-]石狮市"
+ 0582 county="[1992-]晋江市"
+ 0583 county="[1993-]南安市"
+ 0600 county="[1985-]漳州市"
+ 0601 county="[1985-]市辖区"
+ 0602 county="[1985-]芗城区"
+ 0603 county="[1996-]龙文区"
+ 0604 county="[2021-]龙海区"
+ 0605 county="[2021-]长泰区"
+ 0621 county="[1985-1993]龙海县"
+ 0622 county="[1985-]云霄县"
+ 0623 county="[1985-]漳浦县"
+ 0624 county="[1985-]诏安县"
+ 0625 county="[1985-2021]长泰县"
+ 0626 county="[1985-]东山县"
+ 0627 county="[1985-]南靖县"
+ 0628 county="[1985-]平和县"
+ 0629 county="[1985-]华安县"
+ 0681 county="[1993-2021]龙海市"
+ 0700 county="[1994-]南平市"
+ 0701 county="[1994-]市辖区"
+ 0702 county="[1994-]延平区"
+ 0703 county="[2014-]建阳区"
+ 0721 county="[1994-]顺昌县"
+ 0722 county="[1994-]浦城县"
+ 0723 county="[1994-]光泽县"
+ 0724 county="[1994-]松溪县"
+ 0725 county="[1994-]政和县"
+ 0781 county="[1994-]邵武市"
+ 0782 county="[1994-]武夷山市"
+ 0783 county="[1994-]建瓯市"
+ 0784 county="[1994-2014]建阳市"
+ 0800 county="[1996-]龙岩市"
+ 0801 county="[1996-]市辖区"
+ 0802 county="[1996-]新罗区"
+ 0803 county="[2014-]永定区"
+ 0821 county="[1996-]长汀县"
+ 0822 county="[1996-2014]永定县"
+ 0823 county="[1996-]上杭县"
+ 0824 county="[1996-]武平县"
+ 0825 county="[1996-]连城县"
+ 0881 county="[1996-]漳平市"
+ 0900 county="[1999-]宁德市"
+ 0901 county="[1999-]市辖区"
+ 0902 county="[1999-]蕉城区"
+ 0921 county="[1999-]霞浦县"
+ 0922 county="[1999-]古田县"
+ 0923 county="[1999-]屏南县"
+ 0924 county="[1999-]寿宁县"
+ 0925 county="[1999-]周宁县"
+ 0926 county="[1999-]柘荣县"
+ 0981 county="[1999-]福安市"
+ 0982 county="[1999-]福鼎市"
+ 2100 county="[-1987]建阳地区,[1988-1993]南平地区"
+ 2101 county="[-1994]南平市"
+ 2102 county="[1983-1994]邵武市"
+ 2103 county="[1989-1994]武夷山市"
+ 2104 county="[1992-1994]建瓯市"
+ 2105 county="[1994-1994]建阳市"
+ 2121 county="[-1994]顺昌县"
+ 2122 county="[-1994]建阳县"
+ 2123 county="[-1992]建瓯县"
+ 2124 county="[-1994]浦城县"
+ 2125 county="[-1983]邵武县"
+ 2126 county="[-1989]崇安县"
+ 2127 county="[-1994]光泽县"
+ 2128 county="[-1994]松溪县"
+ 2129 county="[-1994]政和县"
+ 2200 county="[-1999]宁德地区"
+ 2201 county="[1988-1999]宁德市"
+ 2202 county="[1989-1999]福安市"
+ 2203 county="[1995-1999]福鼎市"
+ 2221 county="[-1988]宁德县"
+ 2222 county="[-1983]连江县"
+ 2223 county="[-1983]罗源县"
+ 2224 county="[-1995]福鼎县"
+ 2225 county="[-1999]霞浦县"
+ 2226 county="[-1989]福安县"
+ 2227 county="[-1999]古田县"
+ 2228 county="[-1999]屏南县"
+ 2229 county="[-1999]寿宁县"
+ 2230 county="[-1999]周宁县"
+ 2231 county="[-1999]柘荣县"
+ 2300 county="[-1983]莆田地区"
+ 2321 county="[-1983]闽清县"
+ 2322 county="[-1983]永泰县"
+ 2323 county="[-1983]长乐县"
+ 2324 county="[-1983]福清县"
+ 2325 county="[-1983]平潭县"
+ 2326 county="[-1983]莆田县"
+ 2327 county="[-1983]仙游县"
+ 2400 county="[-1985]晋江地区"
+ 2401 county="[-1985]泉州市"
+ 2421 county="[-1985]惠安县"
+ 2422 county="[-1985]晋江县"
+ 2423 county="[-1985]南安县"
+ 2424 county="[-1985]安溪县"
+ 2425 county="[-1985]永春县"
+ 2426 county="[-1985]德化县"
+ 2427 county="[-1985]金门县"
+ 2500 county="[-1985]龙溪地区"
+ 2501 county="[-1985]漳州市"
+ 2521 county="[-1985]龙海县"
+ 2522 county="[-1985]云霄县"
+ 2523 county="[-1985]漳浦县"
+ 2524 county="[-1985]诏安县"
+ 2525 county="[-1985]长泰县"
+ 2526 county="[-1985]东山县"
+ 2527 county="[-1985]南靖县"
+ 2528 county="[-1985]平和县"
+ 2529 county="[-1985]华安县"
+ 2600 county="[-1996]龙岩地区"
+ 2601 county="[1981-1996]龙岩市"
+ 2602 county="[1990-1996]漳平市"
+ 2621 county="[-1981]龙岩县"
+ 2622 county="[-1996]长汀县"
+ 2623 county="[-1996]永定县"
+ 2624 county="[-1996]上杭县"
+ 2625 county="[-1996]武平县"
+ 2626 county="[-1990]漳平县"
+ 2627 county="[-1996]连城县"
+ 2700 county="[-1983]三明地区"
+ 2701 county="[-1983]三明市"
+ 2721 county="[-1983]明溪县"
+ 2722 county="[-1983]永安县"
+ 2723 county="[-1983]清流县"
+ 2724 county="[-1983]宁化县"
+ 2725 county="[-1983]大田县"
+ 2726 county="[-1983]尤溪县"
+ 2727 county="[-1983]沙县"
+ 2728 county="[-1983]将乐县"
+ 2729 county="[-1983]泰宁县"
+ 2730 county="[-1983]建宁县"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]永安市"
+ 9002 county="[1987-1989]石狮市"
+36 province="江西省"
+ 0000 county="江西省"
+ 0100 county="南昌市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]东湖区"
+ 0103 county="[1983-]西湖区"
+ 0104 county="[1983-]青云谱区"
+ 0105 county="[1983-2019]湾里区"
+ 0111 county="[1983-2001]郊区,[2002-]青山湖区"
+ 0112 county="[2015-]新建区"
+ 0113 county="[2019-]红谷滩区"
+ 0120 county="[-1983]市区"
+ 0121 county="南昌县"
+ 0122 county="[-2015]新建县"
+ 0123 county="[1983-]安义县"
+ 0124 county="[1983-]进贤县"
+ 0200 county="景德镇市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]昌江区"
+ 0203 county="[1983-]珠山区"
+ 0211 county="[1983-1988]鹅湖区"
+ 0212 county="[1983-1988]蛟潭区"
+ 0221 county="[1983-1992]乐平县"
+ 0222 county="[1988-]浮梁县"
+ 0281 county="[1992-]乐平市"
+ 0300 county="萍乡市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-1992]城关区,[1993-]安源区"
+ 0311 county="[1983-1997]上栗区"
+ 0312 county="[1983-1997]芦溪区"
+ 0313 county="[1983-]湘东区"
+ 0321 county="[1992-]莲花县"
+ 0322 county="[1997-]上栗县"
+ 0323 county="[1997-]芦溪县"
+ 0400 county="九江市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-2015]庐山区,[2016-]濂溪区"
+ 0403 county="[1983-]浔阳区"
+ 0404 county="[2017-]柴桑区"
+ 0421 county="[1983-2017]九江县"
+ 0422 county="[1983-1989]瑞昌县"
+ 0423 county="[1983-]武宁县"
+ 0424 county="[1983-]修水县"
+ 0425 county="[1983-]永修县"
+ 0426 county="[1983-]德安县"
+ 0427 county="[1983-2016]星子县"
+ 0428 county="[1983-]都昌县"
+ 0429 county="[1983-]湖口县"
+ 0430 county="[1983-]彭泽县"
+ 0481 county="[1989-]瑞昌市"
+ 0482 county="[2010-]共青城市"
+ 0483 county="[2016-]庐山市"
+ 0500 county="[1983-]新余市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-]渝水区"
+ 0521 county="[1983-]分宜县"
+ 0600 county="[1983-]鹰潭市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-]月湖区"
+ 0603 county="[2018-]余江区"
+ 0621 county="[1983-1996]贵溪县"
+ 0622 county="[1983-2018]余江县"
+ 0681 county="[1996-]贵溪市"
+ 0700 county="[1998-]赣州市"
+ 0701 county="[1998-]市辖区"
+ 0702 county="[1998-]章贡区"
+ 0703 county="[2013-]南康区"
+ 0704 county="[2016-]赣县区"
+ 0721 county="[1998-2016]赣县"
+ 0722 county="[1998-]信丰县"
+ 0723 county="[1998-]大余县"
+ 0724 county="[1998-]上犹县"
+ 0725 county="[1998-]崇义县"
+ 0726 county="[1998-]安远县"
+ 0727 county="[1998-2020]龙南县"
+ 0728 county="[1998-]定南县"
+ 0729 county="[1998-]全南县"
+ 0730 county="[1998-]宁都县"
+ 0731 county="[1998-]于都县"
+ 0732 county="[1998-]兴国县"
+ 0733 county="[1998-]会昌县"
+ 0734 county="[1998-]寻乌县"
+ 0735 county="[1998-]石城县"
+ 0781 county="[1998-]瑞金市"
+ 0782 county="[1998-2013]南康市"
+ 0783 county="[2020-]龙南市"
+ 0800 county="[2000-]吉安市"
+ 0801 county="[2000-]市辖区"
+ 0802 county="[2000-]吉州区"
+ 0803 county="[2000-]青原区"
+ 0821 county="[2000-]吉安县"
+ 0822 county="[2000-]吉水县"
+ 0823 county="[2000-]峡江县"
+ 0824 county="[2000-]新干县"
+ 0825 county="[2000-]永丰县"
+ 0826 county="[2000-]泰和县"
+ 0827 county="[2000-]遂川县"
+ 0828 county="[2000-]万安县"
+ 0829 county="[2000-]安福县"
+ 0830 county="[2000-]永新县"
+ 0881 county="[2000-]井冈山市"
+ 0900 county="[2000-]宜春市"
+ 0901 county="[2000-]市辖区"
+ 0902 county="[2000-]袁州区"
+ 0921 county="[2000-]奉新县"
+ 0922 county="[2000-]万载县"
+ 0923 county="[2000-]上高县"
+ 0924 county="[2000-]宜丰县"
+ 0925 county="[2000-]靖安县"
+ 0926 county="[2000-]铜鼓县"
+ 0981 county="[2000-]丰城市"
+ 0982 county="[2000-]樟树市"
+ 0983 county="[2000-]高安市"
+ 1000 county="[2000-]抚州市"
+ 1001 county="[2000-]市辖区"
+ 1002 county="[2000-]临川区"
+ 1003 county="[2016-]东乡区"
+ 1021 county="[2000-]南城县"
+ 1022 county="[2000-]黎川县"
+ 1023 county="[2000-]南丰县"
+ 1024 county="[2000-]崇仁县"
+ 1025 county="[2000-]乐安县"
+ 1026 county="[2000-]宜黄县"
+ 1027 county="[2000-]金溪县"
+ 1028 county="[2000-]资溪县"
+ 1029 county="[2000-2016]东乡县"
+ 1030 county="[2000-]广昌县"
+ 1100 county="[2000-]上饶市"
+ 1101 county="[2000-]市辖区"
+ 1102 county="[2000-]信州区"
+ 1103 county="[2015-]广丰区"
+ 1104 county="[2019-]广信区"
+ 1121 county="[2000-2019]上饶县"
+ 1122 county="[2000-2015]广丰县"
+ 1123 county="[2000-]玉山县"
+ 1124 county="[2000-]铅山县"
+ 1125 county="[2000-]横峰县"
+ 1126 county="[2000-]弋阳县"
+ 1127 county="[2000-]余干县"
+ 1128 county="[2000-2002]波阳县,[2003-]鄱阳县"
+ 1129 county="[2000-]万年县"
+ 1130 county="[2000-]婺源县"
+ 1181 county="[2000-]德兴市"
+ 2100 county="[-1998]赣州地区"
+ 2101 county="[-1998]赣州市"
+ 2102 county="[1994-1998]瑞金市"
+ 2103 county="[1995-1998]南康市"
+ 2121 county="[-1998]赣县"
+ 2122 county="[-1995]南康县"
+ 2123 county="[-1998]信丰县"
+ 2124 county="[-1998]大余县"
+ 2125 county="[-1998]上犹县"
+ 2126 county="[-1998]崇义县"
+ 2127 county="[-1998]安远县"
+ 2128 county="[-1998]龙南县"
+ 2129 county="[-1998]定南县"
+ 2130 county="[-1998]全南县"
+ 2131 county="[-1998]宁都县"
+ 2132 county="[-1998]于都县"
+ 2133 county="[-1998]兴国县"
+ 2134 county="[-1994]瑞金县"
+ 2135 county="[-1998]会昌县"
+ 2136 county="[-1998]寻乌县"
+ 2137 county="[-1998]石城县"
+ 2138 county="[-1983]广昌县"
+ 2200 county="[-2000]宜春地区"
+ 2201 county="[-2000]宜春市"
+ 2202 county="[1988-2000]丰城市"
+ 2203 county="[1988-2000]樟树市"
+ 2204 county="[1993-2000]高安市"
+ 2221 county="[-1988]丰城县"
+ 2222 county="[-1993]高安县"
+ 2223 county="[-1988]清江县"
+ 2224 county="[-1983]新余县"
+ 2225 county="[-1985]宜春县"
+ 2226 county="[-2000]奉新县"
+ 2227 county="[-2000]万载县"
+ 2228 county="[-2000]上高县"
+ 2229 county="[-2000]宜丰县"
+ 2230 county="[-1983]分宜县"
+ 2231 county="[-1983]安义县"
+ 2232 county="[-2000]靖安县"
+ 2233 county="[-2000]铜鼓县"
+ 2300 county="[-2000]上饶地区"
+ 2301 county="[-2000]上饶市"
+ 2302 county="[1990-2000]德兴市"
+ 2321 county="[-2000]上饶县"
+ 2322 county="[-2000]广丰县"
+ 2323 county="[-2000]玉山县"
+ 2324 county="[-2000]铅山县"
+ 2325 county="[-2000]横峰县"
+ 2326 county="[-2000]弋阳县"
+ 2327 county="[-1983]贵溪县"
+ 2328 county="[-1983]余江县"
+ 2329 county="[-2000]余干县"
+ 2330 county="[-2000]波阳县"
+ 2331 county="[-2000]万年县"
+ 2332 county="[-1983]乐平县"
+ 2333 county="[-1990]德兴县"
+ 2334 county="[-2000]婺源县"
+ 2400 county="[-2000]吉安地区"
+ 2401 county="[-2000]吉安市"
+ 2402 county="[1984-2000]井冈山市"
+ 2421 county="[-2000]吉安县"
+ 2422 county="[-2000]吉水县"
+ 2423 county="[-2000]峡江县"
+ 2424 county="[-2000]新干县"
+ 2425 county="[-2000]永丰县"
+ 2426 county="[-2000]泰和县"
+ 2427 county="[-2000]遂川县"
+ 2428 county="[-2000]万安县"
+ 2429 county="[-2000]安福县"
+ 2430 county="[-2000]永新县"
+ 2431 county="[-1992]莲花县"
+ 2432 county="[-2000]宁冈县"
+ 2433 county="[1981-1984]井冈山县"
+ 2500 county="[-2000]抚州地区"
+ 2501 county="[-1987]抚州市"
+ 2502 county="[1987-2000]临川市"
+ 2521 county="[-1987]临川县"
+ 2522 county="[-2000]南城县"
+ 2523 county="[-2000]黎川县"
+ 2524 county="[-2000]南丰县"
+ 2525 county="[-2000]崇仁县"
+ 2526 county="[-2000]乐安县"
+ 2527 county="[-2000]宜黄县"
+ 2528 county="[-2000]金溪县"
+ 2529 county="[-2000]资溪县"
+ 2530 county="[-1983]进贤县"
+ 2531 county="[-2000]东乡县"
+ 2532 county="[1983-2000]广昌县"
+ 2600 county="[-1983]九江地区"
+ 2621 county="[-1983]九江县"
+ 2622 county="[-1983]瑞昌县"
+ 2623 county="[-1983]武宁县"
+ 2624 county="[-1983]修水县"
+ 2625 county="[-1983]永修县"
+ 2626 county="[-1983]德安县"
+ 2627 county="[-1983]星子县"
+ 2628 county="[-1983]都昌县"
+ 2629 county="[-1983]湖口县"
+ 2630 county="[-1983]彭泽县"
+37 province="山东省"
+ 0000 county="山东省"
+ 0100 county="济南市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]历下区"
+ 0103 county="[1983-]市中区"
+ 0104 county="[1983-]槐荫区"
+ 0105 county="[1983-]天桥区"
+ 0111 county="[1983-1987]郊区"
+ 0112 county="[1987-]历城区"
+ 0113 county="[2001-]长清区"
+ 0114 county="[2016-]章丘区"
+ 0115 county="[2018-]济阳区"
+ 0116 county="[2018-]莱芜区"
+ 0117 county="[2018-]钢城区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-1987]历城县"
+ 0122 county="[-1992]章丘县"
+ 0123 county="[-2001]长清县"
+ 0124 county="[1985-]平阴县"
+ 0125 county="[1989-2018]济阳县"
+ 0126 county="[1989-]商河县"
+ 0181 county="[1992-2016]章丘市"
+ 0200 county="青岛市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]市南区"
+ 0203 county="[1983-]市北区"
+ 0204 county="[1983-1994]台东区"
+ 0205 county="[1983-2012]四方区"
+ 0206 county="[1983-1994]沧口区"
+ 0211 county="[1983-]黄岛区"
+ 0212 county="[1988-]崂山区"
+ 0213 county="[1994-]李沧区"
+ 0214 county="[1994-]城阳区"
+ 0215 county="[2017-]即墨区"
+ 0220 county="[-1983]市区"
+ 0221 county="[-1988]崂山县"
+ 0222 county="[-1989]即墨县"
+ 0223 county="[-1990]胶南县"
+ 0224 county="[-1987]胶县"
+ 0225 county="[1983-1990]莱西县"
+ 0226 county="[1983-1989]平度县"
+ 0281 county="[1989-]胶州市"
+ 0282 county="[1989-2017]即墨市"
+ 0283 county="[1989-]平度市"
+ 0284 county="[1990-2012]胶南市"
+ 0285 county="[1990-]莱西市"
+ 0300 county="淄博市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]淄川区"
+ 0303 county="[1983-]张店区"
+ 0304 county="[1983-]博山区"
+ 0305 county="[1983-]临淄区"
+ 0306 county="[1983-]周村区"
+ 0321 county="[1983-]桓台县"
+ 0322 county="[1989-]高青县"
+ 0323 county="[1989-]沂源县"
+ 0400 county="枣庄市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]市中区"
+ 0403 county="[1983-]薛城区"
+ 0404 county="[1983-]峄城区"
+ 0405 county="[1983-]台儿庄区"
+ 0406 county="[1983-]山亭区"
+ 0420 county="[-1983]市区"
+ 0421 county="[-1988]滕县"
+ 0481 county="[1989-]滕州市"
+ 0500 county="[1982-]东营市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-]东营区"
+ 0503 county="[1983-]河口区"
+ 0504 county="[1983-1987]牛庄区"
+ 0505 county="[2016-]垦利区"
+ 0521 county="[1982-2016]垦利县"
+ 0522 county="[1982-]利津县"
+ 0523 county="[1983-]广饶县"
+ 0600 county="[1983-]烟台市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-]芝罘区"
+ 0611 county="[1983-]福山区"
+ 0612 county="[1994-]牟平区"
+ 0613 county="[1994-]莱山区"
+ 0614 county="[2020-]蓬莱区"
+ 0620 county="[1983-1987]威海市"
+ 0621 county="[1983-1983]福山县"
+ 0622 county="[1983-1991]蓬莱县"
+ 0623 county="[1983-1986]黄县"
+ 0624 county="[1983-1991]招远县"
+ 0625 county="[1983-1988]掖县"
+ 0626 county="[1983-1983]莱西县"
+ 0627 county="[1983-1987]莱阳县"
+ 0628 county="[1983-1995]栖霞县"
+ 0629 county="[1983-1996]海阳县"
+ 0630 county="[1983-1987]乳山县"
+ 0631 county="[1983-1994]牟平县"
+ 0632 county="[1983-1987]文登县"
+ 0633 county="[1983-1987]荣成县"
+ 0634 county="[1983-2020]长岛县"
+ 0681 county="[1989-]龙口市"
+ 0682 county="[1989-]莱阳市"
+ 0683 county="[1989-]莱州市"
+ 0684 county="[1991-2020]蓬莱市"
+ 0685 county="[1991-]招远市"
+ 0686 county="[1995-]栖霞市"
+ 0687 county="[1996-]海阳市"
+ 0700 county="[1983-]潍坊市"
+ 0701 county="[1983-]市辖区"
+ 0702 county="[1983-]潍城区"
+ 0703 county="[1983-]寒亭区"
+ 0704 county="[1983-]坊子区"
+ 0705 county="[1994-]奎文区"
+ 0721 county="[1983-1986]益都县"
+ 0722 county="[1983-1994]安丘县"
+ 0723 county="[1983-1993]寿光县"
+ 0724 county="[1983-]临朐县"
+ 0725 county="[1983-]昌乐县"
+ 0726 county="[1983-1994]昌邑县"
+ 0727 county="[1983-1994]高密县"
+ 0728 county="[1983-1987]诸城县"
+ 0729 county="[1983-1992]五莲县"
+ 0781 county="[1989-]青州市"
+ 0782 county="[1989-]诸城市"
+ 0783 county="[1993-]寿光市"
+ 0784 county="[1994-]安丘市"
+ 0785 county="[1994-]高密市"
+ 0786 county="[1994-]昌邑市"
+ 0800 county="[1983-]济宁市"
+ 0801 county="[1983-]市辖区"
+ 0802 county="[1983-2013]市中区"
+ 0811 county="[1983-1992]郊区,[1993-]任城区"
+ 0812 county="[2013-]兖州区"
+ 0821 county="[1983-1983]济宁县"
+ 0822 county="[1983-1992]兖州县"
+ 0823 county="[1983-1986]曲阜县"
+ 0824 county="[1983-1983]泗水县"
+ 0825 county="[1983-1992]邹县"
+ 0826 county="[1983-]微山县"
+ 0827 county="[1983-]鱼台县"
+ 0828 county="[1983-]金乡县"
+ 0829 county="[1983-]嘉祥县"
+ 0830 county="[1985-]汶上县"
+ 0831 county="[1985-]泗水县"
+ 0832 county="[1989-]梁山县"
+ 0881 county="[1989-]曲阜市"
+ 0882 county="[1992-2013]兖州市"
+ 0883 county="[1992-]邹城市"
+ 0900 county="[1985-]泰安市"
+ 0901 county="[1985-]市辖区"
+ 0902 county="[1985-]泰山区"
+ 0911 county="[1985-1999]郊区,[2000-]岱岳区"
+ 0919 county="[1985-1986]莱芜市"
+ 0920 county="[1985-1986]新泰市"
+ 0921 county="[1985-]宁阳县"
+ 0922 county="[1985-1992]肥城县"
+ 0923 county="[1985-]东平县"
+ 0981 county="[1989-1992]莱芜市"
+ 0982 county="[1989-]新泰市"
+ 0983 county="[1992-]肥城市"
+ 1000 county="[1987-]威海市"
+ 1001 county="[1987-]市辖区"
+ 1002 county="[1987-]环翠区"
+ 1003 county="[2014-]文登区"
+ 1021 county="[1987-1993]乳山县"
+ 1022 county="[1987-1988]文登县"
+ 1023 county="[1987-1988]荣成县"
+ 1081 county="[1989-2014]文登市"
+ 1082 county="[1989-]荣成市"
+ 1083 county="[1993-]乳山市"
+ 1100 county="[1989-]日照市"
+ 1101 county="[1992-]市辖区"
+ 1102 county="[1992-]东港区"
+ 1103 county="[2004-]岚山区"
+ 1121 county="[1992-]五莲县"
+ 1122 county="[1992-]莒县"
+ 1200 county="[1992-2018]莱芜市"
+ 1201 county="[1992-2018]市辖区"
+ 1202 county="[1992-2018]莱城区"
+ 1203 county="[1992-2018]钢城区"
+ 1300 county="[1994-]临沂市"
+ 1301 county="[1994-]市辖区"
+ 1302 county="[1994-]兰山区"
+ 1311 county="[1994-]罗庄区"
+ 1312 county="[1994-]河东区"
+ 1321 county="[1994-]沂南县"
+ 1322 county="[1994-]郯城县"
+ 1323 county="[1994-]沂水县"
+ 1324 county="[1994-2013]苍山县,[2014-]兰陵县"
+ 1325 county="[1994-]费县"
+ 1326 county="[1994-]平邑县"
+ 1327 county="[1994-]莒南县"
+ 1328 county="[1994-]蒙阴县"
+ 1329 county="[1994-]临沭县"
+ 1400 county="[1994-]德州市"
+ 1401 county="[1994-]市辖区"
+ 1402 county="[1994-]德城区"
+ 1403 county="[2014-]陵城区"
+ 1421 county="[1994-2014]陵县"
+ 1422 county="[1994-]宁津县"
+ 1423 county="[1994-]庆云县"
+ 1424 county="[1994-]临邑县"
+ 1425 county="[1994-]齐河县"
+ 1426 county="[1994-]平原县"
+ 1427 county="[1994-]夏津县"
+ 1428 county="[1994-]武城县"
+ 1481 county="[1994-]乐陵市"
+ 1482 county="[1994-]禹城市"
+ 1500 county="[1997-]聊城市"
+ 1501 county="[1997-]市辖区"
+ 1502 county="[1997-]东昌府区"
+ 1503 county="[2019-]茌平区"
+ 1521 county="[1997-]阳谷县"
+ 1522 county="[1997-]莘县"
+ 1523 county="[1997-2019]茌平县"
+ 1524 county="[1997-]东阿县"
+ 1525 county="[1997-]冠县"
+ 1526 county="[1997-]高唐县"
+ 1581 county="[1997-]临清市"
+ 1600 county="[2000-]滨州市"
+ 1601 county="[2000-]市辖区"
+ 1602 county="[2000-]滨城区"
+ 1603 county="[2014-]沾化区"
+ 1621 county="[2000-]惠民县"
+ 1622 county="[2000-]阳信县"
+ 1623 county="[2000-]无棣县"
+ 1624 county="[2000-2014]沾化县"
+ 1625 county="[2000-]博兴县"
+ 1626 county="[2000-2018]邹平县"
+ 1681 county="[2018-]邹平市"
+ 1700 county="[2000-]菏泽市"
+ 1701 county="[2000-]市辖区"
+ 1702 county="[2000-]牡丹区"
+ 1703 county="[2016-]定陶区"
+ 1721 county="[2000-]曹县"
+ 1722 county="[2000-]单县"
+ 1723 county="[2000-]成武县"
+ 1724 county="[2000-]巨野县"
+ 1725 county="[2000-]郓城县"
+ 1726 county="[2000-]鄄城县"
+ 1727 county="[2000-2016]定陶县"
+ 1728 county="[2000-]东明县"
+ 2100 county="[-1983]烟台地区"
+ 2101 county="[-1983]烟台市"
+ 2102 county="[-1983]威海市"
+ 2121 county="[-1983]福山县"
+ 2122 county="[-1983]蓬莱县"
+ 2123 county="[-1983]黄县"
+ 2124 county="[-1983]招远县"
+ 2125 county="[-1983]掖县"
+ 2126 county="[-1983]莱西县"
+ 2127 county="[-1983]莱阳县"
+ 2128 county="[-1983]栖霞县"
+ 2129 county="[-1983]海阳县"
+ 2130 county="[-1983]乳山县"
+ 2131 county="[-1983]牟平县"
+ 2132 county="[-1983]文登县"
+ 2133 county="[-1983]荣成县"
+ 2134 county="[-1983]长岛县"
+ 2200 county="[-1980]昌潍地区,[1981-1982]潍坊地区"
+ 2201 county="[-1983]潍坊市"
+ 2221 county="[-1983]益都县"
+ 2222 county="[-1983]安丘县"
+ 2223 county="[-1983]寿光县"
+ 2224 county="[-1983]临朐县"
+ 2225 county="[-1983]昌乐县"
+ 2226 county="[-1983]昌邑县"
+ 2227 county="[-1983]高密县"
+ 2228 county="[-1983]诸城县"
+ 2229 county="[-1983]五莲县"
+ 2230 county="[-1983]平度县"
+ 2231 county="[-1983]潍县"
+ 2300 county="[-1991]惠民地区,[1992-1999]滨州地区"
+ 2301 county="[1982-2000]滨州市"
+ 2321 county="[-2000]惠民县"
+ 2322 county="[-1987]滨县"
+ 2323 county="[-2000]阳信县"
+ 2324 county="[-2000]无棣县"
+ 2325 county="[-2000]沾化县"
+ 2326 county="[-1982]利津县"
+ 2327 county="[-1983]广饶县"
+ 2328 county="[-2000]博兴县"
+ 2329 county="[-1983]桓台县"
+ 2330 county="[-2000]邹平县"
+ 2331 county="[-1989]高青县"
+ 2332 county="[-1982]垦利县"
+ 2400 county="[-1994]德州地区"
+ 2401 county="[-1994]德州市"
+ 2402 county="[1988-1994]乐陵市"
+ 2403 county="[1993-1994]禹城市"
+ 2421 county="[-1994]陵县"
+ 2422 county="[-1994]平原县"
+ 2423 county="[-1994]夏津县"
+ 2424 county="[-1994]武城县"
+ 2425 county="[-1994]齐河县"
+ 2426 county="[-1993]禹城县"
+ 2427 county="[-1988]乐陵县"
+ 2428 county="[-1994]临邑县"
+ 2429 county="[-1989]商河县"
+ 2430 county="[-1989]济阳县"
+ 2431 county="[-1994]宁津县"
+ 2432 county="[-1994]庆云县"
+ 2500 county="[-1997]聊城地区"
+ 2501 county="[1983-1997]聊城市"
+ 2502 county="[1983-1997]临清市"
+ 2521 county="[-1983]聊城县"
+ 2522 county="[-1997]阳谷县"
+ 2523 county="[-1997]莘县"
+ 2524 county="[-1997]茌平县"
+ 2525 county="[-1997]东阿县"
+ 2526 county="[-1997]冠县"
+ 2527 county="[-1997]高唐县"
+ 2528 county="[-1983]临清县"
+ 2600 county="[-1985]泰安地区"
+ 2601 county="[1982-1985]泰安市"
+ 2602 county="[1983-1985]莱芜市"
+ 2603 county="[1982-1982]新汶市,[1983-1985]新泰市"
+ 2621 county="[-1982]泰安县"
+ 2622 county="[-1983]莱芜县"
+ 2623 county="[-1983]新泰县"
+ 2624 county="[-1985]宁阳县"
+ 2625 county="[-1985]肥城县"
+ 2626 county="[-1985]东平县"
+ 2627 county="[-1985]平阴县"
+ 2628 county="[-1982]新汶县"
+ 2629 county="[1983-1985]汶上县"
+ 2630 county="[1983-1985]泗水县"
+ 2700 county="[-1983]济宁地区"
+ 2701 county="[-1983]济宁市"
+ 2721 county="[-1983]济宁县"
+ 2722 county="[-1983]兖州县"
+ 2723 county="[-1983]曲阜县"
+ 2724 county="[-1983]泗水县"
+ 2725 county="[-1983]邹县"
+ 2726 county="[-1983]微山县"
+ 2727 county="[-1983]鱼台县"
+ 2728 county="[-1983]金乡县"
+ 2729 county="[-1983]嘉祥县"
+ 2730 county="[-1983]汶上县"
+ 2800 county="[-1994]临沂地区"
+ 2801 county="[1983-1994]临沂市"
+ 2802 county="[1985-1989]日照市"
+ 2821 county="[-1983]临沂县"
+ 2822 county="[-1994]郯城县"
+ 2823 county="[-1994]苍山县"
+ 2824 county="[-1994]莒南县"
+ 2825 county="[-1985]日照县"
+ 2826 county="[-1992]莒县"
+ 2827 county="[-1994]沂水县"
+ 2828 county="[-1989]沂源县"
+ 2829 county="[-1994]蒙阴县"
+ 2830 county="[-1994]平邑县"
+ 2831 county="[-1994]费县"
+ 2832 county="[-1994]沂南县"
+ 2833 county="[-1994]临沭县"
+ 2900 county="[-2000]菏泽地区"
+ 2901 county="[1983-2000]菏泽市"
+ 2921 county="[-1983]菏泽县"
+ 2922 county="[-2000]曹县"
+ 2923 county="[-2000]定陶县"
+ 2924 county="[-2000]成武县"
+ 2925 county="[-2000]单县"
+ 2926 county="[-2000]巨野县"
+ 2927 county="[-1989]梁山县"
+ 2928 county="[-2000]郓城县"
+ 2929 county="[-2000]鄄城县"
+ 2930 county="[-2000]东明县"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]青州市"
+ 9002 county="[1986-1989]龙口市"
+ 9003 county="[1986-1989]曲阜市"
+ 9004 county="[1986-1989]莱芜市"
+ 9005 county="[1986-1989]新泰市"
+ 9006 county="[1987-1989]胶州市"
+ 9007 county="[1987-1989]诸城市"
+ 9008 county="[1987-1989]莱阳市"
+ 9009 county="[1988-1989]莱州市"
+ 9010 county="[1988-1989]滕州市"
+ 9011 county="[1988-1989]文登市"
+ 9012 county="[1988-1989]荣成市"
+41 province="河南省"
+ 0000 county="河南省"
+ 0100 county="郑州市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]中原区"
+ 0103 county="[1983-]二七区"
+ 0104 county="[1983-1982]向阳回族区,[1983-]管城回族区"
+ 0105 county="[1983-]金水区"
+ 0106 county="[1983-]上街区"
+ 0107 county="[1983-1987]新密区"
+ 0108 county="[1987-2002]邙山区,[2003-]惠济区"
+ 0111 county="[1983-1987]金海区"
+ 0112 county="[1983-1987]郊区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-1994]荥阳县"
+ 0122 county="[1983-]中牟县"
+ 0123 county="[1983-1994]新郑县"
+ 0124 county="[1983-1991]巩县"
+ 0125 county="[1983-1994]登封县"
+ 0126 county="[1983-1994]密县"
+ 0181 county="[1991-]巩义市"
+ 0182 county="[1994-]荥阳市"
+ 0183 county="[1994-]新密市"
+ 0184 county="[1994-]新郑市"
+ 0185 county="[1994-]登封市"
+ 0200 county="开封市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]龙亭区"
+ 0203 county="[1983-]顺河回族区"
+ 0204 county="[1983-]鼓楼区"
+ 0205 county="[1983-2004]南关区,[2005-]禹王台区"
+ 0211 county="[1983-2004]郊区,[2005-2013]金明区"
+ 0212 county="[2014-]祥符区"
+ 0221 county="[1983-]杞县"
+ 0222 county="[1983-]通许县"
+ 0223 county="[1983-]尉氏县"
+ 0224 county="[1983-2014]开封县"
+ 0225 county="[1983-]兰考县"
+ 0300 county="洛阳市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]老城区"
+ 0303 county="[1983-]西工区"
+ 0304 county="[1983-]瀍河回族区"
+ 0305 county="[1983-]涧西区"
+ 0306 county="[1983-2021]吉利区"
+ 0307 county="[2021-]偃师区"
+ 0308 county="[2021-]孟津区"
+ 0311 county="[1983-1999]郊区,[2000-]洛龙区"
+ 0321 county="[1983-1993]偃师县"
+ 0322 county="[1983-2021]孟津县"
+ 0323 county="[1983-]新安县"
+ 0324 county="[1986-]栾川县"
+ 0325 county="[1986-]嵩县"
+ 0326 county="[1986-]汝阳县"
+ 0327 county="[1986-]宜阳县"
+ 0328 county="[1986-]洛宁县"
+ 0329 county="[1986-]伊川县"
+ 0381 county="[1993-2021]偃师市"
+ 0400 county="平顶山市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]新华区"
+ 0403 county="[1983-]卫东区"
+ 0404 county="[1997-]石龙区"
+ 0411 county="[1983-1993]郊区,[1994-]湛河区"
+ 0412 county="[1982-1990]舞钢区"
+ 0421 county="[1983-]宝丰县"
+ 0422 county="[1983-]叶县"
+ 0423 county="[1983-]鲁山县"
+ 0424 county="[1986-1988]临汝县"
+ 0425 county="[1986-]郏县"
+ 0426 county="[1986-1997]襄城县"
+ 0481 county="[1990-]舞钢市"
+ 0482 county="[1989-]汝州市"
+ 0500 county="安阳市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-]文峰区"
+ 0503 county="[1983-]北关区"
+ 0504 county="[1983-2002]铁西区"
+ 0505 county="[2002-]殷都区"
+ 0506 county="[2002-]龙安区"
+ 0511 county="[1983-2002]郊区"
+ 0521 county="[1983-1994]林县"
+ 0522 county="[1983-]安阳县"
+ 0523 county="[1983-]汤阴县"
+ 0524 county="[1983-1986]淇县"
+ 0525 county="[1983-1986]浚县"
+ 0526 county="[1986-]滑县"
+ 0527 county="[1986-]内黄县"
+ 0581 county="[1994-]林州市"
+ 0600 county="鹤壁市"
+ 0601 county="[1983-]市辖区"
+ 0602 county="[1983-]鹤山区"
+ 0603 county="[1983-]山城区"
+ 0611 county="[1983-2000]郊区,[2001-]淇滨区"
+ 0621 county="[1986-]浚县"
+ 0622 county="[1986-]淇县"
+ 0700 county="新乡市"
+ 0701 county="[1983-]市辖区"
+ 0702 county="[1983-]红旗区"
+ 0703 county="[1983-2002]新华区,[2003-]卫滨区"
+ 0704 county="[1983-2002]北站区,[2003-]凤泉区"
+ 0711 county="[1983-2002]郊区,[2003-]牧野区"
+ 0721 county="[1983-]新乡县"
+ 0722 county="[1983-1988]汲县"
+ 0723 county="[1986-1988]辉县"
+ 0724 county="[1986-]获嘉县"
+ 0725 county="[1986-]原阳县"
+ 0726 county="[1986-]延津县"
+ 0727 county="[1986-]封丘县"
+ 0728 county="[1986-2019]长垣县"
+ 0781 county="[1989-]卫辉市"
+ 0782 county="[1989-]辉县市"
+ 0783 county="[2019-]长垣市"
+ 0800 county="焦作市"
+ 0801 county="[1983-]市辖区"
+ 0802 county="[1983-]解放区"
+ 0803 county="[1983-]中站区"
+ 0804 county="[1983-]马村区"
+ 0811 county="[1983-1989]郊区,[1990-]山阳区"
+ 0821 county="[1983-]修武县"
+ 0822 county="[1983-]博爱县"
+ 0823 county="[1986-]武陟县"
+ 0824 county="[1986-1989]沁阳县"
+ 0825 county="[1986-]温县"
+ 0826 county="[1986-1996]孟县"
+ 0827 county="[1986-1988]济源县"
+ 0881 county="[1989-1997]济源市"
+ 0882 county="[1989-]沁阳市"
+ 0883 county="[1996-]孟州市"
+ 0900 county="[1983-]濮阳市"
+ 0901 county="[1983-]市辖区"
+ 0902 county="[1985-2001]市区,[2002-]华龙区"
+ 0911 county="[1983-1987]郊区"
+ 0921 county="[1983-1986]滑县"
+ 0922 county="[1983-]清丰县"
+ 0923 county="[1983-]南乐县"
+ 0924 county="[1983-1986]内黄县"
+ 0925 county="[1983-1986]长垣县"
+ 0926 county="[1983-]范县"
+ 0927 county="[1983-]台前县"
+ 0928 county="[1987-]濮阳县"
+ 1000 county="[1986-]许昌市"
+ 1001 county="[1986-]市辖区"
+ 1002 county="[1986-]魏都区"
+ 1003 county="[2016-]建安区"
+ 1021 county="[1986-1988]禹县"
+ 1022 county="[1986-1993]长葛县"
+ 1023 county="[1986-2016]许昌县"
+ 1024 county="[1986-]鄢陵县"
+ 1025 county="[1997-]襄城县"
+ 1081 county="[1989-]禹州市"
+ 1082 county="[1993-]长葛市"
+ 1100 county="[1986-]漯河市"
+ 1101 county="[1986-]市辖区"
+ 1102 county="[1986-]源汇区"
+ 1103 county="[2004-]郾城区"
+ 1104 county="[2004-]召陵区"
+ 1121 county="[1986-]舞阳县"
+ 1122 county="[1986-]临颍县"
+ 1123 county="[1986-2004]郾城县"
+ 1200 county="[1986-]三门峡市"
+ 1201 county="[1986-]市辖区"
+ 1202 county="[1986-]湖滨区"
+ 1203 county="[2015-]陕州区"
+ 1219 county="[1986-1989]义马市"
+ 1221 county="[1986-]渑池县"
+ 1222 county="[1986-2015]陕县"
+ 1223 county="[1986-1993]灵宝县"
+ 1224 county="[1986-]卢氏县"
+ 1281 county="[1989-]义马市"
+ 1282 county="[1993-]灵宝市"
+ 1300 county="[1994-]南阳市"
+ 1301 county="[1994-]市辖区"
+ 1302 county="[1994-]宛城区"
+ 1303 county="[1994-]卧龙区"
+ 1321 county="[1994-]南召县"
+ 1322 county="[1994-]方城县"
+ 1323 county="[1994-]西峡县"
+ 1324 county="[1994-]镇平县"
+ 1325 county="[1994-]内乡县"
+ 1326 county="[1994-]淅川县"
+ 1327 county="[1994-]社旗县"
+ 1328 county="[1994-]唐河县"
+ 1329 county="[1994-]新野县"
+ 1330 county="[1994-]桐柏县"
+ 1381 county="[1994-]邓州市"
+ 1400 county="[1997-]商丘市"
+ 1401 county="[1997-]市辖区"
+ 1402 county="[1997-]梁园区"
+ 1403 county="[1997-]睢阳区"
+ 1421 county="[1997-]民权县"
+ 1422 county="[1997-]睢县"
+ 1423 county="[1997-]宁陵县"
+ 1424 county="[1997-]柘城县"
+ 1425 county="[1997-]虞城县"
+ 1426 county="[1997-]夏邑县"
+ 1481 county="[1997-]永城市"
+ 1500 county="[1998-]信阳市"
+ 1501 county="[1998-]市辖区"
+ 1502 county="[1998-]浉河区"
+ 1503 county="[1998-]平桥区"
+ 1521 county="[1998-]罗山县"
+ 1522 county="[1998-]光山县"
+ 1523 county="[1998-]新县"
+ 1524 county="[1998-]商城县"
+ 1525 county="[1998-]固始县"
+ 1526 county="[1998-]潢川县"
+ 1527 county="[1998-]淮滨县"
+ 1528 county="[1998-]息县"
+ 1600 county="[2000-]周口市"
+ 1601 county="[2000-]市辖区"
+ 1602 county="[2000-]川汇区"
+ 1603 county="[2019-]淮阳区"
+ 1621 county="[2000-]扶沟县"
+ 1622 county="[2000-]西华县"
+ 1623 county="[2000-]商水县"
+ 1624 county="[2000-]沈丘县"
+ 1625 county="[2000-]郸城县"
+ 1626 county="[2000-2019]淮阳县"
+ 1627 county="[2000-]太康县"
+ 1628 county="[2000-]鹿邑县"
+ 1681 county="[2000-]项城市"
+ 1700 county="[2000-]驻马店市"
+ 1701 county="[2000-]市辖区"
+ 1702 county="[2000-]驿城区"
+ 1721 county="[2000-]西平县"
+ 1722 county="[2000-]上蔡县"
+ 1723 county="[2000-]平舆县"
+ 1724 county="[2000-]正阳县"
+ 1725 county="[2000-]确山县"
+ 1726 county="[2000-]泌阳县"
+ 1727 county="[2000-]汝南县"
+ 1728 county="[2000-]遂平县"
+ 1729 county="[2000-]新蔡县"
+ 2100 county="[-1983]安阳地区"
+ 2121 county="[-1983]林县"
+ 2122 county="[-1983]安阳县"
+ 2123 county="[-1983]汤阴县"
+ 2124 county="[-1983]浚县"
+ 2125 county="[-1983]淇县"
+ 2126 county="[-1983]濮阳县"
+ 2127 county="[-1983]滑县"
+ 2128 county="[-1983]清丰县"
+ 2129 county="[-1983]南乐县"
+ 2130 county="[-1983]内黄县"
+ 2131 county="[-1983]长垣县"
+ 2132 county="[-1983]范县"
+ 2133 county="[-1983]台前县"
+ 2200 county="[-1986]新乡地区"
+ 2221 county="[-1986]沁阳县"
+ 2222 county="[-1983]博爱县"
+ 2223 county="[-1986]济源县"
+ 2224 county="[-1986]孟县"
+ 2225 county="[-1986]温县"
+ 2226 county="[-1986]武陟县"
+ 2227 county="[-1983]修武县"
+ 2228 county="[-1986]获嘉县"
+ 2229 county="[-1983]新乡县"
+ 2230 county="[-1986]辉县"
+ 2231 county="[-1983]汲县"
+ 2232 county="[-1986]原阳县"
+ 2233 county="[-1986]延津县"
+ 2234 county="[-1986]封丘县"
+ 2300 county="[-1997]商丘地区"
+ 2301 county="[-1997]商丘市"
+ 2302 county="[1996-1997]永城市"
+ 2321 county="[-1997]虞城县"
+ 2322 county="[-1997]商丘县"
+ 2323 county="[-1997]民权县"
+ 2324 county="[-1997]宁陵县"
+ 2325 county="[-1997]睢县"
+ 2326 county="[-1997]夏邑县"
+ 2327 county="[-1997]柘城县"
+ 2328 county="[-1996]永城县"
+ 2400 county="[-1983]开封地区"
+ 2421 county="[-1983]杞县"
+ 2422 county="[-1983]通许县"
+ 2423 county="[-1983]尉氏县"
+ 2424 county="[-1983]开封县"
+ 2425 county="[-1983]中牟县"
+ 2426 county="[-1983]新郑县"
+ 2427 county="[-1983]巩县"
+ 2428 county="[-1983]登封县"
+ 2429 county="[-1983]密县"
+ 2430 county="[-1983]兰考县"
+ 2500 county="[-1986]洛阳地区"
+ 2501 county="[-1986]三门峡市"
+ 2502 county="[1981-1986]义马市"
+ 2521 county="[-1983]偃师县"
+ 2522 county="[-1983]孟津县"
+ 2523 county="[-1983]新安县"
+ 2524 county="[-1986]渑池县"
+ 2525 county="[-1986]陕县"
+ 2526 county="[-1986]灵宝县"
+ 2527 county="[-1986]伊川县"
+ 2528 county="[-1986]汝阳县"
+ 2529 county="[-1986]嵩县"
+ 2530 county="[-1986]洛宁县"
+ 2531 county="[-1986]卢氏县"
+ 2532 county="[-1986]栾川县"
+ 2533 county="[-1986]临汝县"
+ 2534 county="[-1986]宜阳县"
+ 2535 county="[-1981]义马矿区"
+ 2600 county="[-1986]许昌地区"
+ 2601 county="[-1986]许昌市"
+ 2602 county="[-1986]漯河市"
+ 2621 county="[-1986]长葛县"
+ 2622 county="[-1986]禹县"
+ 2623 county="[-1986]鄢陵县"
+ 2624 county="[-1986]许昌县"
+ 2625 county="[-1986]郏县"
+ 2626 county="[-1986]临颍县"
+ 2627 county="[-1986]襄城县"
+ 2628 county="[-1983]宝丰县"
+ 2629 county="[-1986]郾城县"
+ 2630 county="[-1983]叶县"
+ 2631 county="[-1983]鲁山县"
+ 2632 county="[-1986]舞阳县"
+ 2700 county="[-2000]周口地区"
+ 2701 county="[-2000]周口市"
+ 2702 county="[1993-2000]项城市"
+ 2721 county="[-2000]扶沟县"
+ 2722 county="[-2000]西华县"
+ 2723 county="[-2000]商水县"
+ 2724 county="[-2000]太康县"
+ 2725 county="[-2000]鹿邑县"
+ 2726 county="[-2000]郸城县"
+ 2727 county="[-2000]淮阳县"
+ 2728 county="[-2000]沈丘县"
+ 2729 county="[-1993]项城县"
+ 2800 county="[-2000]驻马店地区"
+ 2801 county="[-2000]驻马店市"
+ 2821 county="[-2000]确山县"
+ 2822 county="[-2000]泌阳县"
+ 2823 county="[-2000]遂平县"
+ 2824 county="[-2000]西平县"
+ 2825 county="[-2000]上蔡县"
+ 2826 county="[-2000]汝南县"
+ 2827 county="[-2000]平舆县"
+ 2828 county="[-2000]新蔡县"
+ 2829 county="[-2000]正阳县"
+ 2900 county="[-1994]南阳地区"
+ 2901 county="[-1994]南阳市"
+ 2902 county="[1988-1994]邓州市"
+ 2921 county="[-1994]南召县"
+ 2922 county="[-1994]方城县"
+ 2923 county="[-1994]西峡县"
+ 2924 county="[-1994]南阳县"
+ 2925 county="[-1994]镇平县"
+ 2926 county="[-1994]内乡县"
+ 2927 county="[-1994]淅川县"
+ 2928 county="[-1994]社旗县"
+ 2929 county="[-1994]唐河县"
+ 2930 county="[-1988]邓县"
+ 2931 county="[-1994]新野县"
+ 2932 county="[-1994]桐柏县"
+ 3000 county="[-1998]信阳地区"
+ 3001 county="[-1998]信阳市"
+ 3021 county="[-1998]息县"
+ 3022 county="[-1998]淮滨县"
+ 3023 county="[-1998]信阳县"
+ 3024 county="[-1998]潢川县"
+ 3025 county="[-1998]光山县"
+ 3026 county="[-1998]固始县"
+ 3027 county="[-1998]商城县"
+ 3028 county="[-1998]罗山县"
+ 3029 county="[-1998]新县"
+ 9000 county="[1986-]省直辖县级行政单位"
+ 9001 county="[1986-1989]义马市,[1997-]济源市"
+ 9002 county="[1988-1989]汝州市"
+ 9003 county="[1988-1989]济源市"
+ 9004 county="[1988-1989]禹州市"
+ 9005 county="[1988-1989]卫辉市"
+ 9006 county="[1988-1989]辉县市"
+42 province="湖北省"
+ 0000 county="湖北省"
+ 0100 county="武汉市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]江岸区"
+ 0103 county="[1983-]江汉区"
+ 0104 county="[1983-]硚口区"
+ 0105 county="[1983-]汉阳区"
+ 0106 county="[1983-]武昌区"
+ 0107 county="[1983-]青山区"
+ 0111 county="[1983-]洪山区"
+ 0112 county="[1983-]东西湖区"
+ 0113 county="[1984-]汉南区"
+ 0114 county="[1992-]蔡甸区"
+ 0115 county="[1995-]江夏区"
+ 0116 county="[1998-]黄陂区"
+ 0117 county="[1998-]新洲区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-1992]汉阳县"
+ 0122 county="[-1995]武昌县"
+ 0123 county="[1983-1998]黄陂县"
+ 0124 county="[1983-1998]新洲县"
+ 0200 county="黄石市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]黄石港区"
+ 0203 county="[1983-2000]石灰窑区,[2001-]西塞山区"
+ 0204 county="[1983-]下陆区"
+ 0205 county="[1983-]铁山区"
+ 0211 county="[1983-1985]郊区"
+ 0220 county="[-1983]市区"
+ 0221 county="[-1994]大冶县"
+ 0222 county="[1996-]阳新县"
+ 0281 county="[1994-]大冶市"
+ 0300 county="十堰市"
+ 0301 county="[1984-]市辖区"
+ 0302 county="[1984-]茅箭区"
+ 0303 county="[1984-]张湾区"
+ 0304 county="[2014-]郧阳区"
+ 0321 county="[1994-2014]郧县"
+ 0322 county="[1994-]郧西县"
+ 0323 county="[1994-]竹山县"
+ 0324 county="[1994-]竹溪县"
+ 0325 county="[1994-]房县"
+ 0381 county="[1994-]丹江口市"
+ 0400 county="[-1994]沙市市"
+ 0500 county="宜昌市"
+ 0501 county="[1986-]市辖区"
+ 0502 county="[1986-]西陵区"
+ 0503 county="[1986-]伍家岗区"
+ 0504 county="[1986-]点军区"
+ 0505 county="[1995-]猇亭区"
+ 0506 county="[2001-]夷陵区"
+ 0521 county="[1992-2001]宜昌县"
+ 0523 county="[1992-1996]枝江县"
+ 0525 county="[1992-]远安县"
+ 0526 county="[1992-]兴山县"
+ 0527 county="[1992-]秭归县"
+ 0528 county="[1992-]长阳土家族自治县"
+ 0529 county="[1992-]五峰土家族自治县"
+ 0581 county="[1987-1997]枝城市,[1998-]宜都市"
+ 0582 county="[1992-]当阳市"
+ 0583 county="[1996-]枝江市"
+ 0600 county="[-2009]襄樊市,[2010-]襄阳市"
+ 0601 county="[1984-]市辖区"
+ 0602 county="[1984-]襄城区"
+ 0603 county="[1984-1995]樊东区"
+ 0604 county="[1984-1995]樊西区"
+ 0605 county="[1984-1995]郊区"
+ 0606 county="[1995-]樊城区"
+ 0607 county="[2001-2009]襄阳区,[2010-]襄州区"
+ 0619 county="[1983-1986]随州市"
+ 0620 county="[1983-1986]老河口市"
+ 0621 county="[1983-2001]襄阳县"
+ 0622 county="[1983-1988]枣阳县"
+ 0623 county="[1983-1994]宜城县"
+ 0624 county="[1983-]南漳县"
+ 0625 county="[1983-]谷城县"
+ 0626 county="[1983-]保康县"
+ 0681 county="[1989-1994]随州市"
+ 0682 county="[1989-]老河口市"
+ 0683 county="[1989-]枣阳市"
+ 0684 county="[1994-]宜城市"
+ 0700 county="[1983-]鄂州市"
+ 0701 county="[1987-]市辖区"
+ 0702 county="[1987-]梁子湖区"
+ 0703 county="[1987-]华容区"
+ 0704 county="[1987-]鄂城区"
+ 0800 county="[1983-]荆门市"
+ 0801 county="[1985-]市辖区"
+ 0802 county="[1985-]东宝区"
+ 0803 county="[1985-1998]沙洋区"
+ 0804 county="[2001-]掇刀区"
+ 0821 county="[1996-2018]京山县"
+ 0822 county="[1998-]沙洋县"
+ 0881 county="[1996-]钟祥市"
+ 0882 county="[2018-]京山市"
+ 0900 county="[1993-]孝感市"
+ 0901 county="[1993-]市辖区"
+ 0902 county="[1993-]孝南区"
+ 0921 county="[1993-]孝昌县"
+ 0922 county="[1993-]大悟县"
+ 0923 county="[1993-]云梦县"
+ 0924 county="[1993-1997]汉川县"
+ 0981 county="[1993-]应城市"
+ 0982 county="[1993-]安陆市"
+ 0983 county="[1993-2000]广水市"
+ 0984 county="[1997-]汉川市"
+ 1000 county="[1994-1995]荆沙市,[1996-]荆州市"
+ 1001 county="[1994-]市辖区"
+ 1002 county="[1994-]沙市区"
+ 1003 county="[1994-]荆州区"
+ 1004 county="[1994-1998]江陵区"
+ 1021 county="[1994-1995]松滋县"
+ 1022 county="[1994-]公安县"
+ 1023 county="[1994-2020]监利县"
+ 1024 county="[1998-]江陵县"
+ 1025 county="[1994-1996]京山县"
+ 1081 county="[1994-]石首市"
+ 1082 county="[1994-1996]钟祥市"
+ 1083 county="[1994-]洪湖市"
+ 1087 county="[1995-]松滋市"
+ 1088 county="[2020-]监利市"
+ 1100 county="[1995-]黄冈市"
+ 1101 county="[1995-]市辖区"
+ 1102 county="[1995-]黄州区"
+ 1121 county="[1995-]团风县"
+ 1122 county="[1995-]红安县"
+ 1123 county="[1995-]罗田县"
+ 1124 county="[1995-]英山县"
+ 1125 county="[1995-]浠水县"
+ 1126 county="[1995-]蕲春县"
+ 1127 county="[1995-]黄梅县"
+ 1181 county="[1995-]麻城市"
+ 1182 county="[1995-]武穴市"
+ 1200 county="[1998-]咸宁市"
+ 1201 county="[1998-]市辖区"
+ 1202 county="[1998-]咸安区"
+ 1221 county="[1998-]嘉鱼县"
+ 1222 county="[1998-]通城县"
+ 1223 county="[1998-]崇阳县"
+ 1224 county="[1998-]通山县"
+ 1281 county="[1998-]赤壁市"
+ 1300 county="[2000-]随州市"
+ 1301 county="[2000-]市辖区"
+ 1302 county="[2000-2009]曾都区"
+ 1303 county="[2009-]曾都区"
+ 1321 county="[2009-]随县"
+ 1381 county="[2000-]广水市"
+ 2100 county="[-1995]黄冈地区"
+ 2101 county="[1986-1995]麻城市"
+ 2102 county="[1987-1995]武穴市"
+ 2103 county="[1990-1995]黄州市"
+ 2121 county="[-1990]黄冈县"
+ 2122 county="[-1983]新洲县"
+ 2123 county="[-1995]红安县"
+ 2124 county="[-1986]麻城县"
+ 2125 county="[-1995]罗田县"
+ 2126 county="[-1995]英山县"
+ 2127 county="[-1995]浠水县"
+ 2128 county="[-1995]蕲春县"
+ 2129 county="[-1987]广济县"
+ 2130 county="[-1995]黄梅县"
+ 2131 county="[-1983]鄂城县"
+ 2200 county="[-1993]孝感地区"
+ 2201 county="[1983-1993]孝感市"
+ 2202 county="[1986-1993]应城市"
+ 2203 county="[1987-1993]安陆市"
+ 2204 county="[1988-1993]广水市"
+ 2221 county="[-1983]孝感县"
+ 2222 county="[-1983]黄陂县"
+ 2223 county="[-1993]大悟县"
+ 2224 county="[-1988]应山县"
+ 2225 county="[-1987]安陆县"
+ 2226 county="[-1993]云梦县"
+ 2227 county="[-1986]应城县"
+ 2228 county="[-1993]汉川县"
+ 2300 county="[-1998]咸宁地区"
+ 2301 county="[1983-1998]咸宁市"
+ 2302 county="[1986-1998]蒲圻市"
+ 2321 county="[-1983]咸宁县"
+ 2322 county="[-1998]嘉鱼县"
+ 2323 county="[-1986]蒲圻县"
+ 2324 county="[-1998]通城县"
+ 2325 county="[-1998]崇阳县"
+ 2326 county="[-1998]通山县"
+ 2327 county="[-1996]阳新县"
+ 2400 county="[-1994]荆州地区"
+ 2401 county="[1986-1994]仙桃市"
+ 2402 county="[1986-1994]石首市"
+ 2403 county="[1987-1994]洪湖市"
+ 2404 county="[1987-1994]天门市"
+ 2405 county="[1988-1994]潜江市"
+ 2406 county="[1992-1994]钟祥市"
+ 2421 county="[-1994]江陵县"
+ 2422 county="[-1994]松滋县"
+ 2423 county="[-1994]公安县"
+ 2424 county="[-1986]石首县"
+ 2425 county="[-1994]监利县"
+ 2426 county="[-1987]洪湖县"
+ 2427 county="[-1986]沔阳县"
+ 2428 county="[-1987]天门县"
+ 2429 county="[-1988]潜江县"
+ 2430 county="[-1983]荆门县"
+ 2431 county="[-1992]钟祥县"
+ 2432 county="[-1994]京山县"
+ 2500 county="[-1983]襄阳地区"
+ 2501 county="[-1983]随州市"
+ 2502 county="[-1983]老河口市"
+ 2521 county="[-1983]襄阳县"
+ 2522 county="[-1983]枣阳县"
+ 2523 county="[-1983]随县"
+ 2524 county="[-1983]宜城县"
+ 2525 county="[-1983]南漳县"
+ 2526 county="[-1983]光化县"
+ 2527 county="[-1983]谷城县"
+ 2528 county="[-1983]保康县"
+ 2600 county="[-1994]郧阳地区"
+ 2601 county="[1983-1994]丹江口市"
+ 2621 county="[-1983]均县"
+ 2622 county="[-1994]郧县"
+ 2623 county="[-1994]郧西县"
+ 2624 county="[-1994]竹山县"
+ 2625 county="[-1994]竹溪县"
+ 2626 county="[-1994]房县"
+ 2627 county="[-1983]神农架林区"
+ 2700 county="[-1992]宜昌地区"
+ 2701 county="[1987-1992]枝城市"
+ 2702 county="[1988-1992]当阳市"
+ 2721 county="[-1992]宜昌县"
+ 2722 county="[-1987]宜都县"
+ 2723 county="[-1992]枝江县"
+ 2724 county="[-1988]当阳县"
+ 2725 county="[-1992]远安县"
+ 2726 county="[-1992]兴山县"
+ 2727 county="[-1992]秭归县"
+ 2728 county="[-1983]长阳县,[1984-1992]长阳土家族自治县"
+ 2729 county="[-1983]五峰县,[1984-1992]五峰土家族自治县"
+ 2800 county="[-1982]恩施地区,[1983-1992]鄂西土家族苗族自治州,[1993-]恩施土家族苗族自治州"
+ 2801 county="[1981-]恩施市"
+ 2802 county="[1986-]利川市"
+ 2821 county="[-1983]恩施县"
+ 2822 county="建始县"
+ 2823 county="巴东县"
+ 2824 county="[-1986]利川县"
+ 2825 county="宣恩县"
+ 2826 county="咸丰县"
+ 2827 county="[-1982]来凤土家族自治县,[1983-]来凤县"
+ 2828 county="[-1982]鹤峰土家族自治县,[1983-]鹤峰县"
+ 2900 county="林区"
+ 2921 county="神农架林区"
+ 9000 county="[1986-]省直辖县级行政单位"
+ 9001 county="随州市"
+ 9002 county="[1986-1989]老河口市"
+ 9003 county="[1988-1989]枣阳市"
+ 9004 county="[1994-]仙桃市"
+ 9005 county="[1994-]潜江市"
+ 9006 county="[1994-]天门市"
+ 9021 county="神农架林区"
+43 province="湖南省"
+ 0000 county="湖南省"
+ 0100 county="长沙市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-1995]东区,[1996-]芙蓉区"
+ 0103 county="[1983-1995]南区,[1996-]天心区"
+ 0104 county="[1983-1995]西区,[1996-]岳麓区"
+ 0105 county="[1983-1995]北区,[1996-]开福区"
+ 0111 county="[1983-1995]郊区,[1996-]雨花区"
+ 0112 county="[2011-]望城区"
+ 0120 county="[-1983]市区"
+ 0121 county="长沙县"
+ 0122 county="[-2011]望城县"
+ 0123 county="[1983-1993]浏阳县"
+ 0124 county="[1983-2017]宁乡县"
+ 0181 county="[1993-]浏阳市"
+ 0182 county="[2017-]宁乡市"
+ 0200 county="株洲市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-1996]东区,[1997-]荷塘区"
+ 0203 county="[1983-1996]北区,[1997-]芦淞区"
+ 0204 county="[1983-1996]南区,[1997-]石峰区"
+ 0211 county="[1983-1996]郊区,[1997-]天元区"
+ 0212 county="[2018-]渌口区"
+ 0219 county="[1985-1986]醴陵市"
+ 0220 county="[-1983]市区"
+ 0221 county="[-2018]株洲县"
+ 0222 county="[1983-1985]醴陵县"
+ 0223 county="[1983-]攸县"
+ 0224 county="[1983-]茶陵县"
+ 0225 county="[1983-1993]酃县,[1994-]炎陵县"
+ 0281 county="[1989-]醴陵市"
+ 0300 county="湘潭市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1984-]雨湖区"
+ 0303 county="[1984-1992]湘江区"
+ 0304 county="[1984-]岳塘区"
+ 0305 county="[1984-1992]板塘区"
+ 0306 county="[1988-1990]韶山区"
+ 0311 county="[1984-1992]郊区"
+ 0312 county="[1984-1988]韶山区"
+ 0321 county="湘潭县"
+ 0322 county="[-1986]湘乡县"
+ 0381 county="[1989-]湘乡市"
+ 0382 county="[1990-]韶山市"
+ 0400 county="衡阳市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-2001]江东区"
+ 0403 county="[1983-2001]城南区"
+ 0404 county="[1983-2001]城北区"
+ 0405 county="[2001-]珠晖区"
+ 0406 county="[2001-]雁峰区"
+ 0407 county="[2001-]石鼓区"
+ 0408 county="[2001-]蒸湘区"
+ 0411 county="[1983-2001]郊区"
+ 0412 county="[1984-]南岳区"
+ 0421 county="[1983-]衡阳县"
+ 0422 county="[1983-]衡南县"
+ 0423 county="[1983-]衡山县"
+ 0424 county="[1983-]衡东县"
+ 0425 county="[1983-1996]常宁县"
+ 0426 county="[1983-]祁东县"
+ 0427 county="[1983-1986]耒阳县"
+ 0481 county="[1989-]耒阳市"
+ 0482 county="[1996-]常宁市"
+ 0500 county="邵阳市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-1996]东区,[1997-]双清区"
+ 0503 county="[1983-1996]西区,[1997-]大祥区"
+ 0504 county="[1983-1987]桥头区"
+ 0511 county="[1983-1996]郊区,[1997-]北塔区"
+ 0521 county="[1983-2019]邵东县"
+ 0522 county="[1983-]新邵县"
+ 0523 county="[1986-]邵阳县"
+ 0524 county="[1986-]隆回县"
+ 0525 county="[1986-]洞口县"
+ 0526 county="[1986-1994]武冈县"
+ 0527 county="[1986-]绥宁县"
+ 0528 county="[1986-]新宁县"
+ 0529 county="[1986-]城步苗族自治县"
+ 0581 county="[1994-]武冈市"
+ 0582 county="[2019-]邵东市"
+ 0600 county="[1983-]岳阳市"
+ 0601 county="[1984-]市辖区"
+ 0602 county="[1984-1995]南区,[1996-]岳阳楼区"
+ 0603 county="[1984-1995]北区,[1996-]云溪区"
+ 0611 county="[1984-1995]郊区,[1996-]君山区"
+ 0621 county="[1983-]岳阳县"
+ 0622 county="[1986-1992]临湘县"
+ 0623 county="[1986-]华容县"
+ 0624 county="[1986-]湘阴县"
+ 0625 county="[1986-1987]汨罗县"
+ 0626 county="[1986-]平江县"
+ 0681 county="[1989-]汨罗市"
+ 0682 county="[1992-]临湘市"
+ 0700 county="[1988-]常德市"
+ 0701 county="[1988-]市辖区"
+ 0702 county="[1988-]武陵区"
+ 0703 county="[1988-]鼎城区"
+ 0721 county="[1988-]安乡县"
+ 0722 county="[1988-]汉寿县"
+ 0723 county="[1988-]澧县"
+ 0724 county="[1988-]临澧县"
+ 0725 county="[1988-]桃源县"
+ 0726 county="[1988-]石门县"
+ 0727 county="[1988-1988]慈利县"
+ 0781 county="[1989-]津市市"
+ 0800 county="[1988-1993]大庸市,[1994-]张家界市"
+ 0801 county="[1988-]市辖区"
+ 0802 county="[1988-]永定区"
+ 0811 county="[1988-]武陵源区"
+ 0821 county="[1988-]慈利县"
+ 0822 county="[1988-]桑植县"
+ 0900 county="[1994-]益阳市"
+ 0901 county="[1994-]市辖区"
+ 0902 county="[1994-]资阳区"
+ 0903 county="[1994-]赫山区"
+ 0921 county="[1994-]南县"
+ 0922 county="[1994-]桃江县"
+ 0923 county="[1994-]安化县"
+ 0981 county="[1994-]沅江市"
+ 1000 county="[1994-]郴州市"
+ 1001 county="[1994-]市辖区"
+ 1002 county="[1994-]北湖区"
+ 1003 county="[1994-]苏仙区"
+ 1021 county="[1994-]桂阳县"
+ 1022 county="[1994-]宜章县"
+ 1023 county="[1994-]永兴县"
+ 1024 county="[1994-]嘉禾县"
+ 1025 county="[1994-]临武县"
+ 1026 county="[1994-]汝城县"
+ 1027 county="[1994-]桂东县"
+ 1028 county="[1994-]安仁县"
+ 1081 county="[1994-]资兴市"
+ 1100 county="[1995-]永州市"
+ 1101 county="[1995-]市辖区"
+ 1102 county="[1995-2004]芝山区,[2005-]零陵区"
+ 1103 county="[1995-]冷水滩区"
+ 1121 county="[1995-2021]祁阳县"
+ 1122 county="[1995-]东安县"
+ 1123 county="[1995-]双牌县"
+ 1124 county="[1995-]道县"
+ 1125 county="[1995-]江永县"
+ 1126 county="[1995-]宁远县"
+ 1127 county="[1995-]蓝山县"
+ 1128 county="[1995-]新田县"
+ 1129 county="[1995-]江华瑶族自治县"
+ 1181 county="[2021-]祁阳市"
+ 1200 county="[1997-]怀化市"
+ 1201 county="[1997-]市辖区"
+ 1202 county="[1997-]鹤城区"
+ 1221 county="[1997-]中方县"
+ 1222 county="[1997-]沅陵县"
+ 1223 county="[1997-]辰溪县"
+ 1224 county="[1997-]溆浦县"
+ 1225 county="[1997-]会同县"
+ 1226 county="[1997-]麻阳苗族自治县"
+ 1227 county="[1997-]新晃侗族自治县"
+ 1228 county="[1997-]芷江侗族自治县"
+ 1229 county="[1997-]靖州苗族侗族自治县"
+ 1230 county="[1997-]通道侗族自治县"
+ 1281 county="[1997-]洪江市"
+ 1300 county="[1999-]娄底市"
+ 1301 county="[1999-]市辖区"
+ 1302 county="[1999-]娄星区"
+ 1321 county="[1999-]双峰县"
+ 1322 county="[1999-]新化县"
+ 1381 county="[1999-]冷水江市"
+ 1382 county="[1999-]涟源市"
+ 2100 county="[-1983]湘潭地区"
+ 2121 county="[-1983]湘潭县"
+ 2122 county="[-1983]湘乡县"
+ 2123 county="[-1983]醴陵县"
+ 2124 county="[-1983]浏阳县"
+ 2125 county="[-1983]攸县"
+ 2126 county="[-1983]茶陵县"
+ 2127 county="[-1983]酃县"
+ 2128 county="[-1983]韶山区"
+ 2200 county="[-1986]岳阳地区"
+ 2201 county="[-1983]岳阳市"
+ 2221 county="[-1983]岳阳县"
+ 2222 county="[-1986]平江县"
+ 2223 county="[-1986]湘阴县"
+ 2224 county="[-1986]汨罗县"
+ 2225 county="[-1986]临湘县"
+ 2226 county="[-1986]华容县"
+ 2300 county="[-1994]益阳地区"
+ 2301 county="[-1994]益阳市"
+ 2302 county="[1988-1994]沅江市"
+ 2321 county="[-1994]益阳县"
+ 2322 county="[-1994]南县"
+ 2323 county="[-1988]沅江县"
+ 2324 county="[-1994]宁乡县"
+ 2325 county="[-1994]桃江县"
+ 2326 county="[-1994]安化县"
+ 2400 county="[-1988]常德地区"
+ 2401 county="[-1988]常德市"
+ 2402 county="[-1988]津市市"
+ 2421 county="[-1988]常德县"
+ 2422 county="[-1988]安乡县"
+ 2423 county="[-1988]汉寿县"
+ 2424 county="[-1988]澧县"
+ 2425 county="[-1988]临澧县"
+ 2426 county="[-1988]桃源县"
+ 2427 county="[-1988]石门县"
+ 2428 county="[-1988]慈利县"
+ 2500 county="[-1999]娄底地区"
+ 2501 county="[-1999]娄底市"
+ 2502 county="[-1999]冷水江市"
+ 2503 county="[-1999]涟源市"
+ 2521 county="[-1999]涟源县"
+ 2522 county="[-1999]双峰县"
+ 2523 county="[-1983]邵东县"
+ 2524 county="[-1999]新化县"
+ 2525 county="[-1983]新邵县"
+ 2600 county="[-1986]邵阳地区"
+ 2621 county="[-1986]邵阳县"
+ 2622 county="[-1986]隆回县"
+ 2623 county="[-1986]武冈县"
+ 2624 county="[-1986]洞口县"
+ 2625 county="[-1986]新宁县"
+ 2626 county="[-1986]绥宁县"
+ 2627 county="[-1986]城步苗族自治县"
+ 2700 county="[-1983]衡阳地区"
+ 2721 county="[-1983]衡阳县"
+ 2722 county="[-1983]衡南县"
+ 2723 county="[-1983]衡山县"
+ 2724 county="[-1983]衡东县"
+ 2725 county="[-1983]常宁县"
+ 2726 county="[-1983]祁东县"
+ 2727 county="[-1983]祁阳县"
+ 2800 county="[-1994]郴州地区"
+ 2801 county="[-1994]郴州市"
+ 2802 county="[1984-1994]资兴市"
+ 2821 county="[-1994]郴县"
+ 2822 county="[-1994]桂阳县"
+ 2823 county="[-1994]永兴县"
+ 2824 county="[-1994]宜章县"
+ 2825 county="[-1984]资兴县"
+ 2826 county="[-1994]嘉禾县"
+ 2827 county="[-1994]临武县"
+ 2828 county="[-1994]汝城县"
+ 2829 county="[-1994]桂东县"
+ 2830 county="[-1983]耒阳县"
+ 2831 county="[-1994]安仁县"
+ 2900 county="[-1995]零陵地区"
+ 2901 county="[1982-1995]永州市"
+ 2902 county="[1984-1995]冷水滩市"
+ 2921 county="[-1984]零陵县"
+ 2922 county="[-1995]东安县"
+ 2923 county="[-1995]道县"
+ 2924 county="[-1995]宁远县"
+ 2925 county="[-1995]江永县"
+ 2926 county="[-1995]江华瑶族自治县"
+ 2927 county="[-1995]蓝山县"
+ 2928 county="[-1995]新田县"
+ 2929 county="[-1995]双牌县"
+ 2930 county="[1983-1995]祁阳县"
+ 3000 county="[-1980]黔阳地区,[1981-1996]怀化地区"
+ 3001 county="[-1997]怀化市"
+ 3002 county="[-1997]洪江市"
+ 3021 county="[-1997]黔阳县"
+ 3022 county="[-1997]沅陵县"
+ 3023 county="[-1997]辰溪县"
+ 3024 county="[-1997]溆浦县"
+ 3025 county="[-1987]麻阳县,[1988-1997]麻阳苗族自治县"
+ 3026 county="[-1997]新晃侗族自治县"
+ 3027 county="[-1985]芷江县,[1986-1997]芷江侗族自治县"
+ 3028 county="[-1982]怀化县"
+ 3029 county="[-1997]会同县"
+ 3030 county="[-1986]靖县,[1987-1997]靖州苗族侗族自治县"
+ 3031 county="[-1997]通道侗族自治县"
+ 3100 county="湘西土家族苗族自治州"
+ 3101 county="[1982-]吉首市"
+ 3102 county="[1985-1988]大庸市"
+ 3121 county="[-1982]吉首县"
+ 3122 county="泸溪县"
+ 3123 county="凤凰县"
+ 3124 county="花垣县"
+ 3125 county="保靖县"
+ 3126 county="古丈县"
+ 3127 county="永顺县"
+ 3128 county="[-1985]大庸县"
+ 3129 county="[-1988]桑植县"
+ 3130 county="龙山县"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]醴陵市"
+ 9002 county="[1986-1989]湘乡市"
+ 9003 county="[1986-1989]耒阳市"
+ 9004 county="[1987-1989]汨罗市"
+ 9005 county="[1988-1989]津市市"
+44 province="广东省"
+ 0000 county="广东省"
+ 0100 county="广州市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-2005]东山区"
+ 0103 county="[1983-]荔湾区"
+ 0104 county="[1983-]越秀区"
+ 0105 county="[1983-]海珠区"
+ 0106 county="[1985-]天河区"
+ 0107 county="[1985-2005]芳村区"
+ 0111 county="[1983-1986]郊区,[1987-]白云区"
+ 0112 county="[1983-]黄埔区"
+ 0113 county="[2000-]番禺区"
+ 0114 county="[2000-]花都区"
+ 0115 county="[2005-]南沙区"
+ 0116 county="[2005-2014]萝岗区"
+ 0117 county="[2014-]从化区"
+ 0118 county="[2014-]增城区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-1993]花县"
+ 0122 county="[-1994]从化县"
+ 0123 county="[-1988]新丰县"
+ 0124 county="[-1988]龙门县"
+ 0125 county="[-1993]增城县"
+ 0126 county="[-1992]番禺县"
+ 0127 county="[1983-1988]清远县"
+ 0128 county="[1983-1988]佛冈县"
+ 0181 county="[1992-2000]番禺市"
+ 0182 county="[1993-2000]花都市"
+ 0183 county="[1993-2014]增城市"
+ 0184 county="[1994-2014]从化市"
+ 0200 county="韶关市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1984-2004]北江区"
+ 0203 county="[1984-]武江区"
+ 0204 county="[1984-]浈江区"
+ 0205 county="[2004-]曲江区"
+ 0220 county="[-1983]市区"
+ 0221 county="[-2004]曲江县"
+ 0222 county="[1983-]始兴县"
+ 0223 county="[1983-1996]南雄县"
+ 0224 county="[1983-]仁化县"
+ 0225 county="[1983-1994]乐昌县"
+ 0226 county="[1983-1988]连县"
+ 0227 county="[1983-1988]阳山县"
+ 0228 county="[1983-1988]英德县"
+ 0229 county="[1983-]翁源县"
+ 0230 county="[1983-1988]连山壮族瑶族自治县"
+ 0231 county="[1983-1988]连南瑶族自治县"
+ 0232 county="[1983-]乳源瑶族自治县"
+ 0233 county="[1988-]新丰县"
+ 0281 county="[1994-]乐昌市"
+ 0282 county="[1996-]南雄市"
+ 0300 county="深圳市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-1990]沙头角区办事处"
+ 0303 county="[1983-1989]罗湖区办事处,[1990-]罗湖区"
+ 0304 county="[1983-1989]上埗区办事处,[1990-]福田区"
+ 0305 county="[1983-1989]南头区办事处,[1990-]南山区"
+ 0306 county="[1992-]宝安区"
+ 0307 county="[1992-]龙岗区"
+ 0308 county="[1997-]盐田区"
+ 0309 county="[2016-]龙华区"
+ 0310 county="[2016-]坪山区"
+ 0311 county="[2018-]光明区"
+ 0320 county="[-1983]市区"
+ 0321 county="[1982-1992]宝安县"
+ 0400 county="珠海市"
+ 0401 county="[1984-]市辖区"
+ 0402 county="[1984-]香洲区"
+ 0403 county="[2001-]斗门区"
+ 0404 county="[2001-]金湾区"
+ 0421 county="[1983-2001]斗门县"
+ 0500 county="汕头市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1984-1991]同平区"
+ 0503 county="[1984-1991]安平区"
+ 0504 county="[1984-1991]公园区"
+ 0505 county="[1984-1991]金砂区"
+ 0506 county="[1984-2003]达濠区"
+ 0507 county="[1991-]龙湖区"
+ 0508 county="[1991-2003]金园区"
+ 0509 county="[1991-2003]升平区"
+ 0510 county="[1994-2003]河浦区"
+ 0511 county="[1984-1991]郊区,[2003-]金平区"
+ 0512 county="[2003-]濠江区"
+ 0513 county="[2003-]潮阳区"
+ 0514 county="[2003-]潮南区"
+ 0515 county="[2003-]澄海区"
+ 0520 county="[1983-1986]潮州市"
+ 0521 county="[1983-1994]澄海县"
+ 0522 county="[1983-1991]饶平县"
+ 0523 county="[1983-]南澳县"
+ 0524 county="[1983-1993]潮阳县"
+ 0525 county="[1983-1991]揭阳县"
+ 0526 county="[1983-1991]揭西县"
+ 0527 county="[1983-1991]普宁县"
+ 0528 county="[1983-1991]惠来县"
+ 0581 county="[1989-1991]潮州市"
+ 0582 county="[1993-2003]潮阳市"
+ 0583 county="[1994-2003]澄海市"
+ 0600 county="佛山市"
+ 0601 county="[1984-]市辖区"
+ 0602 county="[1984-1986]汾江区,[1987-2001]城区"
+ 0603 county="[1984-2002]石湾区"
+ 0604 county="[2002-]禅城区"
+ 0605 county="[2002-]南海区"
+ 0606 county="[2002-]顺德区"
+ 0607 county="[2002-]三水区"
+ 0608 county="[2002-]高明区"
+ 0620 county="[1983-1988]中山市"
+ 0621 county="[1983-1993]三水县"
+ 0622 county="[1983-1992]南海县"
+ 0623 county="[1983-1992]顺德县"
+ 0624 county="[1983-1994]高明县"
+ 0681 county="[1992-2002]顺德市"
+ 0682 county="[1992-2002]南海市"
+ 0683 county="[1993-2002]三水市"
+ 0684 county="[1994-2002]高明市"
+ 0700 county="江门市"
+ 0701 county="[1984-]市辖区"
+ 0702 county="[1984-1994]城区"
+ 0703 county="[1994-]蓬江区"
+ 0704 county="[1994-]江海区"
+ 0705 county="[2002-]新会区"
+ 0711 county="[1984-1994]郊区"
+ 0721 county="[1983-1992]新会县"
+ 0722 county="[1983-1992]台山县"
+ 0723 county="[1983-1994]恩平县"
+ 0724 county="[1983-1993]开平县"
+ 0725 county="[1983-1993]鹤山县"
+ 0726 county="[1983-1988]阳江县"
+ 0727 county="[1983-1988]阳春县"
+ 0781 county="[1992-]台山市"
+ 0782 county="[1992-2002]新会市"
+ 0783 county="[1993-]开平市"
+ 0784 county="[1993-]鹤山市"
+ 0785 county="[1994-]恩平市"
+ 0800 county="湛江市"
+ 0801 county="[1984-]市辖区"
+ 0802 county="[1984-]赤坎区"
+ 0803 county="[1984-]霞山区"
+ 0804 county="[1984-]坡头区"
+ 0811 county="[1984-1993]郊区,[1994-]麻章区"
+ 0821 county="[1983-1994]吴川县"
+ 0822 county="[1983-1993]廉江县"
+ 0823 county="[1983-]遂溪县"
+ 0824 county="[1983-1994]海康县"
+ 0825 county="[1983-]徐闻县"
+ 0881 county="[1993-]廉江市"
+ 0882 county="[1994-]雷州市"
+ 0883 county="[1994-]吴川市"
+ 0900 county="茂名市"
+ 0901 county="[1985-]市辖区"
+ 0902 county="[1985-]茂南区"
+ 0903 county="[2001-2014]茂港区"
+ 0904 county="[2014-]电白区"
+ 0921 county="[1983-1995]信宜县"
+ 0922 county="[1983-1993]高州县"
+ 0923 county="[1983-2014]电白县"
+ 0924 county="[1983-1994]化州县"
+ 0981 county="[1993-]高州市"
+ 0982 county="[1994-]化州市"
+ 0983 county="[1995-]信宜市"
+ 1000 county="[1986-1988]海口市"
+ 1100 county="[1987-1988]三亚市"
+ 1200 county="[1988-]肇庆市"
+ 1201 county="[1988-]市辖区"
+ 1202 county="[1988-]端州区"
+ 1203 county="[1988-]鼎湖区"
+ 1204 county="[2015-]高要区"
+ 1221 county="[1988-1993]高要县"
+ 1222 county="[1988-1993]四会县"
+ 1223 county="[1988-]广宁县"
+ 1224 county="[1988-]怀集县"
+ 1225 county="[1988-]封开县"
+ 1226 county="[1988-]德庆县"
+ 1227 county="[1988-1992]云浮县"
+ 1228 county="[1988-1994]新兴县"
+ 1229 county="[1988-1994]郁南县"
+ 1230 county="[1988-1993]罗定县"
+ 1281 county="[1992-1994]云浮市"
+ 1282 county="[1993-1994]罗定市"
+ 1283 county="[1993-2015]高要市"
+ 1284 county="[1993-]四会市"
+ 1300 county="[1988-]惠州市"
+ 1301 county="[1988-]市辖区"
+ 1302 county="[1988-]惠城区"
+ 1303 county="[2003-]惠阳区"
+ 1321 county="[1988-1994]惠阳县"
+ 1322 county="[1988-]博罗县"
+ 1323 county="[1988-]惠东县"
+ 1324 county="[1988-]龙门县"
+ 1381 county="[1994-2003]惠阳市"
+ 1400 county="[1988-]梅州市"
+ 1401 county="[1988-]市辖区"
+ 1402 county="[1988-]梅江区"
+ 1403 county="[2013-]梅县区"
+ 1421 county="[1988-2013]梅县"
+ 1422 county="[1988-]大埔县"
+ 1423 county="[1988-]丰顺县"
+ 1424 county="[1988-]五华县"
+ 1425 county="[1988-1994]兴宁县"
+ 1426 county="[1988-]平远县"
+ 1427 county="[1988-]蕉岭县"
+ 1481 county="[1994-]兴宁市"
+ 1500 county="[1988-]汕尾市"
+ 1501 county="[1988-]市辖区"
+ 1502 county="[1988-]城区"
+ 1521 county="[1988-]海丰县"
+ 1522 county="[1988-1995]陆丰县"
+ 1523 county="[1988-]陆河县"
+ 1581 county="[1995-]陆丰市"
+ 1600 county="[1988-]河源市"
+ 1601 county="[1988-]市辖区"
+ 1602 county="[1988-]源城区"
+ 1611 county="[1988-1993]郊区"
+ 1621 county="[1988-]紫金县"
+ 1622 county="[1988-]龙川县"
+ 1623 county="[1988-]连平县"
+ 1624 county="[1988-]和平县"
+ 1625 county="[1993-]东源县"
+ 1700 county="[1988-]阳江市"
+ 1701 county="[1988-]市辖区"
+ 1702 county="[1988-]江城区"
+ 1703 county="[1988-1991]阳东区"
+ 1704 county="[2014-]阳东区"
+ 1721 county="[1988-]阳西县"
+ 1722 county="[1988-1994]阳春县"
+ 1723 county="[1991-2014]阳东县"
+ 1781 county="[1994-]阳春市"
+ 1800 county="[1988-]清远市"
+ 1801 county="[1988-]市辖区"
+ 1802 county="[1988-]清城区"
+ 1803 county="[2012-]清新区"
+ 1811 county="[1988-1992]清郊区"
+ 1821 county="[1988-]佛冈县"
+ 1822 county="[1988-1994]英德县"
+ 1823 county="[1988-]阳山县"
+ 1824 county="[1988-1994]连县"
+ 1825 county="[1988-]连山壮族瑶族自治县"
+ 1826 county="[1988-]连南瑶族自治县"
+ 1827 county="[1992-2012]清新县"
+ 1881 county="[1994-]英德市"
+ 1882 county="[1994-]连州市"
+ 1900 county="[1988-]东莞市"
+ 2000 county="[1988-]中山市"
+ 2100 county="[-1988]海南行政区"
+ 2101 county="[-1986]海口市"
+ 2102 county="[1987-1988]通什市"
+ 2121 county="[-1988]琼山县"
+ 2122 county="[-1988]文昌县"
+ 2123 county="[-1988]琼海县"
+ 2124 county="[-1988]万宁县"
+ 2125 county="[-1988]定安县"
+ 2126 county="[-1988]屯昌县"
+ 2127 county="[-1988]澄迈县"
+ 2128 county="[-1988]临高县"
+ 2129 county="[-1988]儋县"
+ 2130 county="[1987-1988]东方黎族自治县"
+ 2131 county="[1987-1988]乐东黎族自治县"
+ 2132 county="[1987-1988]琼中黎族苗族自治县"
+ 2133 county="[1987-1988]保亭黎族苗族自治县"
+ 2134 county="[1987-1988]陵水黎族自治县"
+ 2135 county="[1987-1988]白沙黎族自治县"
+ 2136 county="[1987-1988]昌江黎族自治县"
+ 2137 county="[1987-1988]西南中沙群岛办事处"
+ 2200 county="[-1987]海南黎族苗族自治州"
+ 2201 county="[1984-1987]三亚市"
+ 2202 county="[1986-1987]通什市"
+ 2221 county="[-1984]崖县"
+ 2222 county="[-1987]东方县"
+ 2223 county="[-1987]乐东县"
+ 2224 county="[-1987]琼中县"
+ 2225 county="[-1987]保亭县"
+ 2226 county="[-1987]陵水县"
+ 2227 county="[-1987]白沙县"
+ 2228 county="[-1987]昌江县"
+ 2229 county="[1984-1987]西南中沙群岛办事处"
+ 2300 county="[-1983]汕头地区"
+ 2301 county="[-1983]汕头市"
+ 2302 county="[-1983]潮州市"
+ 2321 county="[-1983]潮安县"
+ 2322 county="[-1983]澄海县"
+ 2323 county="[-1983]饶平县"
+ 2324 county="[-1983]南澳县"
+ 2325 county="[-1983]潮阳县"
+ 2326 county="[-1983]揭阳县"
+ 2327 county="[-1983]揭西县"
+ 2328 county="[-1983]普宁县"
+ 2329 county="[-1983]惠来县"
+ 2330 county="[-1983]陆丰县"
+ 2331 county="[-1983]海丰县"
+ 2400 county="[-1988]梅县地区"
+ 2401 county="[1983-1982]梅州市,[1983-1987]梅县市"
+ 2421 county="[-1983]梅县"
+ 2422 county="[-1988]大埔县"
+ 2423 county="[-1988]丰顺县"
+ 2424 county="[-1988]五华县"
+ 2425 county="[-1988]兴宁县"
+ 2426 county="[-1988]平远县"
+ 2427 county="[-1988]蕉岭县"
+ 2500 county="[-1988]惠阳地区"
+ 2501 county="[-1988]惠州市"
+ 2502 county="[1985-1988]东莞市"
+ 2521 county="[-1988]惠阳县"
+ 2522 county="[-1988]紫金县"
+ 2523 county="[-1988]和平县"
+ 2524 county="[-1988]连平县"
+ 2525 county="[-1988]河源县"
+ 2526 county="[-1988]博罗县"
+ 2527 county="[-1985]东莞县"
+ 2528 county="[-1988]惠东县"
+ 2529 county="[-1988]龙川县"
+ 2530 county="[1983-1988]陆丰县"
+ 2531 county="[1983-1988]海丰县"
+ 2600 county="[-1983]韶关地区"
+ 2621 county="[-1983]始兴县"
+ 2622 county="[-1983]南雄县"
+ 2623 county="[-1983]仁化县"
+ 2624 county="[-1983]乐昌县"
+ 2625 county="[-1983]连县"
+ 2626 county="[-1983]阳山县"
+ 2627 county="[-1983]英德县"
+ 2628 county="[-1983]清远县"
+ 2629 county="[-1983]佛冈县"
+ 2630 county="[-1983]翁源县"
+ 2631 county="[-1983]连山壮族瑶族自治县"
+ 2632 county="[-1983]连南瑶族自治县"
+ 2633 county="[-1983]乳源瑶族自治县"
+ 2700 county="[-1983]佛山地区"
+ 2701 county="[-1983]佛山市"
+ 2702 county="[-1983]江门市"
+ 2721 county="[-1983]三水县"
+ 2722 county="[-1983]南海县"
+ 2723 county="[-1983]顺德县"
+ 2724 county="[-1983]中山县"
+ 2725 county="[-1983]斗门县"
+ 2726 county="[-1983]新会县"
+ 2727 county="[-1983]台山县"
+ 2728 county="[-1983]恩平县"
+ 2729 county="[-1983]开平县"
+ 2730 county="[-1981]高鹤县"
+ 2731 county="[1981-1983]高明县"
+ 2732 county="[1981-1983]鹤山县"
+ 2800 county="[-1988]肇庆地区"
+ 2801 county="[-1988]肇庆市"
+ 2821 county="[-1988]高要县"
+ 2822 county="[-1988]四会县"
+ 2823 county="[-1988]广宁县"
+ 2824 county="[-1988]怀集县"
+ 2825 county="[-1988]封开县"
+ 2826 county="[-1988]德庆县"
+ 2827 county="[-1988]云浮县"
+ 2828 county="[-1988]新兴县"
+ 2829 county="[-1988]郁南县"
+ 2830 county="[-1988]罗定县"
+ 2900 county="[-1983]湛江地区"
+ 2901 county="[-1983]湛江市"
+ 2902 county="[-1983]茂名市"
+ 2921 county="[-1983]阳江县"
+ 2922 county="[-1983]阳春县"
+ 2923 county="[-1983]信宜县"
+ 2924 county="[-1983]高州县"
+ 2925 county="[-1983]电白县"
+ 2926 county="[-1983]吴川县"
+ 2927 county="[-1983]化州县"
+ 2928 county="[-1983]廉江县"
+ 2929 county="[-1983]遂溪县"
+ 2930 county="[-1983]海康县"
+ 2931 county="[-1983]徐闻县"
+ 5100 county="[1991-]潮州市"
+ 5101 county="[1991-]市辖区"
+ 5102 county="[1991-]湘桥区"
+ 5103 county="[2013-]潮安区"
+ 5121 county="[1991-2013]潮安县"
+ 5122 county="[1991-]饶平县"
+ 5200 county="[1991-]揭阳市"
+ 5201 county="[1991-]市辖区"
+ 5202 county="[1991-]榕城区"
+ 5203 county="[2012-]揭东区"
+ 5221 county="[1991-2012]揭东县"
+ 5222 county="[1991-]揭西县"
+ 5223 county="[1991-1993]普宁县"
+ 5224 county="[1991-]惠来县"
+ 5281 county="[1993-]普宁市"
+ 5300 county="[1994-]云浮市"
+ 5301 county="[1994-]市辖区"
+ 5302 county="[1994-]云城区"
+ 5303 county="[2014-]云安区"
+ 5321 county="[1994-]新兴县"
+ 5322 county="[1994-]郁南县"
+ 5323 county="[1996-2014]云安县"
+ 5381 county="[1994-]罗定市"
+ 9000 county="[1986-1989]省直辖县级行政单位"
+ 9001 county="[1986-1989]潮州市"
+45 province="广西壮族自治区"
+ 0000 county="广西壮族自治区"
+ 0100 county="南宁市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]兴宁区"
+ 0103 county="[1983-2003]新城区,[2004-]青秀区"
+ 0104 county="[1983-2004]城北区"
+ 0105 county="[1983-]江南区"
+ 0106 county="[1983-2004]永新区"
+ 0107 county="[2004-]西乡塘区"
+ 0108 county="[2004-]良庆区"
+ 0109 county="[2004-]邕宁区"
+ 0110 county="[2015-]武鸣区"
+ 0111 county="[1984-2001]郊区"
+ 0121 county="[1983-2004]邕宁县"
+ 0122 county="[1983-2015]武鸣县"
+ 0123 county="[2002-]隆安县"
+ 0124 county="[2002-]马山县"
+ 0125 county="[2002-]上林县"
+ 0126 county="[2002-]宾阳县"
+ 0127 county="[2002-2021]横县"
+ 0181 county="[2021-]横州市"
+ 0200 county="柳州市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]城中区"
+ 0203 county="[1983-]鱼峰区"
+ 0204 county="[1983-]柳南区"
+ 0205 county="[1983-]柳北区"
+ 0206 county="[2016-]柳江区"
+ 0211 county="[1984-2002]郊区"
+ 0221 county="[1983-2016]柳江县"
+ 0222 county="[1983-]柳城县"
+ 0223 county="[2002-]鹿寨县"
+ 0224 county="[2002-]融安县"
+ 0225 county="[2002-]融水苗族自治县"
+ 0226 county="[2002-]三江侗族自治县"
+ 0300 county="桂林市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]秀峰区"
+ 0303 county="[1983-]叠彩区"
+ 0304 county="[1983-]象山区"
+ 0305 county="[1983-]七星区"
+ 0311 county="[1984-1995]郊区,[1996-]雁山区"
+ 0312 county="[2013-]临桂区"
+ 0320 county="[-1983]市区"
+ 0321 county="[1981-]阳朔县"
+ 0322 county="[1983-2013]临桂县"
+ 0323 county="[1998-]灵川县"
+ 0324 county="[1998-]全州县"
+ 0325 county="[1998-]兴安县"
+ 0326 county="[1998-]永福县"
+ 0327 county="[1998-]灌阳县"
+ 0328 county="[1998-]龙胜各族自治县"
+ 0329 county="[1998-]资源县"
+ 0330 county="[1998-]平乐县"
+ 0331 county="[1998-2018]荔浦县"
+ 0332 county="[1998-]恭城瑶族自治县"
+ 0381 county="[2018-]荔浦市"
+ 0400 county="梧州市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-1990]白云区"
+ 0403 county="[1983-]万秀区"
+ 0404 county="[1983-2013]蝶山区"
+ 0405 county="[2003-]长洲区"
+ 0406 county="[2013-]龙圩区"
+ 0411 county="[1983-2003]郊区"
+ 0421 county="[1983-]苍梧县"
+ 0422 county="[1997-]藤县"
+ 0423 county="[1997-]蒙山县"
+ 0481 county="[1997-]岑溪市"
+ 0500 county="[1983-]北海市"
+ 0501 county="[1984-]市辖区"
+ 0502 county="[1984-]海城区"
+ 0503 county="[1994-]银海区"
+ 0511 county="[1984-1994]郊区"
+ 0512 county="[1994-]铁山港区"
+ 0521 county="[1987-]合浦县"
+ 0600 county="[1993-]防城港市"
+ 0601 county="[1993-]市辖区"
+ 0602 county="[1993-]港口区"
+ 0603 county="[1993-]防城区"
+ 0621 county="[1993-]上思县"
+ 0681 county="[1996-]东兴市"
+ 0700 county="[1994-]钦州市"
+ 0701 county="[1994-]市辖区"
+ 0702 county="[1994-]钦南区"
+ 0703 county="[1994-]钦北区"
+ 0721 county="[1994-]灵山县"
+ 0722 county="[1994-]浦北县"
+ 0800 county="[1995-]贵港市"
+ 0801 county="[1995-]市辖区"
+ 0802 county="[1995-]港北区"
+ 0803 county="[1995-]港南区"
+ 0804 county="[2003-]覃塘区"
+ 0821 county="[1995-]平南县"
+ 0881 county="[1995-]桂平市"
+ 0900 county="[1997-]玉林市"
+ 0901 county="[1997-]市辖区"
+ 0902 county="[1997-]玉州区"
+ 0903 county="[2013-]福绵区"
+ 0921 county="[1997-]容县"
+ 0922 county="[1997-]陆川县"
+ 0923 county="[1997-]博白县"
+ 0924 county="[1997-]兴业县"
+ 0981 county="[1997-]北流市"
+ 1000 county="[2002-]百色市"
+ 1001 county="[2002-]市辖区"
+ 1002 county="[2002-]右江区"
+ 1003 county="[2019-]田阳区"
+ 1021 county="[2002-2019]田阳县"
+ 1022 county="[2002-]田东县"
+ 1023 county="[2002-2019]平果县"
+ 1024 county="[2002-]德保县"
+ 1025 county="[2002-2015]靖西县"
+ 1026 county="[2002-]那坡县"
+ 1027 county="[2002-]凌云县"
+ 1028 county="[2002-]乐业县"
+ 1029 county="[2002-]田林县"
+ 1030 county="[2002-]西林县"
+ 1031 county="[2002-]隆林各族自治县"
+ 1081 county="[2015-]靖西市"
+ 1082 county="[2019-]平果市"
+ 1100 county="[2002-]贺州市"
+ 1101 county="[2002-]市辖区"
+ 1102 county="[2002-]八步区"
+ 1103 county="[2016-]平桂区"
+ 1121 county="[2002-]昭平县"
+ 1122 county="[2002-]钟山县"
+ 1123 county="[2002-]富川瑶族自治县"
+ 1200 county="[2002-]河池市"
+ 1201 county="[2002-]市辖区"
+ 1202 county="[2002-]金城江区"
+ 1203 county="[2016-]宜州区"
+ 1221 county="[2002-]南丹县"
+ 1222 county="[2002-]天峨县"
+ 1223 county="[2002-]凤山县"
+ 1224 county="[2002-]东兰县"
+ 1225 county="[2002-]罗城仫佬族自治县"
+ 1226 county="[2002-]环江毛南族自治县"
+ 1227 county="[2002-]巴马瑶族自治县"
+ 1228 county="[2002-]都安瑶族自治县"
+ 1229 county="[2002-]大化瑶族自治县"
+ 1281 county="[2002-2016]宜州市"
+ 1300 county="[2002-]来宾市"
+ 1301 county="[2002-]市辖区"
+ 1302 county="[2002-]兴宾区"
+ 1321 county="[2002-]忻城县"
+ 1322 county="[2002-]象州县"
+ 1323 county="[2002-]武宣县"
+ 1324 county="[2002-]金秀瑶族自治县"
+ 1381 county="[2002-]合山市"
+ 1400 county="[2002-]崇左市"
+ 1401 county="[2002-]市辖区"
+ 1402 county="[2002-]江州区"
+ 1421 county="[2002-]扶绥县"
+ 1422 county="[2002-]宁明县"
+ 1423 county="[2002-]龙州县"
+ 1424 county="[2002-]大新县"
+ 1425 county="[2002-]天等县"
+ 1481 county="[2002-]凭祥市"
+ 2100 county="[-2002]南宁地区"
+ 2101 county="[-2002]凭祥市"
+ 2121 county="[-1983]邕宁县"
+ 2122 county="[-2002]横县"
+ 2123 county="[-2002]宾阳县"
+ 2124 county="[-2002]上林县"
+ 2125 county="[-1983]武鸣县"
+ 2126 county="[-2002]隆安县"
+ 2127 county="[-2002]马山县"
+ 2128 county="[-2002]扶绥县"
+ 2129 county="[-2002]崇左县"
+ 2130 county="[-2002]大新县"
+ 2131 county="[-2002]天等县"
+ 2132 county="[-2002]宁明县"
+ 2133 county="[-2002]龙州县"
+ 2200 county="[-2002]柳州地区"
+ 2201 county="[1981-2002]合山市"
+ 2221 county="[-1983]柳江县"
+ 2222 county="[-1983]柳城县"
+ 2223 county="[-2002]鹿寨县"
+ 2224 county="[-2002]象州县"
+ 2225 county="[-2002]武宣县"
+ 2226 county="[-2002]来宾县"
+ 2227 county="[-2002]融安县"
+ 2228 county="[-2002]三江侗族自治县"
+ 2229 county="[-2002]融水苗族自治县"
+ 2230 county="[-2002]金秀瑶族自治县"
+ 2231 county="[-2002]忻城县"
+ 2300 county="[-1998]桂林地区"
+ 2321 county="[-1983]临桂县"
+ 2322 county="[-1998]灵川县"
+ 2323 county="[-1998]全州县"
+ 2324 county="[-1998]兴安县"
+ 2325 county="[-1998]永福县"
+ 2326 county="[-1981]阳朔县"
+ 2327 county="[-1998]灌阳县"
+ 2328 county="[-1998]龙胜各族自治县"
+ 2329 county="[-1998]资源县"
+ 2330 county="[-1998]平乐县"
+ 2331 county="[-1998]荔浦县"
+ 2332 county="[-1989]恭城县,[1990-1998]恭城瑶族自治县"
+ 2400 county="[-1996]梧州地区,[1997-2001]贺州地区"
+ 2401 county="[1995-1997]岑溪市"
+ 2402 county="[1997-2002]贺州市"
+ 2421 county="[-1995]岑溪县"
+ 2422 county="[-1983]苍梧县"
+ 2423 county="[-1997]藤县"
+ 2424 county="[-2002]昭平县"
+ 2425 county="[-1997]蒙山县"
+ 2426 county="[-1997]贺县"
+ 2427 county="[-2002]钟山县"
+ 2428 county="[-1982]富川县,[1983-2002]富川瑶族自治县"
+ 2500 county="[-1997]玉林地区"
+ 2501 county="[1983-1997]玉林市"
+ 2502 county="[1988-1995]贵港市"
+ 2503 county="[1994-1997]北流市"
+ 2504 county="[1994-1995]桂平市"
+ 2521 county="[-1983]玉林县"
+ 2522 county="[-1988]贵县"
+ 2523 county="[-1994]桂平县"
+ 2524 county="[-1995]平南县"
+ 2525 county="[-1997]容县"
+ 2526 county="[-1994]北流县"
+ 2527 county="[-1997]陆川县"
+ 2528 county="[-1997]博白县"
+ 2600 county="[-2002]百色地区"
+ 2601 county="[1983-2002]百色市"
+ 2621 county="[-1983]百色县"
+ 2622 county="[-2002]田阳县"
+ 2623 county="[-2002]田东县"
+ 2624 county="[-2002]平果县"
+ 2625 county="[-2002]德保县"
+ 2626 county="[-2002]靖西县"
+ 2627 county="[-2002]那坡县"
+ 2628 county="[-2002]凌云县"
+ 2629 county="[-2002]乐业县"
+ 2630 county="[-2002]田林县"
+ 2631 county="[-2002]隆林各族自治县"
+ 2632 county="[-2002]西林县"
+ 2700 county="[-2002]河池地区"
+ 2701 county="[1983-2002]河池市"
+ 2702 county="[1993-2002]宜州市"
+ 2721 county="[-1983]河池县"
+ 2722 county="[-1993]宜山县"
+ 2723 county="[-1982]罗城县,[1983-2002]罗城仫佬族自治县"
+ 2724 county="[-1985]环江县,[1986-2002]环江毛南族自治县"
+ 2725 county="[-2002]南丹县"
+ 2726 county="[-2002]天峨县"
+ 2727 county="[-2002]凤山县"
+ 2728 county="[-2002]东兰县"
+ 2729 county="[-2002]巴马瑶族自治县"
+ 2730 county="[-2002]都安瑶族自治县"
+ 2731 county="[1987-2002]大化瑶族自治县"
+ 2800 county="[-1994]钦州地区"
+ 2801 county="[-1983]北海市"
+ 2802 county="[1983-1994]钦州市"
+ 2821 county="[-1993]上思县"
+ 2822 county="[-1993]防城各族自治县"
+ 2823 county="[-1983]钦州县"
+ 2824 county="[-1994]灵山县"
+ 2825 county="[-1987]合浦县"
+ 2826 county="[-1994]浦北县"
+46 province="海南省"
+ 0000 county="[1988-]海南省"
+ 0001 county="[1988-2000]通什市,[2001-2002]五指山市"
+ 0002 county="[1992-2002]琼海市"
+ 0003 county="[1993-2002]儋州市"
+ 0004 county="[1994-2002]琼山市"
+ 0005 county="[1995-2002]文昌市"
+ 0006 county="[1996-2002]万宁市"
+ 0007 county="[1997-2002]东方市"
+ 0021 county="[1988-1994]琼山县"
+ 0022 county="[1988-1995]文昌县"
+ 0023 county="[1988-1992]琼海县"
+ 0024 county="[1988-1996]万宁县"
+ 0025 county="[1988-2002]定安县"
+ 0026 county="[1988-2002]屯昌县"
+ 0027 county="[1988-2002]澄迈县"
+ 0028 county="[1988-2002]临高县"
+ 0029 county="[1988-1993]儋县"
+ 0030 county="[1988-2002]白沙黎族自治县"
+ 0031 county="[1988-2002]昌江黎族自治县"
+ 0032 county="[1988-1997]东方黎族自治县"
+ 0033 county="[1988-2002]乐东黎族自治县"
+ 0034 county="[1988-2002]陵水黎族自治县"
+ 0035 county="[1988-2002]保亭黎族苗族自治县"
+ 0036 county="[1988-2002]琼中黎族苗族自治县"
+ 0037 county="[1988-2002]西沙群岛"
+ 0038 county="[1988-2002]南沙群岛"
+ 0039 county="[1988-2002]中沙群岛的岛礁及其海域"
+ 0100 county="[1988-]海口市"
+ 0101 county="[1990-]市辖区"
+ 0102 county="[1990-2002]振东区"
+ 0103 county="[1990-2002]新华区"
+ 0104 county="[1990-2002]秀英区"
+ 0105 county="[2002-]秀英区"
+ 0106 county="[2002-]龙华区"
+ 0107 county="[2002-]琼山区"
+ 0108 county="[2002-]美兰区"
+ 0200 county="[1988-]三亚市"
+ 0201 county="[2014-]市辖区"
+ 0202 county="[2014-]海棠区"
+ 0203 county="[2014-]吉阳区"
+ 0204 county="[2014-]天涯区"
+ 0205 county="[2014-]崖州区"
+ 0300 county="[2012-]三沙市"
+ 0301 county="[2020-]市辖区"
+ 0302 county="[2020-]西沙区"
+ 0303 county="[2020-]南沙区"
+ 0400 county="[2015-]儋州市"
+ 9000 county="[2002-]省直辖县级行政单位"
+ 9001 county="[2002-]五指山市"
+ 9002 county="[2002-]琼海市"
+ 9003 county="[2002-2015]儋州市"
+ 9004 county="[2002-2002]琼山市"
+ 9005 county="[2002-]文昌市"
+ 9006 county="[2002-]万宁市"
+ 9007 county="[2002-]东方市"
+ 9021 county="[2002-]定安县"
+ 9022 county="[2002-]屯昌县"
+ 9023 county="[2002-]澄迈县"
+ 9024 county="[2002-]临高县"
+ 9025 county="[2002-]白沙黎族自治县"
+ 9026 county="[2002-]昌江黎族自治县"
+ 9027 county="[2002-]乐东黎族自治县"
+ 9028 county="[2002-]陵水黎族自治县"
+ 9029 county="[2002-]保亭黎族苗族自治县"
+ 9030 county="[2002-]琼中黎族苗族自治县"
+ 9031 county="[2002-2012]西沙群岛"
+ 9032 county="[2002-2012]南沙群岛"
+ 9033 county="[2002-2012]中沙群岛的岛礁及其海域"
+50 province="重庆市"
+ 0000 county="[1997-]重庆市"
+ 0100 county="[1997-]市辖区"
+ 0101 county="[1997-1997]万县区,[1998-]万州区"
+ 0102 county="[1997-]涪陵区"
+ 0103 county="[1997-]渝中区"
+ 0104 county="[1997-]大渡口区"
+ 0105 county="[1997-2025]江北区"
+ 0106 county="[1997-]沙坪坝区"
+ 0107 county="[1997-]九龙坡区"
+ 0108 county="[1997-]南岸区"
+ 0109 county="[1997-]北碚区"
+ 0110 county="[1997-2010]万盛区,[2011-]綦江区"
+ 0111 county="[1997-2010]双桥区,[2011-]大足区"
+ 0112 county="[1997-2025]渝北区"
+ 0113 county="[1997-]巴南区"
+ 0114 county="[2000-]黔江区"
+ 0115 county="[2001-]长寿区"
+ 0116 county="[2006-]江津区"
+ 0117 county="[2006-]合川区"
+ 0118 county="[2006-]永川区"
+ 0119 county="[2006-]南川区"
+ 0120 county="[2014-]璧山区"
+ 0151 county="[2014-]铜梁区"
+ 0152 county="[2015-]潼南区"
+ 0153 county="[2015-]荣昌区"
+ 0154 county="[2016-]开州区"
+ 0155 county="[2016-]梁平区"
+ 0156 county="[2016-]武隆区"
+ 0157 county="[2025-]两江新区"
+ 0200 county="[1997-]县"
+ 0221 county="[1997-2001]长寿县"
+ 0222 county="[1997-2011]綦江县"
+ 0223 county="[1997-2015]潼南县"
+ 0224 county="[1997-2014]铜梁县"
+ 0225 county="[1997-2011]大足县"
+ 0226 county="[1997-2015]荣昌县"
+ 0227 county="[1997-2014]璧山县"
+ 0228 county="[1997-2016]梁平县"
+ 0229 county="[1997-]城口县"
+ 0230 county="[1997-]丰都县"
+ 0231 county="[1997-]垫江县"
+ 0232 county="[1997-2016]武隆县"
+ 0233 county="[1997-]忠县"
+ 0234 county="[1997-2016]开县"
+ 0235 county="[1997-]云阳县"
+ 0236 county="[1997-]奉节县"
+ 0237 county="[1997-]巫山县"
+ 0238 county="[1997-]巫溪县"
+ 0239 county="[1997-2000]黔江土家族苗族自治县"
+ 0240 county="[1997-]石柱土家族自治县"
+ 0241 county="[1997-]秀山土家族苗族自治县"
+ 0242 county="[1997-]酉阳土家族苗族自治县"
+ 0243 county="[1997-]彭水苗族土家族自治县"
+ 0300 county="[1997-2006]市"
+ 0381 county="[1997-2006]江津市"
+ 0382 county="[1997-2006]合川市"
+ 0383 county="[1997-2006]永川市"
+ 0384 county="[1997-2006]南川市"
+51 province="四川省"
+ 0000 county="四川省"
+ 0100 county="成都市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-1990]东城区"
+ 0103 county="[1983-1990]西城区"
+ 0104 county="[1990-]锦江区"
+ 0105 county="[1990-]青羊区"
+ 0106 county="[1990-]金牛区"
+ 0107 county="[1990-]武侯区"
+ 0108 county="[1990-]成华区"
+ 0111 county="[1983-1990]金牛区"
+ 0112 county="[1983-]龙泉驿区"
+ 0113 county="[1983-]青白江区"
+ 0114 county="[2001-]新都区"
+ 0115 county="[2002-]温江区"
+ 0116 county="[2015-]双流区"
+ 0117 county="[2016-]郫都区"
+ 0118 county="[2020-]新津区"
+ 0120 county="[-1983]市区"
+ 0121 county="金堂县"
+ 0122 county="[-2015]双流县"
+ 0123 county="[1983-2002]温江县"
+ 0124 county="[1983-2016]郫县"
+ 0125 county="[1983-2001]新都县"
+ 0126 county="[1983-1993]彭县"
+ 0127 county="[1983-1988]灌县"
+ 0128 county="[1983-1994]崇庆县"
+ 0129 county="[1983-]大邑县"
+ 0130 county="[1983-1994]邛崃县"
+ 0131 county="[1983-]蒲江县"
+ 0132 county="[1983-2020]新津县"
+ 0181 county="[1989-]都江堰市"
+ 0182 county="[1993-]彭州市"
+ 0183 county="[1994-]邛崃市"
+ 0184 county="[1994-]崇州市"
+ 0185 county="[2016-]简阳市"
+ 0200 county="[-1997]重庆市"
+ 0201 county="[1983-1997]市辖区"
+ 0202 county="[1983-1993]市中区,[1994-1997]渝中区"
+ 0203 county="[1983-1997]大渡口区"
+ 0211 county="[1983-1997]江北区"
+ 0212 county="[1983-1997]沙坪坝区"
+ 0213 county="[1983-1997]九龙坡区"
+ 0214 county="[1983-1997]南岸区"
+ 0215 county="[1983-1997]北碚区"
+ 0216 county="[1983-1997]万盛区"
+ 0217 county="[1983-1997]双桥区"
+ 0218 county="[1994-1997]渝北区"
+ 0219 county="[1994-1997]巴南区"
+ 0220 county="[-1983]市区"
+ 0221 county="[-1997]长寿县"
+ 0222 county="[-1994]巴县"
+ 0223 county="[-1997]綦江县"
+ 0224 county="[-1994]江北县"
+ 0225 county="[1983-1992]江津县"
+ 0226 county="[1983-1992]合川县"
+ 0227 county="[1983-1997]潼南县"
+ 0228 county="[1983-1997]铜梁县"
+ 0229 county="[1983-1992]永川县"
+ 0230 county="[1983-1997]大足县"
+ 0231 county="[1983-1997]荣昌县"
+ 0232 county="[1983-1997]璧山县"
+ 0281 county="[1992-1997]永川市"
+ 0282 county="[1992-1997]江津市"
+ 0283 county="[1992-1997]合川市"
+ 0300 county="自贡市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]自流井区"
+ 0303 county="[1983-]贡井区"
+ 0304 county="[1983-]大安区"
+ 0311 county="[1983-1982]郊区,[1983-]沿滩区"
+ 0320 county="[-1983]市区"
+ 0321 county="荣县"
+ 0322 county="[1983-]富顺县"
+ 0400 county="[-1986]渡口市,[1987-]攀枝花市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]东区"
+ 0403 county="[1983-]西区"
+ 0411 county="[1983-]仁和区"
+ 0420 county="[-1983]市区"
+ 0421 county="米易县"
+ 0422 county="盐边县"
+ 0500 county="[1983-]泸州市"
+ 0501 county="[1983-]市辖区"
+ 0502 county="[1983-1994]市中区,[1995-]江阳区"
+ 0503 county="[1995-]纳溪区"
+ 0504 county="[1995-]龙马潭区"
+ 0521 county="[1983-]泸县"
+ 0522 county="[1983-]合江县"
+ 0523 county="[1983-1995]纳溪县"
+ 0524 county="[1985-]叙永县"
+ 0525 county="[1985-]古蔺县"
+ 0600 county="[1983-]德阳市"
+ 0601 county="[1984-]市辖区"
+ 0602 county="[1984-1996]市中区"
+ 0603 county="[1996-]旌阳区"
+ 0604 county="[2017-]罗江区"
+ 0621 county="[1983-1984]德阳县"
+ 0622 county="[1983-1996]绵竹县"
+ 0623 county="[1983-]中江县"
+ 0624 county="[1983-1988]广汉县"
+ 0625 county="[1983-1995]什邡县"
+ 0626 county="[1996-2017]罗江县"
+ 0681 county="[1989-]广汉市"
+ 0682 county="[1995-]什邡市"
+ 0683 county="[1996-]绵竹市"
+ 0700 county="[1985-]绵阳市"
+ 0701 county="[1985-]市辖区"
+ 0702 county="[1985-1992]市中区"
+ 0703 county="[1992-]涪城区"
+ 0704 county="[1992-]游仙区"
+ 0705 county="[2016-]安州区"
+ 0721 county="[1985-1988]江油县"
+ 0722 county="[1985-]三台县"
+ 0723 county="[1985-]盐亭县"
+ 0724 county="[1985-2016]安县"
+ 0725 county="[1985-]梓潼县"
+ 0726 county="[1985-2002]北川县,[2003-]北川羌族自治县"
+ 0727 county="[1985-]平武县"
+ 0781 county="[1989-]江油市"
+ 0800 county="[1985-]广元市"
+ 0801 county="[1985-]市辖区"
+ 0802 county="[1985-2006]市中区,[2007-]利州区"
+ 0811 county="[1989-2012]元坝区,[2013-]昭化区"
+ 0812 county="[1989-]朝天区"
+ 0821 county="[1985-]旺苍县"
+ 0822 county="[1985-]青川县"
+ 0823 county="[1985-]剑阁县"
+ 0824 county="[1985-]苍溪县"
+ 0900 county="[1985-]遂宁市"
+ 0901 county="[1985-]市辖区"
+ 0902 county="[1985-2003]市中区"
+ 0903 county="[2003-]船山区"
+ 0904 county="[2003-]安居区"
+ 0921 county="[1985-]蓬溪县"
+ 0922 county="[1985-2019]射洪县"
+ 0923 county="[1997-]大英县"
+ 0981 county="[2019-]射洪市"
+ 1000 county="[1985-]内江市"
+ 1001 county="[1985-]市辖区"
+ 1002 county="[1985-]市中区"
+ 1011 county="[1989-]东兴区"
+ 1021 county="[1985-1989]内江县"
+ 1022 county="[1985-1998]乐至县"
+ 1023 county="[1985-1998]安岳县"
+ 1024 county="[1985-]威远县"
+ 1025 county="[1985-]资中县"
+ 1026 county="[1985-1993]资阳县"
+ 1027 county="[1985-1994]简阳县"
+ 1028 county="[1985-2017]隆昌县"
+ 1081 county="[1993-1998]资阳市"
+ 1082 county="[1994-1998]简阳市"
+ 1083 county="[2017-]隆昌市"
+ 1100 county="[1985-]乐山市"
+ 1101 county="[1985-]市辖区"
+ 1102 county="[1985-]市中区"
+ 1111 county="[1985-]沙湾区"
+ 1112 county="[1985-]五通桥区"
+ 1113 county="[1985-]金口河区"
+ 1121 county="[1985-1997]仁寿县"
+ 1122 county="[1985-1997]眉山县"
+ 1123 county="[1985-]犍为县"
+ 1124 county="[1985-]井研县"
+ 1125 county="[1985-1988]峨眉县"
+ 1126 county="[1985-]夹江县"
+ 1127 county="[1985-1997]洪雅县"
+ 1128 county="[1985-1997]彭山县"
+ 1129 county="[1985-]沐川县"
+ 1130 county="[1985-1997]青神县"
+ 1131 county="[1985-1997]丹棱县"
+ 1132 county="[1985-]峨边彝族自治县"
+ 1133 county="[1985-]马边彝族自治县"
+ 1181 county="[1989-]峨眉山市"
+ 1200 county="[1992-1997]万县市"
+ 1201 county="[1992-1997]市辖区"
+ 1202 county="[1992-1997]龙宝区"
+ 1203 county="[1992-1997]天城区"
+ 1204 county="[1992-1997]五桥区"
+ 1221 county="[1992-1997]开县"
+ 1222 county="[1992-1997]忠县"
+ 1223 county="[1992-1997]梁平县"
+ 1224 county="[1992-1997]云阳县"
+ 1225 county="[1992-1997]奉节县"
+ 1226 county="[1992-1997]巫山县"
+ 1227 county="[1992-1997]巫溪县"
+ 1228 county="[1992-1997]城口县"
+ 1300 county="[1993-]南充市"
+ 1301 county="[1993-]市辖区"
+ 1302 county="[1993-]顺庆区"
+ 1303 county="[1993-]高坪区"
+ 1304 county="[1993-]嘉陵区"
+ 1321 county="[1993-]南部县"
+ 1322 county="[1993-]营山县"
+ 1323 county="[1993-]蓬安县"
+ 1324 county="[1993-]仪陇县"
+ 1325 county="[1993-]西充县"
+ 1381 county="[1993-]阆中市"
+ 1400 county="[1995-1997]涪陵市,[2000-]眉山市"
+ 1401 county="[1995-1997]市辖区,[2000-]市辖区"
+ 1402 county="[1995-1997]枳城区,[2000-]东坡区"
+ 1403 county="[1995-1997]李渡区,[2014-]彭山区"
+ 1421 county="[1995-1997]垫江县,[2000-]仁寿县"
+ 1422 county="[1995-1997]丰都县,[2000-2014]彭山县"
+ 1423 county="[1995-1997]武隆县,[2000-]洪雅县"
+ 1424 county="[2000-]丹棱县"
+ 1425 county="[2000-]青神县"
+ 1481 county="[1995-1997]南川市"
+ 1500 county="[1996-]宜宾市"
+ 1501 county="[1996-]市辖区"
+ 1502 county="[1996-]翠屏区"
+ 1503 county="[2011-]南溪区"
+ 1504 county="[2018-]叙州区"
+ 1521 county="[1996-2018]宜宾县"
+ 1522 county="[1996-2011]南溪县"
+ 1523 county="[1996-]江安县"
+ 1524 county="[1996-]长宁县"
+ 1525 county="[1996-]高县"
+ 1526 county="[1996-]珙县"
+ 1527 county="[1996-]筠连县"
+ 1528 county="[1996-]兴文县"
+ 1529 county="[1996-]屏山县"
+ 1600 county="[1998-]广安市"
+ 1601 county="[1998-]市辖区"
+ 1602 county="[1998-]广安区"
+ 1603 county="[2013-]前锋区"
+ 1621 county="[1998-]岳池县"
+ 1622 county="[1998-]武胜县"
+ 1623 county="[1998-]邻水县"
+ 1681 county="[1998-]华蓥市"
+ 1700 county="[1999-]达州市"
+ 1701 county="[1999-]市辖区"
+ 1702 county="[1999-]通川区"
+ 1703 county="[2013-]达川区"
+ 1721 county="[1999-2013]达县"
+ 1722 county="[1999-]宣汉县"
+ 1723 county="[1999-]开江县"
+ 1724 county="[1999-]大竹县"
+ 1725 county="[1999-]渠县"
+ 1781 county="[1999-]万源市"
+ 1800 county="[2000-]雅安市"
+ 1801 county="[2000-]市辖区"
+ 1802 county="[2000-]雨城区"
+ 1803 county="[2012-]名山区"
+ 1821 county="[2000-2012]名山县"
+ 1822 county="[2000-]荥经县"
+ 1823 county="[2000-]汉源县"
+ 1824 county="[2000-]石棉县"
+ 1825 county="[2000-]天全县"
+ 1826 county="[2000-]芦山县"
+ 1827 county="[2000-]宝兴县"
+ 1900 county="[2000-]巴中市"
+ 1901 county="[2000-]市辖区"
+ 1902 county="[2000-]巴州区"
+ 1903 county="[2013-]恩阳区"
+ 1921 county="[2000-]通江县"
+ 1922 county="[2000-]南江县"
+ 1923 county="[2000-]平昌县"
+ 2000 county="[2000-]资阳市"
+ 2001 county="[2000-]市辖区"
+ 2002 county="[2000-]雁江区"
+ 2021 county="[2000-]安岳县"
+ 2022 county="[2000-]乐至县"
+ 2081 county="[2000-2016]简阳市"
+ 2100 county="[-1980]江津地区,[1981-1982]永川地区"
+ 2121 county="[-1983]江津县"
+ 2122 county="[-1983]合川县"
+ 2123 county="[-1983]潼南县"
+ 2124 county="[-1983]铜梁县"
+ 2125 county="[-1983]永川县"
+ 2126 county="[-1983]大足县"
+ 2127 county="[-1983]荣昌县"
+ 2128 county="[-1983]璧山县"
+ 2200 county="[-1992]万县地区"
+ 2201 county="[-1992]万县市"
+ 2221 county="[-1992]万县"
+ 2222 county="[-1992]开县"
+ 2223 county="[-1992]忠县"
+ 2224 county="[-1992]梁平县"
+ 2225 county="[-1992]云阳县"
+ 2226 county="[-1992]奉节县"
+ 2227 county="[-1992]巫山县"
+ 2228 county="[-1992]巫溪县"
+ 2229 county="[-1992]城口县"
+ 2300 county="[-1995]涪陵地区"
+ 2301 county="[1983-1995]涪陵市"
+ 2302 county="[1994-1995]南川市"
+ 2321 county="[-1983]涪陵县"
+ 2322 county="[-1995]垫江县"
+ 2323 county="[-1994]南川县"
+ 2324 county="[-1995]丰都县"
+ 2325 county="[1983-1982]石柱县,[1983-1996]石柱土家族自治县"
+ 2326 county="[-1995]武隆县"
+ 2327 county="[1983-1982]彭水县,[1983-1996]彭水苗族土家族自治县"
+ 2328 county="[1983-1982]黔江县,[1983-1996]黔江土家族苗族自治县"
+ 2329 county="[1983-1982]酉阳县,[1983-1996]酉阳土家族苗族自治县"
+ 2330 county="[1983-1982]秀山县,[1983-1996]秀山土家族苗族自治县"
+ 2400 county="[-1985]内江地区"
+ 2401 county="[-1985]内江市"
+ 2402 county="[-1985]泸州市"
+ 2421 county="[-1985]内江县"
+ 2422 county="[-1985]资中县"
+ 2423 county="[-1985]资阳县"
+ 2424 county="[-1985]简阳县"
+ 2425 county="[-1985]威远县"
+ 2426 county="[-1985]隆昌县"
+ 2427 county="[-1985]安岳县"
+ 2428 county="[-1985]乐至县"
+ 2500 county="[-1996]宜宾地区"
+ 2501 county="[-1996]宜宾市"
+ 2502 county="[-1983]泸州市"
+ 2521 county="[-1983]泸县"
+ 2522 county="[-1983]富顺县"
+ 2523 county="[-1983]合江县"
+ 2524 county="[-1983]纳溪县"
+ 2525 county="[-1985]叙永县"
+ 2526 county="[-1985]古蔺县"
+ 2527 county="[-1996]宜宾县"
+ 2528 county="[-1996]南溪县"
+ 2529 county="[-1996]江安县"
+ 2530 county="[-1996]长宁县"
+ 2531 county="[-1996]高县"
+ 2532 county="[-1996]筠连县"
+ 2533 county="[-1996]珙县"
+ 2534 county="[-1996]兴文县"
+ 2535 county="[-1996]屏山县"
+ 2600 county="[-1985]乐山地区"
+ 2601 county="[-1985]乐山市"
+ 2621 county="[-1985]仁寿县"
+ 2622 county="[-1985]眉山县"
+ 2623 county="[-1985]犍为县"
+ 2624 county="[-1985]井研县"
+ 2625 county="[-1985]峨眉县"
+ 2626 county="[-1985]夹江县"
+ 2627 county="[-1985]洪雅县"
+ 2628 county="[-1985]彭山县"
+ 2629 county="[-1985]沐川县"
+ 2630 county="[-1985]青神县"
+ 2631 county="[-1985]丹稜县"
+ 2632 county="[-1983]峨边县,[1984-1985]峨边彝族自治县"
+ 2633 county="[-1983]马边县,[1984-1985]马边彝族自治县"
+ 2634 county="[-1985]金口河工农区"
+ 2700 county="[-1983]温江地区"
+ 2721 county="[-1983]温江县"
+ 2722 county="[-1983]郫县"
+ 2723 county="[-1983]新都县"
+ 2724 county="[-1983]广汉县"
+ 2725 county="[-1983]什邡县"
+ 2726 county="[-1983]彭县"
+ 2727 county="[-1983]灌县"
+ 2728 county="[-1983]崇庆县"
+ 2729 county="[-1983]大邑县"
+ 2730 county="[-1983]邛崃县"
+ 2731 county="[-1983]蒲江县"
+ 2732 county="[-1983]新津县"
+ 2800 county="[-1985]绵阳地区"
+ 2801 county="[-1985]绵阳市"
+ 2821 county="[-1983]德阳县"
+ 2822 county="[-1983]绵竹县"
+ 2823 county="[-1985]安县"
+ 2824 county="[-1985]江油县"
+ 2825 county="[-1985]梓潼县"
+ 2826 county="[-1985]剑阁县"
+ 2827 county="[-1985]广元县"
+ 2828 county="[-1985]旺苍县"
+ 2829 county="[-1985]青川县"
+ 2830 county="[-1985]平武县"
+ 2831 county="[-1985]北川县"
+ 2832 county="[-1985]遂宁县"
+ 2833 county="[-1985]三台县"
+ 2834 county="[-1983]中江县"
+ 2835 county="[-1985]蓬溪县"
+ 2836 county="[-1985]射洪县"
+ 2837 county="[-1985]盐亭县"
+ 2900 county="[-1993]南充地区"
+ 2901 county="[-1993]南充市"
+ 2902 county="[1985-1993]华蓥市"
+ 2903 county="[1991-1993]阆中市"
+ 2921 county="[-1993]南充县"
+ 2922 county="[-1993]南部县"
+ 2923 county="[-1993]岳池县"
+ 2924 county="[-1993]营山县"
+ 2925 county="[-1993]广安县"
+ 2926 county="[-1993]蓬安县"
+ 2927 county="[-1993]仪陇县"
+ 2928 county="[-1993]武胜县"
+ 2929 county="[-1993]西充县"
+ 2930 county="[-1991]阆中县"
+ 2931 county="[-1985]苍溪县"
+ 2932 county="[-1985]华云工农区"
+ 3000 county="[-1992]达县地区,[1993-1998]达川地区"
+ 3001 county="[-1992]达县市,[1993-1998]达川市"
+ 3002 county="[1993-1999]万源市"
+ 3021 county="[-1999]达县"
+ 3022 county="[-1999]宣汉县"
+ 3023 county="[-1999]开江县"
+ 3024 county="[-1993]万源县"
+ 3025 county="[-1993]通江县"
+ 3026 county="[-1993]南江县"
+ 3027 county="[-1993]巴中县"
+ 3028 county="[-1993]平昌县"
+ 3029 county="[-1999]大竹县"
+ 3030 county="[-1999]渠县"
+ 3031 county="[-1999]邻水县"
+ 3032 county="[-1993]白沙工农区"
+ 3100 county="[-2000]雅安地区"
+ 3101 county="[1983-2000]雅安市"
+ 3121 county="[-1983]雅安县"
+ 3122 county="[-2000]名山县"
+ 3123 county="[-2000]荥经县"
+ 3124 county="[-2000]汉源县"
+ 3125 county="[-2000]石棉县"
+ 3126 county="[-2000]天全县"
+ 3127 county="[-2000]芦山县"
+ 3128 county="[-2000]宝兴县"
+ 3200 county="[-1986]阿坝藏族自治州,[1987-]阿坝藏族羌族自治州"
+ 3201 county="[2015-]马尔康市"
+ 3221 county="汶川县"
+ 3222 county="理县"
+ 3223 county="[-1986]茂汶羌族自治县,[1987-]茂县"
+ 3224 county="松潘县"
+ 3225 county="[-1996]南坪县,[1997-]九寨沟县"
+ 3226 county="金川县"
+ 3227 county="小金县"
+ 3228 county="黑水县"
+ 3229 county="[-2015]马尔康县"
+ 3230 county="壤塘县"
+ 3231 county="阿坝县"
+ 3232 county="若尔盖县"
+ 3233 county="红原县"
+ 3300 county="甘孜藏族自治州"
+ 3301 county="[2015-]康定市"
+ 3321 county="[-2015]康定县"
+ 3322 county="泸定县"
+ 3323 county="丹巴县"
+ 3324 county="九龙县"
+ 3325 county="雅江县"
+ 3326 county="道孚县"
+ 3327 county="炉霍县"
+ 3328 county="甘孜县"
+ 3329 county="新龙县"
+ 3330 county="德格县"
+ 3331 county="白玉县"
+ 3332 county="石渠县"
+ 3333 county="色达县"
+ 3334 county="理塘县"
+ 3335 county="巴塘县"
+ 3336 county="乡城县"
+ 3337 county="稻城县"
+ 3338 county="得荣县"
+ 3400 county="凉山彝族自治州"
+ 3401 county="西昌市"
+ 3402 county="[2021-]会理市"
+ 3421 county="[-1986]西昌县"
+ 3422 county="木里藏族自治县"
+ 3423 county="盐源县"
+ 3424 county="德昌县"
+ 3425 county="[-2021]会理县"
+ 3426 county="会东县"
+ 3427 county="宁南县"
+ 3428 county="普格县"
+ 3429 county="布拖县"
+ 3430 county="金阳县"
+ 3431 county="昭觉县"
+ 3432 county="喜德县"
+ 3433 county="冕宁县"
+ 3434 county="越西县"
+ 3435 county="甘洛县"
+ 3436 county="美姑县"
+ 3437 county="雷波县"
+ 3500 county="[1988-1997]黔江地区"
+ 3521 county="[1988-1997]石柱土家族自治县"
+ 3522 county="[1988-1997]秀山土家族苗族自治县"
+ 3523 county="[1988-1997]黔江土家族苗族自治县"
+ 3524 county="[1988-1997]酉阳土家族苗族自治县"
+ 3525 county="[1988-1997]彭水苗族土家族自治县"
+ 3600 county="[1993-1998]广安地区"
+ 3601 county="[1993-1998]华蓥市"
+ 3621 county="[1993-1998]广安县"
+ 3622 county="[1993-1998]岳池县"
+ 3623 county="[1993-1998]武胜县"
+ 3624 county="[1993-1998]邻水县"
+ 3700 county="[1993-2000]巴中地区"
+ 3701 county="[1993-2000]巴中市"
+ 3721 county="[1993-2000]通江县"
+ 3722 county="[1993-2000]南江县"
+ 3723 county="[1993-2000]平昌县"
+ 3800 county="[1997-2000]眉山地区"
+ 3821 county="[1997-2000]眉山县"
+ 3822 county="[1997-2000]仁寿县"
+ 3823 county="[1997-2000]彭山县"
+ 3824 county="[1997-2000]洪雅县"
+ 3825 county="[1997-2000]丹棱县"
+ 3826 county="[1997-2000]青神县"
+ 3900 county="[1998-2000]资阳地区"
+ 3901 county="[1998-2000]资阳市"
+ 3902 county="[1998-2000]简阳市"
+ 3921 county="[1998-2000]安岳县"
+ 3922 county="[1998-2000]乐至县"
+ 9000 county="[1988-1989]省直辖县级行政单位"
+ 9001 county="[1988-1989]广汉市"
+ 9002 county="[1988-1989]江油市"
+ 9003 county="[1988-1989]都江堰市"
+ 9004 county="[1988-1989]峨眉山市"
+52 province="贵州省"
+ 0000 county="贵州省"
+ 0100 county="贵阳市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]南明区"
+ 0103 county="[1983-]云岩区"
+ 0111 county="[1983-]花溪区"
+ 0112 county="[1983-]乌当区"
+ 0113 county="[1983-]白云区"
+ 0114 county="[2000-2012]小河区"
+ 0115 county="[2012-]观山湖区"
+ 0121 county="[1995-]开阳县"
+ 0122 county="[1995-]息烽县"
+ 0123 county="[1995-]修文县"
+ 0181 county="[1995-]清镇市"
+ 0200 county="六盘水市"
+ 0201 county="[-1986]水城特区,[1987-]钟山区"
+ 0202 county="[-1999]盘县特区"
+ 0203 county="六枝特区"
+ 0204 county="[2020-]水城区"
+ 0221 county="[1987-2020]水城县"
+ 0222 county="[1999-2017]盘县"
+ 0281 county="[2017-]盘州市"
+ 0300 county="[1997-]遵义市"
+ 0301 county="[1997-]市辖区"
+ 0302 county="[1997-]红花岗区"
+ 0303 county="[2003-]汇川区"
+ 0304 county="[2016-]播州区"
+ 0321 county="[1997-2016]遵义县"
+ 0322 county="[1997-]桐梓县"
+ 0323 county="[1997-]绥阳县"
+ 0324 county="[1997-]正安县"
+ 0325 county="[1997-]道真仡佬族苗族自治县"
+ 0326 county="[1997-]务川仡佬族苗族自治县"
+ 0327 county="[1997-]凤冈县"
+ 0328 county="[1997-]湄潭县"
+ 0329 county="[1997-]余庆县"
+ 0330 county="[1997-]习水县"
+ 0381 county="[1997-]赤水市"
+ 0382 county="[1997-]仁怀市"
+ 0400 county="[2000-]安顺市"
+ 0401 county="[2000-]市辖区"
+ 0402 county="[2000-]西秀区"
+ 0403 county="[2014-]平坝区"
+ 0421 county="[2000-2014]平坝县"
+ 0422 county="[2000-]普定县"
+ 0423 county="[2000-]镇宁布依族苗族自治县"
+ 0424 county="[2000-]关岭布依族苗族自治县"
+ 0425 county="[2000-]紫云苗族布依族自治县"
+ 0500 county="[2011-]毕节市"
+ 0501 county="[2011-]市辖区"
+ 0502 county="[2011-]七星关区"
+ 0521 county="[2011-]大方县"
+ 0522 county="[2011-2021]黔西县"
+ 0523 county="[2011-]金沙县"
+ 0524 county="[2011-]织金县"
+ 0525 county="[2011-]纳雍县"
+ 0526 county="[2011-]威宁彝族回族苗族自治县"
+ 0527 county="[2011-]赫章县"
+ 0581 county="[2021-]黔西市"
+ 0600 county="[2011-]铜仁市"
+ 0601 county="[2011-]市辖区"
+ 0602 county="[2011-]碧江区"
+ 0603 county="[2011-]万山区"
+ 0621 county="[2011-]江口县"
+ 0622 county="[2011-]玉屏侗族自治县"
+ 0623 county="[2011-]石阡县"
+ 0624 county="[2011-]思南县"
+ 0625 county="[2011-]印江土家族苗族自治县"
+ 0626 county="[2011-]德江县"
+ 0627 county="[2011-]沿河土家族自治县"
+ 0628 county="[2011-]松桃苗族自治县"
+ 2100 county="[-1997]遵义地区"
+ 2101 county="[-1997]遵义市"
+ 2102 county="[1990-1997]赤水市"
+ 2103 county="[1995-1997]仁怀市"
+ 2121 county="[-1997]遵义县"
+ 2122 county="[-1997]桐梓县"
+ 2123 county="[-1997]绥阳县"
+ 2124 county="[-1997]正安县"
+ 2125 county="[-1985]道真县,[1986-1997]道真仡佬族苗族自治县"
+ 2126 county="[-1985]务川县,[1986-1997]务川仡佬族苗族自治县"
+ 2127 county="[-1997]凤冈县"
+ 2128 county="[-1997]湄潭县"
+ 2129 county="[-1997]余庆县"
+ 2130 county="[-1995]仁怀县"
+ 2131 county="[-1990]赤水县"
+ 2132 county="[-1997]习水县"
+ 2200 county="[-2011]铜仁地区"
+ 2201 county="[1987-2011]铜仁市"
+ 2221 county="[-1987]铜仁县"
+ 2222 county="[-2011]江口县"
+ 2223 county="[-1982]玉屏县,[1983-2011]玉屏侗族自治县"
+ 2224 county="[-2011]石阡县"
+ 2225 county="[-2011]思南县"
+ 2226 county="[-1985]印江县,[1986-2011]印江土家族苗族自治县"
+ 2227 county="[-2011]德江县"
+ 2228 county="[-1985]沿河县,[1986-2011]沿河土家族自治县"
+ 2229 county="[-2011]松桃苗族自治县"
+ 2230 county="[-2011]万山特区"
+ 2300 county="[-1980]兴义地区,[1981-]黔西南布依族苗族自治州"
+ 2301 county="[1987-]兴义市"
+ 2302 county="[2018-]兴仁市"
+ 2321 county="[-1987]兴义县"
+ 2322 county="[-2018]兴仁县"
+ 2323 county="普安县"
+ 2324 county="晴隆县"
+ 2325 county="[-1980]贞丰布依族苗族自治县,[1981-]贞丰县"
+ 2326 county="[-1980]望谟布依族苗族自治县,[1981-]望谟县"
+ 2327 county="[-1980]册亨布依族自治县,[1981-]册亨县"
+ 2328 county="[-1980]安龙布依族苗族自治县,[1981-]安龙县"
+ 2400 county="[-2011]毕节地区"
+ 2401 county="[1993-2011]毕节市"
+ 2421 county="[-1993]毕节县"
+ 2422 county="[-2011]大方县"
+ 2423 county="[-2011]黔西县"
+ 2424 county="[-2011]金沙县"
+ 2425 county="[-2011]织金县"
+ 2426 county="[-2011]纳雍县"
+ 2427 county="[-2011]威宁彝族回族苗族自治县"
+ 2428 county="[-2011]赫章县"
+ 2500 county="[-2000]安顺地区"
+ 2501 county="[-2000]安顺市"
+ 2502 county="[1992-1995]清镇市"
+ 2521 county="[-1990]安顺县"
+ 2522 county="[-1995]开阳县"
+ 2523 county="[-1995]息烽县"
+ 2524 county="[-1995]修文县"
+ 2525 county="[-1992]清镇县"
+ 2526 county="[-2000]平坝县"
+ 2527 county="[-2000]普定县"
+ 2528 county="[-1980]关岭县,[1981-2000]关岭布依族苗族自治县"
+ 2529 county="[-2000]镇宁布依族苗族自治县"
+ 2530 county="[-2000]紫云苗族布依族自治县"
+ 2600 county="黔东南苗族侗族自治州"
+ 2601 county="[1983-]凯里市"
+ 2621 county="[-1983]凯里县"
+ 2622 county="黄平县"
+ 2623 county="施秉县"
+ 2624 county="三穗县"
+ 2625 county="镇远县"
+ 2626 county="岑巩县"
+ 2627 county="天柱县"
+ 2628 county="锦屏县"
+ 2629 county="剑河县"
+ 2630 county="台江县"
+ 2631 county="黎平县"
+ 2632 county="榕江县"
+ 2633 county="从江县"
+ 2634 county="雷山县"
+ 2635 county="麻江县"
+ 2636 county="丹寨县"
+ 2700 county="黔南布依族苗族自治州"
+ 2701 county="都匀市"
+ 2702 county="[1996-]福泉市"
+ 2721 county="[-1983]都匀县"
+ 2722 county="荔波县"
+ 2723 county="贵定县"
+ 2724 county="[-1996]福泉县"
+ 2725 county="瓮安县"
+ 2726 county="独山县"
+ 2727 county="平塘县"
+ 2728 county="罗甸县"
+ 2729 county="长顺县"
+ 2730 county="龙里县"
+ 2731 county="惠水县"
+ 2732 county="三都水族自治县"
+53 province="云南省"
+ 0000 county="云南省"
+ 0100 county="昆明市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]五华区"
+ 0103 county="[1983-]盘龙区"
+ 0111 county="[1983-]官渡区"
+ 0112 county="[1983-]西山区"
+ 0113 county="[1998-]东川区"
+ 0114 county="[2011-]呈贡区"
+ 0115 county="[2016-]晋宁区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-2011]呈贡县"
+ 0122 county="[-2016]晋宁县"
+ 0123 county="[-1995]安宁县"
+ 0124 county="富民县"
+ 0125 county="[1983-]宜良县"
+ 0126 county="[1983-1997]路南彝族自治县,[1998-]石林彝族自治县"
+ 0127 county="[1983-]嵩明县"
+ 0128 county="[1983-1984]禄劝县,[1985-]禄劝彝族苗族自治县"
+ 0129 county="[1998-]寻甸回族彝族自治县"
+ 0181 county="[1995-]安宁市"
+ 0200 county="[-1998]东川市"
+ 0300 county="[1997-]曲靖市"
+ 0301 county="[1997-]市辖区"
+ 0302 county="[1997-]麒麟区"
+ 0303 county="[2016-]沾益区"
+ 0304 county="[2018-]马龙区"
+ 0321 county="[1997-2018]马龙县"
+ 0322 county="[1997-]陆良县"
+ 0323 county="[1997-]师宗县"
+ 0324 county="[1997-]罗平县"
+ 0325 county="[1997-]富源县"
+ 0326 county="[1997-]会泽县"
+ 0327 county="[1997-1998]寻甸县"
+ 0328 county="[1997-2016]沾益县"
+ 0381 county="[1997-]宣威市"
+ 0400 county="[1997-]玉溪市"
+ 0401 county="[1997-]市辖区"
+ 0402 county="[1997-]红塔区"
+ 0403 county="[2015-]江川区"
+ 0421 county="[1997-2015]江川县"
+ 0422 county="[1997-2019]澄江县"
+ 0423 county="[1997-]通海县"
+ 0424 county="[1997-]华宁县"
+ 0425 county="[1997-]易门县"
+ 0426 county="[1997-]峨山彝族自治县"
+ 0427 county="[1997-]新平彝族傣族自治县"
+ 0428 county="[1997-]元江哈尼族彝族傣族自治县"
+ 0481 county="[2019-]澄江市"
+ 0500 county="[2000-]保山市"
+ 0501 county="[2000-]市辖区"
+ 0502 county="[2000-]隆阳区"
+ 0521 county="[2000-]施甸县"
+ 0522 county="[2000-2015]腾冲县"
+ 0523 county="[2000-]龙陵县"
+ 0524 county="[2000-]昌宁县"
+ 0581 county="[2015-]腾冲市"
+ 0600 county="[2001-]昭通市"
+ 0601 county="[2001-]市辖区"
+ 0602 county="[2001-]昭阳区"
+ 0621 county="[2001-]鲁甸县"
+ 0622 county="[2001-]巧家县"
+ 0623 county="[2001-]盐津县"
+ 0624 county="[2001-]大关县"
+ 0625 county="[2001-]永善县"
+ 0626 county="[2001-]绥江县"
+ 0627 county="[2001-]镇雄县"
+ 0628 county="[2001-]彝良县"
+ 0629 county="[2001-]威信县"
+ 0630 county="[2001-2018]水富县"
+ 0681 county="[2018-]水富市"
+ 0700 county="[2002-]丽江市"
+ 0701 county="[2002-]市辖区"
+ 0702 county="[2002-]古城区"
+ 0721 county="[2002-]玉龙纳西族自治县"
+ 0722 county="[2002-]永胜县"
+ 0723 county="[2002-]华坪县"
+ 0724 county="[2002-]宁蒗彝族自治县"
+ 0800 county="[2003-2006]思茅市,[2007-]普洱市"
+ 0801 county="[2003-]市辖区"
+ 0802 county="[2003-2006]翠云区,[2007-]思茅区"
+ 0821 county="[1985-2006]普洱哈尼族彝族自治县,[2007-]宁洱哈尼族彝族自治县"
+ 0822 county="[2003-]墨江哈尼族自治县"
+ 0823 county="[2003-]景东彝族自治县"
+ 0824 county="[2003-]景谷傣族彝族自治县"
+ 0825 county="[2003-]镇沅彝族哈尼族拉祜族自治县"
+ 0826 county="[2003-]江城哈尼族彝族自治县"
+ 0827 county="[2003-]孟连傣族拉祜族佤族自治县"
+ 0828 county="[2003-]澜沧拉祜族自治县"
+ 0829 county="[2003-]西盟佤族自治县"
+ 0900 county="[2003-]临沧市"
+ 0901 county="[2003-]市辖区"
+ 0902 county="[2003-]临翔区"
+ 0921 county="[2003-]凤庆县"
+ 0922 county="[2003-]云县"
+ 0923 county="[2003-]永德县"
+ 0924 county="[2003-]镇康县"
+ 0925 county="[2003-]双江拉祜族佤族布朗族傣族自治县"
+ 0926 county="[2003-]耿马傣族佤族自治县"
+ 0927 county="[2003-]沧源佤族自治县"
+ 2100 county="[-2001]昭通地区"
+ 2101 county="[-2001]昭通市"
+ 2121 county="[-1983]昭通县"
+ 2122 county="[-2001]鲁甸县"
+ 2123 county="[-2001]巧家县"
+ 2124 county="[-2001]盐津县"
+ 2125 county="[-2001]大关县"
+ 2126 county="[-2001]永善县"
+ 2127 county="[-2001]绥江县"
+ 2128 county="[-2001]镇雄县"
+ 2129 county="[-2001]彝良县"
+ 2130 county="[-2001]威信县"
+ 2131 county="[-2001]水富县"
+ 2200 county="[-1997]曲靖地区"
+ 2201 county="[1983-1997]曲靖市"
+ 2202 county="[1994-1997]宣威市"
+ 2221 county="[-1983]曲靖县"
+ 2222 county="[-1983]沾益县"
+ 2223 county="[-1997]马龙县"
+ 2224 county="[-1994]宣威县"
+ 2225 county="[-1997]富源县"
+ 2226 county="[-1997]罗平县"
+ 2227 county="[-1997]师宗县"
+ 2228 county="[-1997]陆良县"
+ 2229 county="[-1983]宜良县"
+ 2230 county="[-1983]路南彝族自治县"
+ 2231 county="[-1997]寻甸回族彝族自治县"
+ 2232 county="[-1983]嵩明县"
+ 2233 county="[-1997]会泽县"
+ 2300 county="楚雄彝族自治州"
+ 2301 county="[1983-]楚雄市"
+ 2302 county="[2021-]禄丰市"
+ 2321 county="[-1983]楚雄县"
+ 2322 county="双柏县"
+ 2323 county="牟定县"
+ 2324 county="南华县"
+ 2325 county="姚安县"
+ 2326 county="大姚县"
+ 2327 county="永仁县"
+ 2328 county="元谋县"
+ 2329 county="武定县"
+ 2330 county="[-1983]禄劝县"
+ 2331 county="[-2021]禄丰县"
+ 2400 county="[-1997]玉溪地区"
+ 2401 county="[1983-1997]玉溪市"
+ 2421 county="[-1983]玉溪县"
+ 2422 county="[-1997]江川县"
+ 2423 county="[-1997]澄江县"
+ 2424 county="[-1997]通海县"
+ 2425 county="[-1997]华宁县"
+ 2426 county="[-1997]易门县"
+ 2427 county="[-1997]峨山彝族自治县"
+ 2428 county="[-1997]新平彝族傣族自治县"
+ 2429 county="[-1997]元江哈尼族彝族傣族自治县"
+ 2500 county="红河哈尼族彝族自治州"
+ 2501 county="个旧市"
+ 2502 county="[1981-]开远市"
+ 2503 county="[2010-]蒙自市"
+ 2504 county="[2013-]弥勒市"
+ 2521 county="[-1981]开远县"
+ 2522 county="[-2010]蒙自县"
+ 2523 county="屏边苗族自治县"
+ 2524 county="建水县"
+ 2525 county="石屏县"
+ 2526 county="[-2013]弥勒县"
+ 2527 county="泸西县"
+ 2528 county="元阳县"
+ 2529 county="红河县"
+ 2530 county="[-1984]金平县,[1985-]金平苗族瑶族傣族自治县"
+ 2531 county="绿春县"
+ 2532 county="河口瑶族自治县"
+ 2600 county="文山壮族苗族自治州"
+ 2601 county="[2010-]文山市"
+ 2621 county="[-2010]文山县"
+ 2622 county="砚山县"
+ 2623 county="西畴县"
+ 2624 county="麻栗坡县"
+ 2625 county="马关县"
+ 2626 county="丘北县"
+ 2627 county="广南县"
+ 2628 county="富宁县"
+ 2700 county="[-2003]思茅地区"
+ 2701 county="[1993-2003]思茅市"
+ 2721 county="[-1993]思茅县"
+ 2722 county="[-1984]普洱县,[1985-2006]普洱哈尼族彝族自治县"
+ 2723 county="[-2003]墨江哈尼族自治县"
+ 2724 county="[-1984]景东县,[1985-2003]景东彝族自治县"
+ 2725 county="[-1984]景谷县,[1985-2003]景谷傣族彝族自治县"
+ 2726 county="[-1989]镇沅县,[1990-2003]镇沅彝族哈尼族拉祜族自治县"
+ 2727 county="[-2003]江城哈尼族彝族自治县"
+ 2728 county="[-2003]孟连傣族拉祜族佤族自治县"
+ 2729 county="[-2003]澜沧拉祜族自治县"
+ 2730 county="[-2003]西盟佤族自治县"
+ 2800 county="西双版纳傣族自治州"
+ 2801 county="[1993-]景洪市"
+ 2821 county="[-1993]景洪县"
+ 2822 county="勐海县"
+ 2823 county="勐腊县"
+ 2900 county="大理白族自治州"
+ 2901 county="[1983-1982]下关市,[1983-]大理市"
+ 2921 county="[-1983]大理县"
+ 2922 county="[-1984]漾濞县,[1985-]漾濞彝族自治县"
+ 2923 county="祥云县"
+ 2924 county="宾川县"
+ 2925 county="弥渡县"
+ 2926 county="南涧彝族自治县"
+ 2927 county="巍山彝族回族自治县"
+ 2928 county="永平县"
+ 2929 county="云龙县"
+ 2930 county="洱源县"
+ 2931 county="剑川县"
+ 2932 county="鹤庆县"
+ 3000 county="[-2000]保山地区"
+ 3001 county="[1983-2000]保山市"
+ 3021 county="[-1983]保山县"
+ 3022 county="[-2000]施甸县"
+ 3023 county="[-2000]腾冲县"
+ 3024 county="[-2000]龙陵县"
+ 3025 county="[-2000]昌宁县"
+ 3100 county="德宏傣族景颇族自治州"
+ 3101 county="[1985-1999]畹町市"
+ 3102 county="[1992-]瑞丽市"
+ 3103 county="[1996-2009]潞西市,[2010-]芒市"
+ 3121 county="[-1996]潞西县"
+ 3122 county="梁河县"
+ 3123 county="盈江县"
+ 3124 county="陇川县"
+ 3125 county="[-1992]瑞丽县"
+ 3126 county="[-1985]畹町镇"
+ 3200 county="[-2002]丽江地区"
+ 3221 county="[-2002]丽江纳西族自治县"
+ 3222 county="[-2002]永胜县"
+ 3223 county="[-2002]华坪县"
+ 3224 county="[-2002]宁蒗彝族自治县"
+ 3300 county="怒江傈僳族自治州"
+ 3301 county="[2016-]泸水市"
+ 3321 county="[-2016]泸水县"
+ 3322 county="[-1986]碧江县"
+ 3323 county="福贡县"
+ 3324 county="贡山独龙族怒族自治县"
+ 3325 county="[-1986]兰坪县,[1987-]兰坪白族普米族自治县"
+ 3400 county="迪庆藏族自治州"
+ 3401 county="[2014-]香格里拉市"
+ 3421 county="[-2000]中甸县,[2001-2013]香格里拉县"
+ 3422 county="德钦县"
+ 3423 county="[-1984]维西县,[1985-]维西傈僳族自治县"
+ 3500 county="[-2003]临沧地区"
+ 3521 county="[-2003]临沧县"
+ 3522 county="[-2003]凤庆县"
+ 3523 county="[-2003]云县"
+ 3524 county="[-2003]永德县"
+ 3525 county="[-2003]镇康县"
+ 3526 county="[-1984]双江县,[1985-2003]双江拉祜族佤族布朗族傣族自治县"
+ 3527 county="[-2003]耿马傣族佤族自治县"
+ 3528 county="[-2003]沧源佤族自治县"
+54 province="西藏自治区"
+ 0000 county="西藏自治区"
+ 0100 county="拉萨市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]城关区"
+ 0103 county="[2015-]堆龙德庆区"
+ 0104 county="[2017-]达孜区"
+ 0120 county="[-1983]市区"
+ 0121 county="林周县"
+ 0122 county="当雄县"
+ 0123 county="尼木县"
+ 0124 county="曲水县"
+ 0125 county="[-2015]堆龙德庆县"
+ 0126 county="[-2017]达孜县"
+ 0127 county="墨竹工卡县"
+ 0128 county="[-1983]工布江达县"
+ 0129 county="[-1983]林芝县"
+ 0130 county="[-1983]米林县"
+ 0131 county="[-1983]墨脱县"
+ 0200 county="[2014-]日喀则市"
+ 0201 county="[2014-]市辖区"
+ 0202 county="[2014-]桑珠孜区"
+ 0221 county="[2014-]南木林县"
+ 0222 county="[2014-]江孜县"
+ 0223 county="[2014-]定日县"
+ 0224 county="[2014-]萨迦县"
+ 0225 county="[2014-]拉孜县"
+ 0226 county="[2014-]昂仁县"
+ 0227 county="[2014-]谢通门县"
+ 0228 county="[2014-]白朗县"
+ 0229 county="[2014-]仁布县"
+ 0230 county="[2014-]康马县"
+ 0231 county="[2014-]定结县"
+ 0232 county="[2014-]仲巴县"
+ 0233 county="[2014-]亚东县"
+ 0234 county="[2014-]吉隆县"
+ 0235 county="[2014-]聂拉木县"
+ 0236 county="[2014-]萨嘎县"
+ 0237 county="[2014-]岗巴县"
+ 0300 county="[2014-]昌都市"
+ 0301 county="[2014-]市辖区"
+ 0302 county="[2014-]卡若区"
+ 0321 county="[2014-]江达县"
+ 0322 county="[2014-]贡觉县"
+ 0323 county="[2014-]类乌齐县"
+ 0324 county="[2014-]丁青县"
+ 0325 county="[2014-]察雅县"
+ 0326 county="[2014-]八宿县"
+ 0327 county="[2014-]左贡县"
+ 0328 county="[2014-]芒康县"
+ 0329 county="[2014-]洛隆县"
+ 0330 county="[2014-]边坝县"
+ 0400 county="[2015-]林芝市"
+ 0401 county="[2015-]市辖区"
+ 0402 county="[2015-]巴宜区"
+ 0421 county="[2015-]工布江达县"
+ 0422 county="[2015-2023]米林县"
+ 0423 county="[2015-]墨脱县"
+ 0424 county="[2015-]波密县"
+ 0425 county="[2015-]察隅县"
+ 0426 county="[2015-]朗县"
+ 0481 county="[2023-]米林市"
+ 0500 county="[2016-]山南市"
+ 0501 county="[2016-]市辖区"
+ 0502 county="[2016-]乃东区"
+ 0521 county="[2016-]扎囊县"
+ 0522 county="[2016-]贡嘎县"
+ 0523 county="[2016-]桑日县"
+ 0524 county="[2016-]琼结县"
+ 0525 county="[2016-]曲松县"
+ 0526 county="[2016-]措美县"
+ 0527 county="[2016-]洛扎县"
+ 0528 county="[2016-]加查县"
+ 0529 county="[2016-]隆子县"
+ 0530 county="[2016-2023]错那县"
+ 0531 county="[2016-]浪卡子县"
+ 0581 county="[2023-]错那市"
+ 0600 county="[2017-]那曲市"
+ 0601 county="[2017-]市辖区"
+ 0602 county="[2017-]色尼区"
+ 0621 county="[2017-]嘉黎县"
+ 0622 county="[2017-]比如县"
+ 0623 county="[2017-]聂荣县"
+ 0624 county="[2017-]安多县"
+ 0625 county="[2017-]申扎县"
+ 0626 county="[2017-]索县"
+ 0627 county="[2017-]班戈县"
+ 0628 county="[2017-]巴青县"
+ 0629 county="[2017-]尼玛县"
+ 0630 county="[2017-]双湖县"
+ 2100 county="[-2014]昌都地区"
+ 2121 county="[-2014]昌都县"
+ 2122 county="[-2014]江达县"
+ 2123 county="[-2014]贡觉县"
+ 2124 county="[-2014]类乌齐县"
+ 2125 county="[-2014]丁青县"
+ 2126 county="[-2014]察雅县"
+ 2127 county="[-2014]八宿县"
+ 2128 county="[-2014]左贡县"
+ 2129 county="[-2014]芒康县"
+ 2130 county="[-1983]波密县"
+ 2131 county="[-1983]察隅县"
+ 2132 county="[-2014]洛隆县"
+ 2133 county="[-2014]边坝县"
+ 2134 county="[1983-1999]盐井县"
+ 2135 county="[1983-1999]碧土县"
+ 2136 county="[1983-1999]妥坝县"
+ 2137 county="[1983-1999]生达县"
+ 2200 county="[-2016]山南地区"
+ 2221 county="[-2016]乃东县"
+ 2222 county="[-2016]扎囊县"
+ 2223 county="[-2016]贡嘎县"
+ 2224 county="[-2016]桑日县"
+ 2225 county="[-2016]琼结县"
+ 2226 county="[-2016]曲松县"
+ 2227 county="[-2016]措美县"
+ 2228 county="[-2016]洛扎县"
+ 2229 county="[-2016]加查县"
+ 2230 county="[-1983]朗县"
+ 2231 county="[-2016]隆子县"
+ 2232 county="[-2016]错那县"
+ 2233 county="[1986-2016]浪卡子县"
+ 2300 county="[-2014]日喀则地区"
+ 2301 county="[1986-2014]日喀则市"
+ 2321 county="[-1986]日喀则县"
+ 2322 county="[-2014]南木林县"
+ 2323 county="[1986-2014]江孜县"
+ 2324 county="[-2014]定日县"
+ 2325 county="[-2014]萨迦县"
+ 2326 county="[-2014]拉孜县"
+ 2327 county="[-2014]昂仁县"
+ 2328 county="[-2014]谢通门县"
+ 2329 county="[1986-2014]白朗县"
+ 2330 county="[1986-2014]仁布县"
+ 2331 county="[1986-2014]康马县"
+ 2332 county="[-2014]定结县"
+ 2333 county="[-2014]仲巴县"
+ 2334 county="[1986-2014]亚东县"
+ 2335 county="[-2014]吉隆县"
+ 2336 county="[-2014]聂拉木县"
+ 2337 county="[-2014]萨嘎县"
+ 2338 county="[1986-2014]岗巴县"
+ 2400 county="[-2017]那曲地区"
+ 2421 county="[-2017]那曲县"
+ 2422 county="[-2017]嘉黎县"
+ 2423 county="[-2017]比如县"
+ 2424 county="[-2017]聂荣县"
+ 2425 county="[-2017]安多县"
+ 2426 county="[-2017]申扎县"
+ 2427 county="[-2017]索县"
+ 2428 county="[-2017]班戈县"
+ 2429 county="[-2017]巴青县"
+ 2430 county="[1983-2017]尼玛县"
+ 2431 county="[2012-2017]双湖县"
+ 2500 county="阿里地区"
+ 2521 county="普兰县"
+ 2522 county="札达县"
+ 2523 county="噶尔县"
+ 2524 county="日土县"
+ 2525 county="革吉县"
+ 2526 county="改则县"
+ 2527 county="措勤县"
+ 2528 county="[1983-1999]隆格尔县"
+ 2600 county="[1983-2015]林芝地区"
+ 2621 county="[1983-2015]林芝县"
+ 2622 county="[1983-2015]工布江达县"
+ 2623 county="[1983-2015]米林县"
+ 2624 county="[1983-2015]墨脱县"
+ 2625 county="[1983-2015]波密县"
+ 2626 county="[1983-2015]察隅县"
+ 2627 county="[1983-2015]朗县"
+ 2700 county="[1983-1986]江孜地区"
+ 2721 county="[1983-1986]江孜县"
+ 2722 county="[1983-1986]浪卡子县"
+ 2723 county="[1983-1986]白朗县"
+ 2724 county="[1983-1986]仁布县"
+ 2725 county="[1983-1986]康马县"
+ 2726 county="[1983-1986]亚东县"
+ 2727 county="[1983-1986]岗巴县"
+61 province="陕西省"
+ 0000 county="陕西省"
+ 0100 county="西安市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]新城区"
+ 0103 county="[1983-]碑林区"
+ 0104 county="[1983-]莲湖区"
+ 0111 county="[1983-]灞桥区"
+ 0112 county="[1983-]未央区"
+ 0113 county="[1983-]雁塔区"
+ 0114 county="[1983-]阎良区"
+ 0115 county="[1997-]临潼区"
+ 0116 county="[2002-]长安区"
+ 0117 county="[2014-]高陵区"
+ 0118 county="[2016-]鄠邑区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-2002]长安县"
+ 0122 county="[1983-]蓝田县"
+ 0123 county="[1983-1997]临潼县"
+ 0124 county="[1983-]周至县"
+ 0125 county="[1983-2016]户县"
+ 0126 county="[1983-2014]高陵县"
+ 0200 county="铜川市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-1999]城区,[2000-]王益区"
+ 0203 county="[1983-1999]郊区,[2000-]印台区"
+ 0204 county="[2002-]耀州区"
+ 0220 county="[-1983]市区"
+ 0221 county="[-2002]耀县"
+ 0222 county="[1983-]宜君县"
+ 0300 county="宝鸡市"
+ 0301 county="[1983-]市辖区"
+ 0302 county="[1983-]渭滨区"
+ 0303 county="[1983-]金台区"
+ 0304 county="[2003-]陈仓区"
+ 0305 county="[2021-]凤翔区"
+ 0320 county="[-1983]市区"
+ 0321 county="[-2003]宝鸡县"
+ 0322 county="[-2021]凤翔县"
+ 0323 county="岐山县"
+ 0324 county="扶风县"
+ 0325 county="[-1983]武功县"
+ 0326 county="眉县"
+ 0327 county="陇县"
+ 0328 county="千阳县"
+ 0329 county="麟游县"
+ 0330 county="凤县"
+ 0331 county="太白县"
+ 0400 county="[1983-]咸阳市"
+ 0401 county="[1983-]市辖区"
+ 0402 county="[1983-]秦都区"
+ 0403 county="[1983-]杨陵区"
+ 0404 county="[1986-]渭城区"
+ 0421 county="[1983-1993]兴平县"
+ 0422 county="[1983-]三原县"
+ 0423 county="[1983-]泾阳县"
+ 0424 county="[1983-]乾县"
+ 0425 county="[1983-]礼泉县"
+ 0426 county="[1983-]永寿县"
+ 0427 county="[1983-2018]彬县"
+ 0428 county="[1983-]长武县"
+ 0429 county="[1983-]旬邑县"
+ 0430 county="[1983-]淳化县"
+ 0431 county="[1983-]武功县"
+ 0481 county="[1993-]兴平市"
+ 0482 county="[2018-]彬州市"
+ 0500 county="[1994-]渭南市"
+ 0501 county="[1994-]市辖区"
+ 0502 county="[1994-]临渭区"
+ 0503 county="[2015-]华州区"
+ 0521 county="[1994-2015]华县"
+ 0522 county="[1994-]潼关县"
+ 0523 county="[1994-]大荔县"
+ 0524 county="[1994-]合阳县"
+ 0525 county="[1994-]澄城县"
+ 0526 county="[1994-]蒲城县"
+ 0527 county="[1994-]白水县"
+ 0528 county="[1994-]富平县"
+ 0581 county="[1994-]韩城市"
+ 0582 county="[1994-]华阴市"
+ 0600 county="[1996-]延安市"
+ 0601 county="[1996-]市辖区"
+ 0602 county="[1996-]宝塔区"
+ 0603 county="[2016-]安塞区"
+ 0621 county="[1996-]延长县"
+ 0622 county="[1996-]延川县"
+ 0623 county="[1996-2019]子长县"
+ 0624 county="[1996-2016]安塞县"
+ 0625 county="[1996-]志丹县"
+ 0626 county="[1996-2004]吴旗县,[2005-]吴起县"
+ 0627 county="[1996-]甘泉县"
+ 0628 county="[1996-]富县"
+ 0629 county="[1996-]洛川县"
+ 0630 county="[1996-]宜川县"
+ 0631 county="[1996-]黄龙县"
+ 0632 county="[1996-]黄陵县"
+ 0681 county="[2019-]子长市"
+ 0700 county="[1996-]汉中市"
+ 0701 county="[1996-]市辖区"
+ 0702 county="[1996-]汉台区"
+ 0703 county="[2017-]南郑区"
+ 0721 county="[1996-2017]南郑县"
+ 0722 county="[1996-]城固县"
+ 0723 county="[1996-]洋县"
+ 0724 county="[1996-]西乡县"
+ 0725 county="[1996-]勉县"
+ 0726 county="[1996-]宁强县"
+ 0727 county="[1996-]略阳县"
+ 0728 county="[1996-]镇巴县"
+ 0729 county="[1996-]留坝县"
+ 0730 county="[1996-]佛坪县"
+ 0800 county="[1999-]榆林市"
+ 0801 county="[1999-]市辖区"
+ 0802 county="[1999-]榆阳区"
+ 0803 county="[2015-]横山区"
+ 0821 county="[1999-2017]神木县"
+ 0822 county="[1999-]府谷县"
+ 0823 county="[1999-2015]横山县"
+ 0824 county="[1999-]靖边县"
+ 0825 county="[1999-]定边县"
+ 0826 county="[1999-]绥德县"
+ 0827 county="[1999-]米脂县"
+ 0828 county="[1999-]佳县"
+ 0829 county="[1999-]吴堡县"
+ 0830 county="[1999-]清涧县"
+ 0831 county="[1999-]子洲县"
+ 0881 county="[2017-]神木市"
+ 0900 county="[2000-]安康市"
+ 0901 county="[2000-]市辖区"
+ 0902 county="[2000-]汉滨区"
+ 0921 county="[2000-]汉阴县"
+ 0922 county="[2000-]石泉县"
+ 0923 county="[2000-]宁陕县"
+ 0924 county="[2000-]紫阳县"
+ 0925 county="[2000-]岚皋县"
+ 0926 county="[2000-]平利县"
+ 0927 county="[2000-]镇坪县"
+ 0928 county="[2000-2021]旬阳县"
+ 0929 county="[2000-]白河县"
+ 0981 county="[2021-]旬阳市"
+ 1000 county="[2001-]商洛市"
+ 1001 county="[2001-]市辖区"
+ 1002 county="[2001-]商州区"
+ 1021 county="[2001-]洛南县"
+ 1022 county="[2001-]丹凤县"
+ 1023 county="[2001-]商南县"
+ 1024 county="[2001-]山阳县"
+ 1025 county="[2001-]镇安县"
+ 1026 county="[2001-]柞水县"
+ 2100 county="[-1994]渭南地区"
+ 2101 county="[1983-1994]渭南市"
+ 2102 county="[1983-1994]韩城市"
+ 2103 county="[1990-1994]华阴市"
+ 2121 county="[-1983]蓝田县"
+ 2122 county="[-1983]临潼县"
+ 2123 county="[-1983]渭南县"
+ 2124 county="[-1994]华县"
+ 2125 county="[-1990]华阴县"
+ 2126 county="[-1994]潼关县"
+ 2127 county="[-1994]大荔县"
+ 2128 county="[-1994]蒲城县"
+ 2129 county="[-1994]澄城县"
+ 2130 county="[-1994]白水县"
+ 2131 county="[-1983]韩城县"
+ 2132 county="[-1994]合阳县"
+ 2133 county="[-1994]富平县"
+ 2200 county="[-1983]咸阳地区"
+ 2201 county="[-1983]咸阳市"
+ 2221 county="[-1983]兴平县"
+ 2222 county="[-1983]周至县"
+ 2223 county="[-1983]户县"
+ 2224 county="[-1983]三原县"
+ 2225 county="[-1983]泾阳县"
+ 2226 county="[-1983]高陵县"
+ 2227 county="[-1983]乾县"
+ 2228 county="[-1983]礼泉县"
+ 2229 county="[-1983]永寿县"
+ 2230 county="[-1983]彬县"
+ 2231 county="[-1983]长武县"
+ 2232 county="[-1983]旬邑县"
+ 2233 county="[-1983]淳化县"
+ 2300 county="[-1996]汉中地区"
+ 2301 county="[-1996]汉中市"
+ 2321 county="[-1996]南郑县"
+ 2322 county="[-1996]城固县"
+ 2323 county="[-1996]洋县"
+ 2324 county="[-1996]西乡县"
+ 2325 county="[-1996]勉县"
+ 2326 county="[-1996]宁强县"
+ 2327 county="[-1996]略阳县"
+ 2328 county="[-1996]镇巴县"
+ 2329 county="[-1996]留坝县"
+ 2330 county="[-1996]佛坪县"
+ 2400 county="[-2000]安康地区"
+ 2401 county="[1988-2000]安康市"
+ 2421 county="[-1988]安康县"
+ 2422 county="[-2000]汉阴县"
+ 2423 county="[-2000]石泉县"
+ 2424 county="[-2000]宁陕县"
+ 2425 county="[-2000]紫阳县"
+ 2426 county="[-2000]岚皋县"
+ 2427 county="[-2000]平利县"
+ 2428 county="[-2000]镇坪县"
+ 2429 county="[-2000]旬阳县"
+ 2430 county="[-2000]白河县"
+ 2500 county="[-2001]商洛地区"
+ 2501 county="[1988-2001]商州市"
+ 2521 county="[-1988]商县"
+ 2522 county="[-2001]洛南县"
+ 2523 county="[-2001]丹凤县"
+ 2524 county="[-2001]商南县"
+ 2525 county="[-2001]山阳县"
+ 2526 county="[-2001]镇安县"
+ 2527 county="[-2001]柞水县"
+ 2600 county="[-1996]延安地区"
+ 2601 county="[-1996]延安市"
+ 2621 county="[-1996]延长县"
+ 2622 county="[-1996]延川县"
+ 2623 county="[-1996]子长县"
+ 2624 county="[-1996]安塞县"
+ 2625 county="[-1996]志丹县"
+ 2626 county="[-1996]吴旗县"
+ 2627 county="[-1996]甘泉县"
+ 2628 county="[-1996]富县"
+ 2629 county="[-1996]洛川县"
+ 2630 county="[-1996]宜川县"
+ 2631 county="[-1996]黄龙县"
+ 2632 county="[-1996]黄陵县"
+ 2633 county="[-1983]宜君县"
+ 2700 county="[-1999]榆林地区"
+ 2701 county="[1988-1999]榆林市"
+ 2721 county="[-1988]榆林县"
+ 2722 county="[-1999]神木县"
+ 2723 county="[-1999]府谷县"
+ 2724 county="[-1999]横山县"
+ 2725 county="[-1999]靖边县"
+ 2726 county="[-1999]定边县"
+ 2727 county="[-1999]绥德县"
+ 2728 county="[-1999]米脂县"
+ 2729 county="[-1999]佳县"
+ 2730 county="[-1999]吴堡县"
+ 2731 county="[-1999]清涧县"
+ 2732 county="[-1999]子洲县"
+62 province="甘肃省"
+ 0000 county="甘肃省"
+ 0100 county="兰州市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]城关区"
+ 0103 county="[1983-]七里河区"
+ 0104 county="[1983-]西固区"
+ 0105 county="[1983-]安宁区"
+ 0111 county="[1983-]红古区"
+ 0112 county="[1983-1985]白银区"
+ 0120 county="[-1983]市区"
+ 0121 county="永登县"
+ 0122 county="皋兰县"
+ 0123 county="榆中县"
+ 0200 county="嘉峪关市"
+ 0300 county="[1981-]金昌市"
+ 0301 county="[1984-]市辖区"
+ 0302 county="[1984-]金川区"
+ 0320 county="[1981-1984]市区"
+ 0321 county="[1981-]永昌县"
+ 0400 county="[1985-]白银市"
+ 0401 county="[1985-]市辖区"
+ 0402 county="[1985-]白银区"
+ 0403 county="[1985-]平川区"
+ 0421 county="[1985-]靖远县"
+ 0422 county="[1985-]会宁县"
+ 0423 county="[1985-]景泰县"
+ 0500 county="[1985-]天水市"
+ 0501 county="[1985-]市辖区"
+ 0502 county="[1985-2003]秦城区,[2004-]秦州区"
+ 0503 county="[1985-2003]北道区,[2004-]麦积区"
+ 0521 county="[1985-]清水县"
+ 0522 county="[1985-]秦安县"
+ 0523 county="[1985-]甘谷县"
+ 0524 county="[1985-]武山县"
+ 0525 county="[1985-]张家川回族自治县"
+ 0600 county="[2001-]武威市"
+ 0601 county="[2001-]市辖区"
+ 0602 county="[2001-]凉州区"
+ 0621 county="[2001-]民勤县"
+ 0622 county="[2001-]古浪县"
+ 0623 county="[2001-]天祝藏族自治县"
+ 0700 county="[2002-]张掖市"
+ 0701 county="[2002-]市辖区"
+ 0702 county="[2002-]甘州区"
+ 0721 county="[2002-]肃南裕固族自治县"
+ 0722 county="[2002-]民乐县"
+ 0723 county="[2002-]临泽县"
+ 0724 county="[2002-]高台县"
+ 0725 county="[2002-]山丹县"
+ 0800 county="[2002-]平凉市"
+ 0801 county="[2002-]市辖区"
+ 0802 county="[2002-]崆峒区"
+ 0821 county="[2002-]泾川县"
+ 0822 county="[2002-]灵台县"
+ 0823 county="[2002-]崇信县"
+ 0824 county="[2002-2018]华亭县"
+ 0825 county="[2002-]庄浪县"
+ 0826 county="[2002-]静宁县"
+ 0881 county="[2018-]华亭市"
+ 0900 county="[2002-]酒泉市"
+ 0901 county="[2002-]市辖区"
+ 0902 county="[2002-]肃州区"
+ 0921 county="[2002-]金塔县"
+ 0922 county="[2002-2005]安西县,[2006-]瓜州县"
+ 0923 county="[2002-]肃北蒙古族自治县"
+ 0924 county="[2002-]阿克塞哈萨克族自治县"
+ 0981 county="[2002-]玉门市"
+ 0982 county="[2002-]敦煌市"
+ 1000 county="[2002-]庆阳市"
+ 1001 county="[2002-]市辖区"
+ 1002 county="[2002-]西峰区"
+ 1021 county="[2002-]庆城县"
+ 1022 county="[2002-]环县"
+ 1023 county="[2002-]华池县"
+ 1024 county="[2002-]合水县"
+ 1025 county="[2002-]正宁县"
+ 1026 county="[2002-]宁县"
+ 1027 county="[2002-]镇原县"
+ 1100 county="[2003-]定西市"
+ 1101 county="[2003-]市辖区"
+ 1102 county="[2003-]安定区"
+ 1121 county="[2003-]通渭县"
+ 1122 county="[2003-]陇西县"
+ 1123 county="[2003-]渭源县"
+ 1124 county="[2003-]临洮县"
+ 1125 county="[2003-]漳县"
+ 1126 county="[2003-]岷县"
+ 1200 county="[2004-]陇南市"
+ 1201 county="[2004-]市辖区"
+ 1202 county="[2004-]武都区"
+ 1221 county="[2004-]成县"
+ 1222 county="[2004-]文县"
+ 1223 county="[2004-]宕昌县"
+ 1224 county="[2004-]康县"
+ 1225 county="[2004-]西和县"
+ 1226 county="[2004-]礼县"
+ 1227 county="[2004-]徽县"
+ 1228 county="[2004-]两当县"
+ 2100 county="[-2002]酒泉地区"
+ 2101 county="[-2002]玉门市"
+ 2102 county="[1985-2002]酒泉市"
+ 2103 county="[1987-2002]敦煌市"
+ 2121 county="[-1985]酒泉县"
+ 2122 county="[-1987]敦煌县"
+ 2123 county="[-2002]金塔县"
+ 2124 county="[-2002]肃北蒙古族自治县"
+ 2125 county="[-2002]阿克塞哈萨克族自治县"
+ 2126 county="[-2002]安西县"
+ 2200 county="[-2002]张掖地区"
+ 2201 county="[1985-2002]张掖市"
+ 2221 county="[-1985]张掖县"
+ 2222 county="[-2002]肃南裕固族自治县"
+ 2223 county="[-2002]民乐县"
+ 2224 county="[-2002]临泽县"
+ 2225 county="[-2002]高台县"
+ 2226 county="[-2002]山丹县"
+ 2300 county="[-2001]武威地区"
+ 2301 county="[1985-2001]武威市"
+ 2321 county="[-1985]武威县"
+ 2322 county="[-2001]民勤县"
+ 2323 county="[-2001]古浪县"
+ 2324 county="[-1985]景泰县"
+ 2325 county="[-1981]永昌县"
+ 2326 county="[-2001]天祝藏族自治县"
+ 2400 county="[-2003]定西地区"
+ 2421 county="[-2003]定西县"
+ 2422 county="[-1985]靖远县"
+ 2423 county="[-1985]会宁县"
+ 2424 county="[-2003]通渭县"
+ 2425 county="[-2003]陇西县"
+ 2426 county="[-2003]渭源县"
+ 2427 county="[-2003]临洮县"
+ 2428 county="[1985-2003]漳县"
+ 2429 county="[1985-2003]岷县"
+ 2500 county="[-1985]天水地区"
+ 2501 county="[-1985]天水市"
+ 2521 county="[-1985]张家川回族自治县"
+ 2522 county="[-1985]天水县"
+ 2523 county="[-1985]清水县"
+ 2524 county="[-1985]徽县"
+ 2525 county="[-1985]两当县"
+ 2526 county="[-1985]礼县"
+ 2527 county="[-1985]西和县"
+ 2528 county="[-1985]武山县"
+ 2529 county="[-1985]甘谷县"
+ 2530 county="[-1985]秦安县"
+ 2531 county="[-1985]漳县"
+ 2600 county="[-1984]武都地区,[1985-2003]陇南地区"
+ 2621 county="[-2004]武都县"
+ 2622 county="[-1985]岷县"
+ 2623 county="[-2004]宕昌县"
+ 2624 county="[-2004]成县"
+ 2625 county="[-2004]康县"
+ 2626 county="[-2004]文县"
+ 2627 county="[1985-2004]西和县"
+ 2628 county="[1985-2004]礼县"
+ 2629 county="[1985-2004]两当县"
+ 2630 county="[1985-2004]徽县"
+ 2700 county="[-2002]平凉地区"
+ 2701 county="[1983-2002]平凉市"
+ 2721 county="[-1983]平凉县"
+ 2722 county="[-2002]泾川县"
+ 2723 county="[-2002]灵台县"
+ 2724 county="[-2002]崇信县"
+ 2725 county="[-2002]华亭县"
+ 2726 county="[-2002]庄浪县"
+ 2727 county="[-2002]静宁县"
+ 2800 county="[-2002]庆阳地区"
+ 2801 county="[1985-2002]西峰市"
+ 2821 county="[-2002]庆阳县"
+ 2822 county="[-2002]环县"
+ 2823 county="[-2002]华池县"
+ 2824 county="[-2002]合水县"
+ 2825 county="[-2002]正宁县"
+ 2826 county="[-2002]宁县"
+ 2827 county="[-2002]镇原县"
+ 2900 county="临夏回族自治州"
+ 2901 county="[1983-]临夏市"
+ 2921 county="临夏县"
+ 2922 county="康乐县"
+ 2923 county="永靖县"
+ 2924 county="广河县"
+ 2925 county="和政县"
+ 2926 county="东乡族自治县"
+ 2927 county="积石山保安族东乡族撒拉族自治县"
+ 3000 county="甘南藏族自治州"
+ 3001 county="[1996-]合作市"
+ 3021 county="临潭县"
+ 3022 county="卓尼县"
+ 3023 county="舟曲县"
+ 3024 county="迭部县"
+ 3025 county="玛曲县"
+ 3026 county="碌曲县"
+ 3027 county="夏河县"
+63 province="青海省"
+ 0000 county="青海省"
+ 0100 county="西宁市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]城东区"
+ 0103 county="[1983-]城中区"
+ 0104 county="[1983-]城西区"
+ 0105 county="[1986-]城北区"
+ 0106 county="[2019-]湟中区"
+ 0111 county="[1983-1986]郊区"
+ 0120 county="[-1983]市区"
+ 0121 county="[-1984]大通县,[1985-]大通回族土族自治县"
+ 0122 county="[1999-2019]湟中县"
+ 0123 county="[1999-]湟源县"
+ 0200 county="[2013-]海东市"
+ 0201 county="[2013-]市辖区"
+ 0202 county="[2013-]乐都区"
+ 0203 county="[2015-]平安区"
+ 0221 county="[2013-2015]平安县"
+ 0222 county="[2013-]民和回族土族自治县"
+ 0223 county="[2013-]互助土族自治县"
+ 0224 county="[2013-]化隆回族自治县"
+ 0225 county="[2013-]循化撒拉族自治县"
+ 2100 county="[-2013]海东地区"
+ 2121 county="[-2013]平安县"
+ 2122 county="[-1984]民和县,[1985-2013]民和回族土族自治县"
+ 2123 county="[-2013]乐都县"
+ 2124 county="[-1999]湟中县"
+ 2125 county="[-1999]湟源县"
+ 2126 county="[-2013]互助土族自治县"
+ 2127 county="[-2013]化隆回族自治县"
+ 2128 county="[-2013]循化撒拉族自治县"
+ 2200 county="海北藏族自治州"
+ 2221 county="门源回族自治县"
+ 2222 county="祁连县"
+ 2223 county="海晏县"
+ 2224 county="刚察县"
+ 2300 county="黄南藏族自治州"
+ 2301 county="[2020-]同仁市"
+ 2321 county="[-2020]同仁县"
+ 2322 county="尖扎县"
+ 2323 county="泽库县"
+ 2324 county="[1988-]河南蒙古族自治县"
+ 2400 county="[-1988]省直辖行政单位"
+ 2421 county="[-1988]河南蒙古族自治县"
+ 2500 county="海南藏族自治州"
+ 2521 county="共和县"
+ 2522 county="同德县"
+ 2523 county="贵德县"
+ 2524 county="兴海县"
+ 2525 county="贵南县"
+ 2600 county="果洛藏族自治州"
+ 2621 county="玛沁县"
+ 2622 county="班玛县"
+ 2623 county="甘德县"
+ 2624 county="达日县"
+ 2625 county="久治县"
+ 2626 county="玛多县"
+ 2700 county="玉树藏族自治州"
+ 2701 county="[2013-]玉树市"
+ 2721 county="[-2013]玉树县"
+ 2722 county="杂多县"
+ 2723 county="称多县"
+ 2724 county="治多县"
+ 2725 county="囊谦县"
+ 2726 county="曲麻莱县"
+ 2800 county="[-1984]海西蒙古族藏族哈萨克族自治州,[1985-]海西蒙古族藏族自治州"
+ 2801 county="格尔木市"
+ 2802 county="[1988-]德令哈市"
+ 2803 county="[2018-]茫崖市"
+ 2821 county="乌兰县"
+ 2822 county="都兰县"
+ 2823 county="天峻县"
+ 2858 county="[1992-2018]冷湖行政委員會"
+ 2859 county="[1984-2018]茫崖行政委員會"
+64 province="宁夏回族自治区"
+ 0000 county="宁夏回族自治区"
+ 0100 county="银川市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-2002]城区"
+ 0103 county="[1983-2002]新城区"
+ 0104 county="[2002-]兴庆区"
+ 0105 county="[2002-]西夏区"
+ 0106 county="[2002-]金凤区"
+ 0111 county="[1983-2002]郊区"
+ 0120 county="[-1983]市区"
+ 0121 county="永宁县"
+ 0122 county="贺兰县"
+ 0181 county="[2002-]灵武市"
+ 0200 county="石嘴山市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]大武口区"
+ 0203 county="[1983-2003]石嘴山区"
+ 0204 county="[1983-2002]石炭井区"
+ 0205 county="[2003-]惠农区"
+ 0211 county="[1983-1987]郊区"
+ 0220 county="[-1983]市区"
+ 0221 county="平罗县"
+ 0222 county="[-2003]陶乐县"
+ 0223 county="[1987-2003]惠农县"
+ 0300 county="[1998-]吴忠市"
+ 0301 county="[1998-]市辖区"
+ 0302 county="[1998-]利通区"
+ 0303 county="[2009-]红寺堡区"
+ 0321 county="[1998-2003]中卫县"
+ 0322 county="[1998-2003]中宁县"
+ 0323 county="[1998-]盐池县"
+ 0324 county="[1998-]同心县"
+ 0381 county="[1998-]青铜峡市"
+ 0382 county="[1998-2002]灵武市"
+ 0400 county="[2001-]固原市"
+ 0401 county="[2001-]市辖区"
+ 0402 county="[2001-]原州区"
+ 0421 county="[2001-2003]海原县"
+ 0422 county="[2001-]西吉县"
+ 0423 county="[2001-]隆德县"
+ 0424 county="[2001-]泾源县"
+ 0425 county="[2001-]彭阳县"
+ 0500 county="[2003-]中卫市"
+ 0501 county="[2003-]市辖区"
+ 0502 county="[2003-]沙坡头区"
+ 0521 county="[2003-]中宁县"
+ 0522 county="[2003-]海原县"
+ 2100 county="[-1998]银南地区"
+ 2101 county="[1983-1998]吴忠市"
+ 2102 county="[1984-1998]青铜峡市"
+ 2103 county="[1996-1998]灵武市"
+ 2121 county="[-1983]吴忠县"
+ 2122 county="[-1984]青铜峡县"
+ 2123 county="[-1998]中卫县"
+ 2124 county="[-1998]中宁县"
+ 2125 county="[-1996]灵武县"
+ 2126 county="[-1998]盐池县"
+ 2127 county="[-1998]同心县"
+ 2200 county="[-2001]固原地区"
+ 2221 county="[-2001]固原县"
+ 2222 county="[-2001]海原县"
+ 2223 county="[-2001]西吉县"
+ 2224 county="[-2001]隆德县"
+ 2225 county="[-2001]泾源县"
+ 2226 county="[-2001]彭阳县"
+65 province="新疆维吾尔自治区"
+ 0000 county="新疆维吾尔自治区"
+ 0100 county="乌鲁木齐市"
+ 0101 county="[1983-]市辖区"
+ 0102 county="[1983-]天山区"
+ 0103 county="[1983-]沙依巴克区"
+ 0104 county="[1983-]新市区"
+ 0105 county="[1983-]水磨沟区"
+ 0106 county="[1983-]头屯河区"
+ 0107 county="[1983-1998]南山矿区,[1999-2001]南泉区,[2002-]达坂城区"
+ 0108 county="[1987-2007]东山区"
+ 0109 county="[2007-]米东区"
+ 0120 county="[-1983]市区"
+ 0121 county="乌鲁木齐县"
+ 0200 county="克拉玛依市"
+ 0201 county="[1983-]市辖区"
+ 0202 county="[1983-]独山子区"
+ 0203 county="[1983-]克拉玛依区"
+ 0204 county="[1983-]白碱滩区"
+ 0205 county="[1983-]乌尔禾区"
+ 0300 county="[-1986]石河子市"
+ 0400 county="[2015-]吐鲁番市"
+ 0401 county="[2015-]市辖区"
+ 0402 county="[2015-]高昌区"
+ 0421 county="[2015-]鄯善县"
+ 0422 county="[2015-]托克逊县"
+ 0500 county="[2016-]哈密市"
+ 0501 county="[2016-]市辖区"
+ 0502 county="[2016-]伊州区"
+ 0521 county="[2016-]巴里坤哈萨克自治县"
+ 0522 county="[2016-]伊吾县"
+ 2100 county="[-2015]吐鲁番地区"
+ 2101 county="[1984-2015]吐鲁番市"
+ 2121 county="[-1984]吐鲁番县"
+ 2122 county="[-2015]鄯善县"
+ 2123 county="[-2015]托克逊县"
+ 2200 county="[-2016]哈密地区"
+ 2201 county="[-2016]哈密市"
+ 2221 county="[-1983]哈密县"
+ 2222 county="[-2016]巴里坤哈萨克自治县"
+ 2223 county="[-2016]伊吾县"
+ 2300 county="昌吉回族自治州"
+ 2301 county="[1983-]昌吉市"
+ 2302 county="[1992-]阜康市"
+ 2303 county="[1996-2007]米泉市"
+ 2321 county="[-1983]昌吉县"
+ 2322 county="[-1996]米泉县"
+ 2323 county="呼图壁县"
+ 2324 county="玛纳斯县"
+ 2325 county="奇台县"
+ 2326 county="[-1992]阜康县"
+ 2327 county="吉木萨尔县"
+ 2328 county="木垒哈萨克自治县"
+ 2400 county="[-1984]伊犁哈萨克自治州"
+ 2401 county="[-1984]伊宁市"
+ 2402 county="[-1984]奎屯市"
+ 2421 county="[-1984]伊宁县"
+ 2422 county="[-1984]察布查尔锡伯自治县"
+ 2423 county="[-1984]霍城县"
+ 2424 county="[-1984]巩留县"
+ 2425 county="[-1984]新源县"
+ 2426 county="[-1984]昭苏县"
+ 2427 county="[-1984]特克斯县"
+ 2428 county="[-1984]尼勒克县"
+ 2500 county="[-1984]塔城地区"
+ 2521 county="[-1984]塔城县"
+ 2522 county="[-1984]额敏县"
+ 2523 county="[-1984]乌苏县"
+ 2524 county="[-1984]沙湾县"
+ 2525 county="[-1984]托里县"
+ 2526 county="[-1984]裕民县"
+ 2527 county="[-1984]和布克赛尔蒙古自治县"
+ 2600 county="[-1984]阿勒泰地区"
+ 2621 county="[-1984]阿勒泰县"
+ 2622 county="[-1984]布尔津县"
+ 2623 county="[-1984]富蕴县"
+ 2624 county="[-1984]福海县"
+ 2625 county="[-1984]哈巴河县"
+ 2626 county="[-1984]青河县"
+ 2627 county="[-1984]吉木乃县"
+ 2700 county="博尔塔拉蒙古自治州"
+ 2701 county="[1985-]博乐市"
+ 2702 county="[2012-]阿拉山口市"
+ 2721 county="[-1985]博乐县"
+ 2722 county="精河县"
+ 2723 county="温泉县"
+ 2800 county="巴音郭楞蒙古自治州"
+ 2801 county="库尔勒市"
+ 2821 county="[-1983]库尔勒县"
+ 2822 county="轮台县"
+ 2823 county="尉犁县"
+ 2824 county="若羌县"
+ 2825 county="且末县"
+ 2826 county="焉耆回族自治县"
+ 2827 county="和静县"
+ 2828 county="和硕县"
+ 2829 county="博湖县"
+ 2900 county="阿克苏地区"
+ 2901 county="[1983-]阿克苏市"
+ 2902 county="[2019-]库车市"
+ 2921 county="[-1983]阿克苏县"
+ 2922 county="温宿县"
+ 2923 county="[-2019]库车县"
+ 2924 county="沙雅县"
+ 2925 county="新和县"
+ 2926 county="拜城县"
+ 2927 county="乌什县"
+ 2928 county="阿瓦提县"
+ 2929 county="柯坪县"
+ 3000 county="克孜勒苏柯尔克孜自治州"
+ 3001 county="[1986-]阿图什市"
+ 3021 county="[-1986]阿图什县"
+ 3022 county="阿克陶县"
+ 3023 county="阿合奇县"
+ 3024 county="乌恰县"
+ 3100 county="喀什地区"
+ 3101 county="喀什市"
+ 3121 county="疏附县"
+ 3122 county="疏勒县"
+ 3123 county="英吉沙县"
+ 3124 county="泽普县"
+ 3125 county="莎车县"
+ 3126 county="叶城县"
+ 3127 county="麦盖提县"
+ 3128 county="岳普湖县"
+ 3129 county="伽师县"
+ 3130 county="巴楚县"
+ 3131 county="塔什库尔干塔吉克自治县"
+ 3200 county="和田地区"
+ 3201 county="[1983-]和田市"
+ 3221 county="和田县"
+ 3222 county="墨玉县"
+ 3223 county="皮山县"
+ 3224 county="洛浦县"
+ 3225 county="策勒县"
+ 3226 county="于田县"
+ 3227 county="民丰县"
+ 3228 county="[2024-]和康县"
+ 3229 county="[2024-]和安县"
+ 4000 county="[1984-]伊犁哈萨克自治州"
+ 4001 county="[1984-2001]奎屯市"
+ 4002 county="[2001-]伊宁市"
+ 4003 county="[2001-]奎屯市"
+ 4004 county="[2014-]霍尔果斯市"
+ 4021 county="[2001-]伊宁县"
+ 4022 county="[2001-]察布查尔锡伯自治县"
+ 4023 county="[2001-]霍城县"
+ 4024 county="[2001-]巩留县"
+ 4025 county="[2001-]新源县"
+ 4026 county="[2001-]昭苏县"
+ 4027 county="[2001-]特克斯县"
+ 4028 county="[2001-]尼勒克县"
+ 4100 county="[1984-2001]伊犁地区"
+ 4101 county="[1984-2001]伊宁市"
+ 4121 county="[1984-2001]伊宁县"
+ 4122 county="[1984-2001]察布查尔锡伯自治县"
+ 4123 county="[1984-2001]霍城县"
+ 4124 county="[1984-2001]巩留县"
+ 4125 county="[1984-2001]新源县"
+ 4126 county="[1984-2001]昭苏县"
+ 4127 county="[1984-2001]特克斯县"
+ 4128 county="[1984-2001]尼勒克县"
+ 4200 county="[1984-]塔城地区"
+ 4201 county="[1984-]塔城市"
+ 4202 county="[1996-]乌苏市"
+ 4203 county="[2021-]沙湾市"
+ 4221 county="[1984-]额敏县"
+ 4222 county="[1984-1996]乌苏县"
+ 4223 county="[1984-2021]沙湾县"
+ 4224 county="[1984-]托里县"
+ 4225 county="[1984-]裕民县"
+ 4226 county="[1984-]和布克赛尔蒙古自治县"
+ 4300 county="[1984-]阿勒泰地区"
+ 4301 county="[1984-]阿勒泰市"
+ 4321 county="[1984-]布尔津县"
+ 4322 county="[1984-]富蕴县"
+ 4323 county="[1984-]福海县"
+ 4324 county="[1984-]哈巴河县"
+ 4325 county="[1984-]青河县"
+ 4326 county="[1984-]吉木乃县"
+ 9000 county="[1986-]自治区直辖县级行政单位"
+ 9001 county="[1986-]石河子市"
+ 9002 county="[2002-]阿拉尔市"
+ 9003 county="[2002-]图木舒克市"
+ 9004 county="[2002-]五家渠市"
+ 9005 county="[2011-]北屯市"
+ 9006 county="[2012-]铁门关市"
+ 9007 county="[2014-]双河市"
+ 9008 county="[2015-]可克达拉市"
+ 9009 county="[2016-]昆玉市"
+ 9010 county="[2019-]胡杨河市"
+ 9011 county="[2021-]新星市"
+ 9012 county="[2022-]白杨市"
+71 province="台湾省"
+ 0000 county="台湾省"
+81 province="香港特別行政區"
+ 0000 county="[1997-]香港特别行政区"
+82 province="澳門特別行政區"
+ 0000 county="[1999-]澳门特别行政区"
diff --git a/stdnum/cn/ric.py b/stdnum/cn/ric.py
index 4b18ceee..12554b80 100644
--- a/stdnum/cn/ric.py
+++ b/stdnum/cn/ric.py
@@ -1,6 +1,7 @@
# ric.py - functions for handling Chinese Resident Identity Card Number
#
# Copyright (C) 2014 Jiangge Zhang
+# Copyright (C) 2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -13,16 +14,14 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""RIC No. (Chinese Resident Identity Card Number).
The RIC No. is the unique identifier for issued to China (PRC) residents.
The number consist of 18 digits in four sections. The first 6 digits refers to
-the resident's location, followed by 8 digits represeting the resident's birth
+the resident's location, followed by 8 digits representing the resident's birth
day in the form YYYY-MM-DD. The next 3 digits is the order code which is the
code used to disambiguate people with the same date of birth and address code.
Men are assigned to odd numbers, women assigned to even numbers. The final
@@ -32,19 +31,21 @@
'360426199101010071'
"""
+from __future__ import annotations
+
import datetime
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number).upper().strip()
-def get_birth_date(number):
+def get_birth_date(number: str) -> datetime.date:
"""Split the date parts from the number and return the birth date.
Note that in some cases it may return the registration date instead of
the birth date and it may be a century off."""
@@ -58,24 +59,39 @@ def get_birth_date(number):
raise InvalidComponent()
-def get_birth_place(number):
+def get_birth_place(number: str) -> dict[str, str]:
"""Use the number to look up the place of birth of the person."""
from stdnum import numdb
number = compact(number)
- results = numdb.get('cn/loc').info(number[:6])[0][1]
- if not results:
+ results = numdb.get('cn/loc').info(number[:6])
+ info = {k: v for part, props in results for k, v in props.items()}
+ if not info:
raise InvalidComponent()
- return results
-
-
-def calc_check_digit(number):
+ year = get_birth_date(number).year
+ # check if any found county was assigned at the birth year
+ for county in info['county'].split(','):
+ if not county.startswith('['):
+ return info
+ startend, county = county[1:].split(']')
+ start, end = startend.split('-')
+ if start and year < int(start):
+ continue
+ if end and year > int(end):
+ continue
+ info['county'] = county
+ return info
+ # none of the found counties were valid when the number was assigned
+ raise InvalidComponent()
+
+
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should have the check
digit included."""
checksum = (1 - 2 * int(number[:-1], 13)) % 11
return 'X' if checksum == 10 else str(checksum)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid RIC number. This checks the length,
formatting and birth date and place."""
number = compact(number)
@@ -90,7 +106,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid RIC number."""
try:
return bool(validate(number))
@@ -98,6 +114,6 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
return compact(number)
diff --git a/stdnum/cn/uscc.py b/stdnum/cn/uscc.py
index a04a553b..a14b93b8 100644
--- a/stdnum/cn/uscc.py
+++ b/stdnum/cn/uscc.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""USCC (Unified Social Credit Code, 统一社会信用代码, China tax number).
@@ -71,6 +69,8 @@
'91110000600037341L'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
@@ -78,7 +78,7 @@
_alphabet = '0123456789ABCDEFGHJKLMNPQRTUWXY'
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation.
This strips the number of any valid separators and removes surrounding
@@ -87,7 +87,7 @@ def compact(number):
return clean(number, ' -').upper().strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit for the number."""
weights = (1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28)
number = compact(number)
@@ -95,7 +95,7 @@ def calc_check_digit(number):
return _alphabet[(31 - total) % 31]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid USCC.
This checks the length, formatting and check digit.
@@ -112,7 +112,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid USCC."""
try:
return bool(validate(number))
@@ -120,6 +120,6 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
return compact(number)
diff --git a/stdnum/co/__init__.py b/stdnum/co/__init__.py
index de40a0c5..997ad89e 100644
--- a/stdnum/co/__init__.py
+++ b/stdnum/co/__init__.py
@@ -14,12 +14,13 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Colombian numbers."""
+from __future__ import annotations
+
+
# provide vat and rut as an alias
from stdnum.co import nit as vat # noqa: F401, isort:skip
from stdnum.co import nit as rut # noqa: F401, isort:skip
diff --git a/stdnum/co/nit.py b/stdnum/co/nit.py
index 2b182056..213ed325 100644
--- a/stdnum/co/nit.py
+++ b/stdnum/co/nit.py
@@ -16,9 +16,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""NIT (Número De Identificación Tributaria, Colombian identity code).
@@ -35,17 +33,19 @@
'213.123.432-1'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips
surrounding whitespace and separation dash."""
return clean(number, '.,- ').upper().strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should not have the
check digit included."""
weights = (3, 7, 13, 17, 19, 23, 29, 37, 41, 43, 47, 53, 59, 67, 71)
@@ -53,7 +53,7 @@ def calc_check_digit(number):
return '01987654321'[s]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid NIT. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -66,7 +66,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid NIT."""
try:
return bool(validate(number))
@@ -74,7 +74,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '.'.join(
diff --git a/stdnum/cr/__init__.py b/stdnum/cr/__init__.py
index d9b149a8..ca027c85 100644
--- a/stdnum/cr/__init__.py
+++ b/stdnum/cr/__init__.py
@@ -14,9 +14,10 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Costa Rican numbers."""
+
+from __future__ import annotations
+
from stdnum.cr import cpj as vat # noqa: F401
diff --git a/stdnum/cr/cpf.py b/stdnum/cr/cpf.py
index 105a0e1a..8f48df22 100644
--- a/stdnum/cr/cpf.py
+++ b/stdnum/cr/cpf.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CPF (Cédula de Persona Física, Costa Rica physical person ID number).
@@ -53,11 +51,13 @@
'01-0613-0584'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation.
This strips the number of any valid separators and removes surrounding
@@ -67,16 +67,16 @@ def compact(number):
parts = number.split('-')
if len(parts) == 3:
# Pad each group with zeroes
- parts[0] = '0' * (2 - len(parts[0])) + parts[0]
- parts[1] = '0' * (4 - len(parts[1])) + parts[1]
- parts[2] = '0' * (4 - len(parts[2])) + parts[2]
+ parts[0] = parts[0].zfill(2)
+ parts[1] = parts[1].zfill(4)
+ parts[2] = parts[2].zfill(4)
number = ''.join(parts)
if len(number) == 9:
number = '0' + number # Add leading zero
return number
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid Costa Rica CPF number.
This checks the length and formatting.
@@ -91,7 +91,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid Costa Rica CPF number."""
try:
return bool(validate(number))
@@ -99,7 +99,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '-'.join([number[:2], number[2:6], number[6:]])
diff --git a/stdnum/cr/cpj.py b/stdnum/cr/cpj.py
index c713a85e..a61ad4f9 100644
--- a/stdnum/cr/cpj.py
+++ b/stdnum/cr/cpj.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CPJ (Cédula de Persona Jurídica, Costa Rica tax number).
@@ -32,7 +30,7 @@
* https://www.hacienda.go.cr/consultapagos/ayuda_cedulas.htm
* https://www.procomer.com/downloads/quiero/guia_solicitud_vuce.pdf (page 11)
-* http://www.registronacional.go.cr/personas_juridicas/documentos/Consultas/Listado%20de%20Clases%20y%20Tipos%20Cedulas%20Juridicas.pdf
+* https://rnpdigital.com/personas_juridicas/documentos/Consultas/Listado%20de%20Clases%20y%20Tipos%20Cedulas%20Juridicas.pdf
* https://www.hacienda.go.cr/ATV/frmConsultaSituTributaria.aspx
>>> validate('3-101-999999')
@@ -47,13 +45,15 @@
InvalidLength: ...
>>> format('4 000 042138')
'4-000-042138'
-"""
+""" # noqa: E501
+
+from __future__ import annotations
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation.
This strips the number of any valid separators and removes surrounding
@@ -62,7 +62,7 @@ def compact(number):
return clean(number, ' -').upper().strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid Costa Rica CPJ number.
This checks the length and formatting.
@@ -89,7 +89,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid Costa Rica CPJ number."""
try:
return bool(validate(number))
@@ -97,7 +97,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '-'.join([number[0], number[1:4], number[4:]])
diff --git a/stdnum/cr/cr.py b/stdnum/cr/cr.py
index a63e4148..5cbf29e4 100644
--- a/stdnum/cr/cr.py
+++ b/stdnum/cr/cr.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CR (Cédula de Residencia, Costa Rica foreigners ID number).
@@ -51,11 +49,13 @@
'122200569906'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation.
This strips the number of any valid separators and removes surrounding
@@ -64,7 +64,7 @@ def compact(number):
return clean(number, ' -').upper().strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid Costa Rica CR number.
This checks the length and formatting.
@@ -79,7 +79,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid Costa Rica CR number."""
try:
return bool(validate(number))
@@ -87,6 +87,6 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
return compact(number)
diff --git a/stdnum/cu/__init__.py b/stdnum/cu/__init__.py
index aec2e467..1cb6f628 100644
--- a/stdnum/cu/__init__.py
+++ b/stdnum/cu/__init__.py
@@ -14,8 +14,6 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Cuban numbers."""
diff --git a/stdnum/cu/ni.py b/stdnum/cu/ni.py
index 2202e683..c9e8d6bf 100644
--- a/stdnum/cu/ni.py
+++ b/stdnum/cu/ni.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""NI (Número de identidad, Cuban identity card numbers).
@@ -50,19 +48,21 @@
InvalidComponent: ...
"""
+from __future__ import annotations
+
import datetime
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips
surrounding whitespace and separation dash."""
return clean(number, ' ').strip()
-def get_birth_date(number):
+def get_birth_date(number: str) -> datetime.date:
"""Split the date parts from the number and return the date of birth."""
number = compact(number)
year = int(number[0:2])
@@ -80,7 +80,7 @@ def get_birth_date(number):
raise InvalidComponent()
-def get_gender(number):
+def get_gender(number: str) -> str:
"""Get the gender (M/F) from the person's NI."""
number = compact(number)
if int(number[9]) % 2:
@@ -89,7 +89,7 @@ def get_gender(number):
return 'M'
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid NI. This checks the length, formatting
and check digit."""
number = compact(number)
@@ -101,7 +101,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid NI."""
try:
return bool(validate(number))
diff --git a/stdnum/cusip.py b/stdnum/cusip.py
index ae69e6aa..b21813ef 100644
--- a/stdnum/cusip.py
+++ b/stdnum/cusip.py
@@ -1,6 +1,6 @@
# cusip.py - functions for handling CUSIP numbers
#
-# Copyright (C) 2015-2017 Arthur de Jong
+# Copyright (C) 2015-2022 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CUSIP number (financial security identification number).
@@ -39,21 +37,22 @@
'US91324PAE25'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').strip().upper()
-# O and I are not valid but are accounted for in the check digit calculation
-_alphabet = '0123456789ABCDEFGH JKLMN PQRSTUVWXYZ*@#'
+_alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*@#'
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digits for the number."""
# convert to numeric first, then sum individual digits
number = ''.join(
@@ -61,7 +60,7 @@ def calc_check_digit(number):
return str((10 - sum(int(n) for n in number)) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is valid. This checks the length and
check digit."""
number = compact(number)
@@ -74,7 +73,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is valid. This checks the length and
check digit."""
try:
@@ -83,7 +82,7 @@ def is_valid(number):
return False
-def to_isin(number):
+def to_isin(number: str) -> str:
"""Convert the number to an ISIN."""
from stdnum import isin
return isin.from_natid('US', number)
diff --git a/stdnum/cy/__init__.py b/stdnum/cy/__init__.py
index 1d0117b2..095d36e9 100644
--- a/stdnum/cy/__init__.py
+++ b/stdnum/cy/__init__.py
@@ -14,8 +14,6 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Cypriot numbers."""
diff --git a/stdnum/cy/vat.py b/stdnum/cy/vat.py
index ce9115cd..4c2c5214 100644
--- a/stdnum/cy/vat.py
+++ b/stdnum/cy/vat.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number).
@@ -33,11 +31,13 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -').upper().strip()
@@ -46,7 +46,7 @@ def compact(number):
return number
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should not have the
check digit included."""
translation = {
@@ -59,7 +59,7 @@ def calc_check_digit(number):
) % 26]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -74,7 +74,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
diff --git a/stdnum/cz/__init__.py b/stdnum/cz/__init__.py
index fc749019..9e3c0183 100644
--- a/stdnum/cz/__init__.py
+++ b/stdnum/cz/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Czech numbers."""
+from __future__ import annotations
+
# provide vat as an alias
from stdnum.cz import dic as vat # noqa: F401
diff --git a/stdnum/cz/bankaccount.py b/stdnum/cz/bankaccount.py
new file mode 100644
index 00000000..ccfee4f8
--- /dev/null
+++ b/stdnum/cz/bankaccount.py
@@ -0,0 +1,133 @@
+# bankaccount.py - functions for handling Czech bank account numbers
+# coding: utf-8
+#
+# Copyright (C) 2022 Petr Přikryl
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""Czech bank account number.
+
+The Czech bank account numbers consist of up to 20 digits:
+ UUUUUK-MMMMMMMMKM/XXXX
+
+The first part is prefix that is up to 6 digits. The following part is from 2 to 10 digits.
+Both parts could be filled with zeros from left if missing.
+The final 4 digits represent the bank code.
+
+More information:
+
+* https://www.penize.cz/osobni-ucty/424173-tajemstvi-cisla-uctu-klicem-pro-banky-je-11
+* https://www.zlatakoruna.info/zpravy/ucty/cislo-uctu-v-cr
+
+>>> validate('34278-0727558021/0100')
+'034278-0727558021/0100'
+>>> validate('4278-727558021/0100') # invalid check digits (prefix)
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+>>> validate('34278-727558021/0000') # invalid bank
+Traceback (most recent call last):
+ ...
+InvalidComponent: ...
+>>> format('34278-727558021/0100')
+'034278-0727558021/0100'
+>>> to_bic('34278-727558021/0100')
+'KOMBCZPP'
+"""
+
+from __future__ import annotations
+
+import re
+
+from stdnum.exceptions import *
+from stdnum.util import clean
+
+
+_bankaccount_re = re.compile(
+ r'((?P[0-9]{0,6})-)?(?P[0-9]{2,10})\/(?P[0-9]{4})')
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the
+ number of any valid separators and removes surrounding whitespace."""
+ number = clean(number).strip()
+ match = _bankaccount_re.match(number)
+ if match:
+ # zero-pad valid numbers
+ prefix = (match.group('prefix') or '').zfill(6)
+ root = match.group('root').zfill(10)
+ number = ''.join((prefix, '-', root, '/', match.group('bank')))
+ return number
+
+
+def _split(number: str) -> tuple[str | None, str, str]:
+ """Split valid numbers into prefix, root and bank parts of the number."""
+ match = _bankaccount_re.match(number)
+ if not match:
+ raise InvalidFormat()
+ return match.group('prefix'), match.group('root'), match.group('bank')
+
+
+def _info(bank: str) -> dict[str, str]:
+ """Look up information for the bank."""
+ from stdnum import numdb
+ info = {}
+ for _nr, found in numdb.get('cz/banks').info(bank):
+ info.update(found)
+ return info
+
+
+def info(number: str) -> dict[str, str]:
+ """Return a dictionary of data about the supplied number. This typically
+ returns the name of the bank and branch and a BIC if it is valid."""
+ prefix, root, bank = _split(compact(number))
+ return _info(bank)
+
+
+def to_bic(number: str) -> str | None:
+ """Return the BIC for the bank that this number refers to."""
+ return info(number).get('bic')
+
+
+def _calc_checksum(number: str) -> int:
+ weights = (6, 3, 7, 9, 10, 5, 8, 4, 2, 1)
+ return sum(w * int(n) for w, n in zip(weights, number.zfill(10))) % 11
+
+
+def validate(number: str) -> str:
+ """Check if the number provided is a valid bank account number."""
+ number = compact(number)
+ prefix, root, bank = _split(number)
+ # guaranteed to be present because compacts adds a missing prefix
+ assert prefix
+ if _calc_checksum(prefix) != 0:
+ raise InvalidChecksum()
+ if _calc_checksum(root) != 0:
+ raise InvalidChecksum()
+ if 'bank' not in _info(bank):
+ raise InvalidComponent()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number provided is a valid bank account number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def format(number: str) -> str:
+ """Reformat the number to the standard presentation format."""
+ return compact(number)
diff --git a/stdnum/cz/banks.dat b/stdnum/cz/banks.dat
new file mode 100644
index 00000000..883234fc
--- /dev/null
+++ b/stdnum/cz/banks.dat
@@ -0,0 +1,49 @@
+# generated from kody_bank_CR.csv downloaded from
+# https://www.cnb.cz/cs/platebni-styk/.galleries/ucty_kody_bank/download/kody_bank_CR.csv
+0100 bic="KOMBCZPP" bank="Komerční banka, a.s." certis="True"
+0300 bic="CEKOCZPP" bank="Československá obchodní banka, a. s." certis="True"
+0600 bic="AGBACZPP" bank="MONETA Money Bank, a.s." certis="True"
+0710 bic="CNBACZPP" bank="ČESKÁ NÁRODNÍ BANKA" certis="True"
+0800 bic="GIBACZPX" bank="Česká spořitelna, a.s." certis="True"
+2010 bic="FIOBCZPP" bank="Fio banka, a.s." certis="True"
+2060 bic="CITFCZPP" bank="Citfin, spořitelní družstvo" certis="True"
+2070 bic="MPUBCZPP" bank="TRINITY BANK a.s." certis="True"
+2100 bank="ČSOB Hypoteční banka, a.s." certis="True"
+2200 bank="Peněžní dům, spořitelní družstvo" certis="True"
+2220 bic="ARTTCZPP" bank="Artesa, spořitelní družstvo" certis="True"
+2250 bic="CTASCZ22" bank="Banka CREDITAS a.s." certis="True"
+2260 bank="NEY spořitelní družstvo" certis="True"
+2600 bic="CITICZPX" bank="Citibank Europe plc, organizační složka"
+2700 bic="BACXCZPP" bank="UniCredit Bank Czech Republic and Slovakia, a.s." certis="True"
+3030 bic="AIRACZPP" bank="Air Bank a.s." certis="True"
+3060 bic="BPKOCZPP" bank="PKO BP S.A., Czech Branch" certis="True"
+3500 bic="INGBCZPP" bank="ING Bank N.V." certis="True"
+4300 bic="NROZCZPP" bank="Národní rozvojová banka, a.s." certis="True"
+5500 bic="RZBCCZPP" bank="Raiffeisenbank a.s." certis="True"
+5800 bic="JTBPCZPP" bank="J&T BANKA, a.s."
+6000 bic="PMBPCZPP" bank="PPF banka a.s." certis="True"
+6200 bic="COBACZPX" bank="COMMERZBANK Aktiengesellschaft, pobočka Praha" certis="True"
+6210 bic="BREXCZPP" bank="mBank S.A., organizační složka" certis="True"
+6300 bic="GEBACZPP" bank="BNP Paribas S.A., pobočka Česká republika" certis="True"
+6363 bank="Partners Banka, a.s." certis="True"
+6700 bic="SUBACZPP" bank="Všeobecná úverová banka a.s., pobočka Praha" certis="True"
+6800 bic="VBOECZ2X" bank="Sberbank CZ, a.s. v likvidaci" certis="True"
+7910 bic="DEUTCZPX" bank="Deutsche Bank Aktiengesellschaft Filiale Prag, organizační složka" certis="True"
+7950 bank="Raiffeisen stavební spořitelna a.s." certis="True"
+7960 bank="ČSOB Stavební spořitelna, a.s." certis="True"
+7970 bank="MONETA Stavební Spořitelna, a.s." certis="True"
+7990 bank="Modrá pyramida stavební spořitelna, a.s." certis="True"
+8030 bic="GENOCZ21" bank="Volksbank Raiffeisenbank Nordoberpfalz eG pobočka Cheb" certis="True"
+8040 bic="OBKLCZ2X" bank="Oberbank AG pobočka Česká republika" certis="True"
+8060 bank="Stavební spořitelna České spořitelny, a.s." certis="True"
+8090 bic="CZEECZPP" bank="Česká exportní banka, a.s." certis="True"
+8150 bic="MIDLCZPP" bank="HSBC Continental Europe, Czech Republic" certis="True"
+8190 bank="Sparkasse Oberlausitz-Niederschlesien" certis="True"
+8198 bic="FFCSCZP1" bank="FAS finance company s.r.o."
+8220 bic="PAERCZP1" bank="Payment execution s.r.o."
+8250 bic="BKCHCZPP" bank="Bank of China (CEE) Ltd. Prague Branch" certis="True"
+8255 bic="COMMCZPP" bank="Bank of Communications Co., Ltd., Prague Branch odštěpný závod" certis="True"
+8265 bic="ICBKCZPP" bank="Industrial and Commercial Bank of China Limited, Prague Branch, odštěpný závod" certis="True"
+8500 bank="Multitude Bank p.l.c." certis="True"
+8610 bank="Devizová burza a.s."
+8660 bank="PAYMONT, UAB" certis="True"
diff --git a/stdnum/cz/dic.py b/stdnum/cz/dic.py
index 475521d7..7b331d21 100644
--- a/stdnum/cz/dic.py
+++ b/stdnum/cz/dic.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""DIČ (Daňové identifikační číslo, Czech VAT number).
@@ -40,12 +38,14 @@
'640903926'
"""
+from __future__ import annotations
+
from stdnum.cz import rc
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' /').upper().strip()
@@ -54,21 +54,21 @@ def compact(number):
return number
-def calc_check_digit_legal(number):
+def calc_check_digit_legal(number: str) -> str:
"""Calculate the check digit for 8 digit legal entities. The number
passed should not have the check digit included."""
check = (11 - sum((8 - i) * int(n) for i, n in enumerate(number))) % 11
return str((check or 1) % 10)
-def calc_check_digit_special(number):
+def calc_check_digit_special(number: str) -> str:
"""Calculate the check digit for special cases. The number passed
should not have the first and last digits included."""
check = sum((8 - i) * int(n) for i, n in enumerate(number)) % 11
return str((8 - (10 - check) % 11) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -92,7 +92,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
diff --git a/stdnum/cz/rc.py b/stdnum/cz/rc.py
index 627c3122..f4d395c6 100644
--- a/stdnum/cz/rc.py
+++ b/stdnum/cz/rc.py
@@ -1,7 +1,7 @@
# rc.py - functions for handling Czech birth numbers
# coding: utf-8
#
-# Copyright (C) 2012-2019 Arthur de Jong
+# Copyright (C) 2012-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""RČ (Rodné číslo, the Czech birth number).
@@ -47,19 +45,21 @@
'710319/2745'
"""
+from __future__ import annotations
+
import datetime
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' /').upper().strip()
-def get_birth_date(number):
+def get_birth_date(number: str) -> datetime.date:
"""Split the date parts from the number and return the birth date."""
number = compact(number)
year = 1900 + int(number[0:2])
@@ -81,7 +81,7 @@ def get_birth_date(number):
raise InvalidComponent()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid birth number. This checks the length,
formatting, embedded date and check digit."""
number = compact(number)
@@ -90,20 +90,16 @@ def validate(number):
if len(number) not in (9, 10):
raise InvalidLength()
# check if birth date is valid
- birth_date = get_birth_date(number)
- # TODO: check that the birth date is not in the future
+ get_birth_date(number)
# check the check digit (10 digit numbers only)
if len(number) == 10:
- check = int(number[:-1]) % 11
- # before 1985 the checksum could be 0 or 10
- if birth_date < datetime.date(1985, 1, 1):
- check = check % 10
+ check = int(number[:-1]) % 11 % 10
if number[-1] != str(check):
raise InvalidChecksum()
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid birth number."""
try:
return bool(validate(number))
@@ -111,7 +107,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return number[:6] + '/' + number[6:]
diff --git a/stdnum/damm.py b/stdnum/damm.py
index 9f36e405..2151b099 100644
--- a/stdnum/damm.py
+++ b/stdnum/damm.py
@@ -1,6 +1,6 @@
# damm.py - functions for performing the Damm checksum algorithm
#
-# Copyright (C) 2016-2017 Arthur de Jong
+# Copyright (C) 2016-2021 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""The Damm algorithm.
@@ -53,10 +51,18 @@
9
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
-_operation_table = (
+TYPE_CHECKING = False
+if TYPE_CHECKING: # pragma: no cover (only used when type checking)
+ from collections.abc import Sequence
+ DammTable = Sequence[Sequence[int]]
+
+
+_operation_table: DammTable = (
(0, 3, 1, 7, 5, 9, 8, 6, 4, 2),
(7, 0, 9, 2, 1, 5, 4, 8, 6, 3),
(4, 2, 0, 6, 8, 7, 1, 3, 5, 9),
@@ -69,7 +75,7 @@
(2, 5, 8, 1, 4, 3, 6, 7, 9, 0))
-def checksum(number, table=None):
+def checksum(number: str, table: DammTable | None = None) -> int:
"""Calculate the Damm checksum over the provided number. The checksum is
returned as an integer value and should be 0 when valid."""
table = table or _operation_table
@@ -79,20 +85,20 @@ def checksum(number, table=None):
return i
-def validate(number, table=None):
+def validate(number: str, table: DammTable | None = None) -> str:
"""Check if the number provided passes the Damm algorithm."""
if not bool(number):
raise InvalidFormat()
try:
valid = checksum(number, table=table) == 0
- except Exception:
+ except Exception: # noqa: B902
raise InvalidFormat()
if not valid:
raise InvalidChecksum()
return number
-def is_valid(number, table=None):
+def is_valid(number: str, table: DammTable | None = None) -> bool:
"""Check if the number provided passes the Damm algorithm."""
try:
return bool(validate(number, table=table))
@@ -100,7 +106,7 @@ def is_valid(number, table=None):
return False
-def calc_check_digit(number, table=None):
+def calc_check_digit(number: str, table: DammTable | None = None) -> str:
"""Calculate the extra digit that should be appended to the number to
make it a valid number."""
return str(checksum(number, table=table))
diff --git a/stdnum/de/__init__.py b/stdnum/de/__init__.py
index 1449961d..c684bdde 100644
--- a/stdnum/de/__init__.py
+++ b/stdnum/de/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of German numbers."""
+from __future__ import annotations
+
# provide businessid as an alias
from stdnum.de import handelsregisternummer as businessid # noqa: F401
diff --git a/stdnum/de/handelsregisternummer.py b/stdnum/de/handelsregisternummer.py
index 5bda74cd..f1dead9f 100644
--- a/stdnum/de/handelsregisternummer.py
+++ b/stdnum/de/handelsregisternummer.py
@@ -2,7 +2,7 @@
# coding: utf-8
#
# Copyright (C) 2015 Holvi Payment Services Oy
-# Copyright (C) 2018-2019 Arthur de Jong
+# Copyright (C) 2018-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Handelsregisternummer (German company register number).
@@ -50,11 +48,18 @@
InvalidComponent: ...
"""
+from __future__ import annotations
+
import re
import unicodedata
from stdnum.exceptions import *
-from stdnum.util import clean, to_unicode
+from stdnum.util import clean
+
+
+TYPE_CHECKING = False
+if TYPE_CHECKING: # pragma: no cover (typechecking only import)
+ from typing import Any
# The known courts that have a Handelsregister
@@ -213,10 +218,10 @@
)
-def _to_min(court):
+def _to_min(court: str) -> str:
"""Convert the court name for quick comparison without encoding issues."""
return ''.join(
- x for x in unicodedata.normalize('NFD', to_unicode(court).lower())
+ x for x in unicodedata.normalize('NFD', court.lower())
if x in 'abcdefghijklmnopqrstuvwxyz')
@@ -229,6 +234,7 @@ def _to_min(court):
('Bad Homburg', 'Bad Homburg v.d.H.'),
('Berlin', 'Berlin (Charlottenburg)'),
('Charlottenburg', 'Berlin (Charlottenburg)'),
+ ('Charlottenburg (Berlin)', 'Berlin (Charlottenburg)'),
('Kaln', 'Köln'), # for encoding issues
('Kempten', 'Kempten (Allgäu)'),
('Ludwigshafen am Rhein (Ludwigshafen)', 'Ludwigshafen a.Rhein (Ludwigshafen)'),
@@ -279,7 +285,7 @@ def _to_min(court):
]
-def _split(number):
+def _split(number: str) -> tuple[str, str, str, str | None]:
"""Split the number into a court, registry, register number and
optionally qualifier."""
number = clean(number).strip()
@@ -290,29 +296,28 @@ def _split(number):
raise InvalidFormat()
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
court, registry, number, qualifier = _split(number)
return ' '.join(x for x in [court, registry, number, qualifier] if x)
-def validate(number, company_form=None):
+def validate(number: str, company_form: str | None = None) -> str:
"""Check if the number is a valid company registry number. If a
company_form (eg. GmbH or PartG) is given, the number is validated to
have the correct registry type."""
+ court: str | None
court, registry, number, qualifier = _split(number)
court = _courts.get(_to_min(court))
if not court:
raise InvalidComponent()
- if not isinstance(court, type(number)): # pragma: no cover (Python 2 code)
- court = court.decode('utf-8')
if company_form and COMPANY_FORM_REGISTRY_TYPES.get(company_form) != registry:
raise InvalidComponent()
return ' '.join(x for x in [court, registry, number, qualifier] if x)
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid company registry number."""
try:
return bool(validate(number))
@@ -321,26 +326,37 @@ def is_valid(number):
# The base URL for performing lookups
-_offeneregister_url = 'https://db.offeneregister.de/openregister-ef9e802.json'
+_offeneregister_url = 'https://db.offeneregister.de/openregister.json'
-def check_offeneregister(number, timeout=30): # pragma: no cover (not part of normal test suite)
+def check_offeneregister(
+ number: str,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> dict[str, Any] | None: # pragma: no cover (not part of normal test suite)
"""Retrieve registration information from the OffeneRegister.de web site.
+ The `timeout` argument specifies the network timeout in seconds.
+
+ The `verify` argument is either a boolean that determines whether the
+ server's certificate is validate or a string which must be a path the CA
+ certificate bundle to use for verification.
+
This basically returns the JSON response from the web service as a dict.
It will contain something like the following::
{
- 'retrieved_at': '2018-06-24T12:34:53Z',
- 'native_company_number': 'The number requested',
- 'company_number': 'Compact company number',
- 'registrar': 'Registar',
- 'federal_state': 'State name',
- 'registered_office': 'Office',
- 'register_art': 'Register type',
- 'register_nummer': 'Number'
- 'name': 'The name of the organisation',
- 'current_status': 'currently registered',
+ 'companyId': 'U1206_HRB14011',
+ 'courtCode': 'U1206',
+ 'courtName': 'Chemnitz',
+ 'globalId': 'sn_293298',
+ 'isCurrent': 'True',
+ 'name': 'Internet hier GmbH Presentation Provider',
+ 'nativeReferenceNumber': 'Chemnitz HRB 14011',
+ 'referenceNumberFirstSeen': '2020-06-12',
+ 'stdRefNo': 'U1206_HRB14011',
+ 'validFrom': '2020-06-12',
+ 'validTill': '',
}
Will return None if the number is invalid or unknown.
@@ -349,31 +365,22 @@ def check_offeneregister(number, timeout=30): # pragma: no cover (not part of n
# network access for the tests and unnecessarily load the web service
import requests
court, registry, number, qualifier = _split(number)
- # First lookup the registrar code
- # (we could look up the number by registrar (court), registry and number
- # but it seems those queries are too slow)
- response = requests.get(
- _offeneregister_url,
- params={
- 'sql': 'select company_number from company where registrar = :p0 limit 1',
- 'p0': court},
- timeout=timeout)
- response.raise_for_status()
- try:
- registrar = response.json()['rows'][0][0].split('_')[0]
- except (KeyError, IndexError) as e: # noqa: F841
- raise InvalidComponent() # unknown registrar code
- # Lookup the number
- number = '%s_%s%s' % (registrar, registry, number)
response = requests.get(
_offeneregister_url,
params={
- 'sql': 'select * from company where company_number = :p0 limit 1',
- 'p0': number},
- timeout=timeout)
+ 'sql': '''
+ select *
+ from ReferenceNumbers
+ join Names on ReferenceNumbers.companyId = Names.companyId
+ where nativeReferenceNumber = :p0
+ limit 1
+ ''',
+ 'p0': '%s %s %s' % (court, registry, number)},
+ timeout=timeout,
+ verify=verify)
response.raise_for_status()
try:
json = response.json()
return dict(zip(json['columns'], json['rows'][0]))
except (KeyError, IndexError) as e: # noqa: F841
- return # number not found
+ return None # number not found
diff --git a/stdnum/de/idnr.py b/stdnum/de/idnr.py
index 5c5a1797..4982a46f 100644
--- a/stdnum/de/idnr.py
+++ b/stdnum/de/idnr.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""IdNr (Steuerliche Identifikationsnummer, German personal tax number).
@@ -45,6 +43,8 @@
'36 574 261 809'
"""
+from __future__ import annotations
+
from collections import defaultdict
from stdnum.exceptions import *
@@ -52,13 +52,13 @@
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -./,').strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid tax identification number.
This checks the length, formatting and check digit."""
number = compact(number)
@@ -70,7 +70,7 @@ def validate(number):
raise InvalidFormat()
# In the first 10 digits exactly one digit must be repeated two or
# three times and other digits can appear only once.
- counter = defaultdict(int)
+ counter: dict[str, int] = defaultdict(int)
for n in number[:10]:
counter[n] += 1
counts = [c for c in counter.values() if c > 1]
@@ -79,7 +79,7 @@ def validate(number):
return mod_11_10.validate(number)
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid tax identification number.
This checks the length, formatting and check digit."""
try:
@@ -88,7 +88,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return ' '.join((number[:2], number[2:5], number[5:8], number[8:]))
diff --git a/stdnum/de/leitweg.py b/stdnum/de/leitweg.py
new file mode 100644
index 00000000..b5d80634
--- /dev/null
+++ b/stdnum/de/leitweg.py
@@ -0,0 +1,91 @@
+# leitweg.py - functions for handling Leitweg-ID
+# coding: utf-8
+#
+# Copyright (C) 2025 Holvi Payment Services Oy
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""Leitweg-ID, a buyer reference or routing identifier for electronic invoices.
+
+For the successful transmission of an electronic invoice as invoicing party or
+sender, a unique identification and addressing of the invoice recipient is
+required. The Leitweg-ID must be transmitted as a mandatory requirement for
+electronic invoicing to public contracting authorities in the federal
+administration.
+
+More information:
+
+* https://leitweg-id.de/
+* https://de.wikipedia.org/wiki/Leitweg-ID
+* https://xeinkauf.de/app/uploads/2022/11/Leitweg-ID-Formatspezifikation-v2-0-2-1.pdf
+
+>>> validate('991-03730-19')
+'991-03730-19'
+>>> validate('1-03730-19')
+Traceback (most recent call last):
+ ...
+InvalidFormat: ...
+"""
+
+from __future__ import annotations
+
+import re
+
+from stdnum.exceptions import *
+from stdnum.iso7064 import mod_97_10
+
+
+_pattern = re.compile(r'[0-9]{2,12}(-[0-9A-Z]{,30})?-[0-9]{2}')
+
+
+def compact(number: str) -> str:
+ """
+ Convert the number to the minimal representation. This strips the
+ number of any valid separators and removes surrounding whitespace.
+ """
+ return number.strip().upper() # no valid separators, dashes part of the format
+
+
+def validate(number: str) -> str:
+ """
+ Check if the number provided is valid. This checks the format, state or
+ federal government code, and check digits.
+ """
+ if not isinstance(number, str):
+ raise InvalidFormat()
+ number = compact(number)
+ # 2.1 Bestandteile der Leitweg-ID
+ if not 5 <= len(number) <= 46:
+ raise InvalidLength()
+ # 2.1 Bestandteile der Leitweg-ID
+ if not re.fullmatch(_pattern, number):
+ raise InvalidFormat()
+ # 2.2.1 Kennzahl des Bundeslandes/des Bundes
+ if not number[:2] in {
+ '01', '02', '03', '04', '05', '06', '07', '08', '09', '10',
+ '11', '12', '13', '14', '15', '16', '99',
+ }:
+ raise InvalidComponent()
+ # 2.4 Prüfziffer
+ mod_97_10.validate(number.replace('-', ''))
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number provided is valid. This checks the length and
+ check digit."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
diff --git a/stdnum/de/stnr.py b/stdnum/de/stnr.py
index 78389771..822747dc 100644
--- a/stdnum/de/stnr.py
+++ b/stdnum/de/stnr.py
@@ -1,4 +1,4 @@
-# steuernummer.py - functions for handling German tax numbers
+# stnr.py - functions for handling German tax numbers
# coding: utf-8
#
# Copyright (C) 2017 Holvi Payment Services
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""St.-Nr. (Steuernummer, German tax number).
@@ -50,14 +48,21 @@
InvalidLength: ...
"""
+from __future__ import annotations
+
import re
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
+TYPE_CHECKING = False
+if TYPE_CHECKING: # pragma: no cover (typechecking only import)
+ from collections.abc import Iterable
+
+
# The number formats per region (regional and country-wide format)
-_number_formats_per_region = {
+_number_formats_per_region_raw = {
'Baden-Württemberg': ['FFBBBUUUUP', '28FF0BBBUUUUP'],
'Bayern': ['FFFBBBUUUUP', '9FFF0BBBUUUUP'],
'Berlin': ['FFBBBUUUUP', '11FF0BBBUUUUP'],
@@ -76,11 +81,11 @@
'Thüringen': ['1FFBBBUUUUP', '41FF0BBBUUUUP'],
}
-REGIONS = sorted(_number_formats_per_region.keys())
+REGIONS = sorted(_number_formats_per_region_raw.keys())
"""Valid regions recognised by this module."""
-def _clean_region(region):
+def _clean_region(region: str) -> str:
"""Convert the region name to something that we can use for comparison
without running into encoding issues."""
return ''.join(
@@ -90,28 +95,28 @@ def _clean_region(region):
class _Format():
- def __init__(self, fmt):
+ def __init__(self, fmt: str) -> None:
self._fmt = fmt
self._re = re.compile('^%s$' % re.sub(
r'([FBUP])\1*',
lambda x: r'(\d{%d})' % len(x.group(0)), fmt))
- def match(self, number):
+ def match(self, number: str) -> re.Match[str] | None:
return self._re.match(number)
- def replace(self, f, b, u, p):
+ def replace(self, f: str, b: str, u: str, p: str) -> str:
items = iter([f, b, u, p])
return re.sub(r'([FBUP])\1*', lambda x: next(items), self._fmt)
# Convert the structure to something that we can easily use
_number_formats_per_region = dict(
- (_clean_region(region), [
- region, _Format(formats[0]), _Format(formats[1])])
- for region, formats in _number_formats_per_region.items())
+ (_clean_region(region), (
+ region, _Format(formats[0]), _Format(formats[1])))
+ for region, formats in _number_formats_per_region_raw.items())
-def _get_formats(region=None):
+def _get_formats(region: str | None = None) -> Iterable[tuple[str, _Format, _Format]]:
"""Return the formats for the region."""
if region:
region = _clean_region(region)
@@ -121,13 +126,13 @@ def _get_formats(region=None):
return _number_formats_per_region.values()
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -./,').strip()
-def validate(number, region=None):
+def validate(number: str, region: str | None = None) -> str:
"""Check if the number is a valid tax number. This checks the length and
formatting. The region can be supplied to verify that the number is
assigned in that region."""
@@ -142,7 +147,7 @@ def validate(number, region=None):
return number
-def is_valid(number, region=None):
+def is_valid(number: str, region: str | None = None) -> bool:
"""Check if the number is a valid tax number. This checks the length and
formatting. The region can be supplied to verify that the number is
assigned in that region."""
@@ -152,7 +157,7 @@ def is_valid(number, region=None):
return False
-def guess_regions(number):
+def guess_regions(number: str) -> list[str]:
"""Return a list of regions this number is valid for."""
number = compact(number)
return sorted(
@@ -160,7 +165,7 @@ def guess_regions(number):
if region_fmt.match(number) or country_fmt.match(number))
-def to_regional_number(number):
+def to_regional_number(number: str) -> str:
"""Convert the number to a regional (10 or 11 digit) number."""
number = compact(number)
for _region, region_fmt, country_fmt in _get_formats():
@@ -170,16 +175,16 @@ def to_regional_number(number):
raise InvalidFormat()
-def to_country_number(number, region=None):
+def to_country_number(number: str, region: str | None = None) -> str:
"""Convert the number to the nationally unique number. The region is
needed if the number is not only valid for one particular region."""
number = compact(number)
- formats = (
+ formats_iter = (
(region_fmt.match(number), country_fmt)
for _region, region_fmt, country_fmt in _get_formats(region))
formats = [
(region_match, country_fmt)
- for region_match, country_fmt in formats
+ for region_match, country_fmt in formats_iter
if region_match]
if not formats:
raise InvalidFormat()
@@ -188,7 +193,7 @@ def to_country_number(number, region=None):
return formats[0][1].replace(*formats[0][0].groups())
-def format(number, region=None):
+def format(number: str, region: str | None = None) -> str:
"""Reformat the passed number to the standard format."""
number = compact(number)
for _region, region_fmt, _country_fmt in _get_formats(region):
diff --git a/stdnum/de/vat.py b/stdnum/de/vat.py
index f2bfe294..af0587f1 100644
--- a/stdnum/de/vat.py
+++ b/stdnum/de/vat.py
@@ -13,13 +13,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number).
-The number is 10 digits long and uses the ISO 7064 Mod 11, 10 check digit
+The number is 9 digits long and uses the ISO 7064 Mod 11, 10 check digit
algorithm.
>>> compact('DE 136,695 976')
@@ -32,12 +30,14 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.iso7064 import mod_11_10
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -./,').upper().strip()
@@ -46,7 +46,7 @@ def compact(number):
return number
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid VAT number. This checks the
length, formatting and check digit."""
number = compact(number)
@@ -58,7 +58,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid VAT number. This checks the
length, formatting and check digit."""
try:
diff --git a/stdnum/de/wkn.py b/stdnum/de/wkn.py
index f2242bd6..4d3fe66f 100644
--- a/stdnum/de/wkn.py
+++ b/stdnum/de/wkn.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Wertpapierkennnummer (German securities identification code).
@@ -34,11 +32,13 @@
'DE000SKWM021'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').strip().upper()
@@ -48,7 +48,7 @@ def compact(number):
_alphabet = '0123456789ABCDEFGH JKLMN PQRSTUVWXYZ'
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is valid. This checks the length and
check digit."""
number = compact(number)
@@ -59,7 +59,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is valid. This checks the length and
check digit."""
try:
@@ -68,7 +68,7 @@ def is_valid(number):
return False
-def to_isin(number):
+def to_isin(number: str) -> str:
"""Convert the number to an ISIN."""
from stdnum import isin
return isin.from_natid('DE', number)
diff --git a/stdnum/dk/__init__.py b/stdnum/dk/__init__.py
index 4298d222..d594e136 100644
--- a/stdnum/dk/__init__.py
+++ b/stdnum/dk/__init__.py
@@ -14,12 +14,12 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Danish numbers."""
+from __future__ import annotations
+
# provide aliases
from stdnum.dk import cpr as personalid # noqa: F401
from stdnum.dk import cvr as vat # noqa: F401
diff --git a/stdnum/dk/cpr.py b/stdnum/dk/cpr.py
index 97eaf2b6..c547f2df 100644
--- a/stdnum/dk/cpr.py
+++ b/stdnum/dk/cpr.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CPR (personnummer, the Danish citizen number).
@@ -56,26 +54,28 @@
'211062-5629'
"""
+from __future__ import annotations
+
import datetime
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip()
-def checksum(number):
+def checksum(number: str) -> int:
"""Calculate the checksum. Note that the checksum isn't actually used
any more. Valid numbers used to have a checksum of 0."""
weights = (4, 3, 2, 7, 6, 5, 4, 3, 2, 1)
return sum(w * int(n) for w, n in zip(weights, number)) % 11
-def get_birth_date(number):
+def get_birth_date(number: str) -> datetime.date:
"""Split the date parts from the number and return the birth date."""
number = compact(number)
day = int(number[0:2])
@@ -93,7 +93,7 @@ def get_birth_date(number):
raise InvalidComponent('The number does not contain valid birth date information.')
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid CPR number. This checks the
length, formatting, embedded date and check digit."""
number = compact(number)
@@ -107,7 +107,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid CPR number. This checks the
length, formatting, embedded date and check digit."""
try:
@@ -116,7 +116,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '-'.join((number[:6], number[6:]))
diff --git a/stdnum/dk/cvr.py b/stdnum/dk/cvr.py
index aa80402d..008ce939 100644
--- a/stdnum/dk/cvr.py
+++ b/stdnum/dk/cvr.py
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CVR (Momsregistreringsnummer, Danish VAT number).
@@ -30,11 +28,13 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -.,/:').upper().strip()
@@ -43,13 +43,13 @@ def compact(number):
return number
-def checksum(number):
+def checksum(number: str) -> int:
"""Calculate the checksum."""
weights = (2, 7, 6, 5, 4, 3, 2, 1)
return sum(w * int(n) for w, n in zip(weights, number)) % 11
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid VAT number. This checks the
length, formatting and check digit."""
number = compact(number)
@@ -62,7 +62,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid VAT number. This checks the
length, formatting and check digit."""
try:
diff --git a/stdnum/do/__init__.py b/stdnum/do/__init__.py
index aa210e59..30603c8d 100644
--- a/stdnum/do/__init__.py
+++ b/stdnum/do/__init__.py
@@ -14,10 +14,10 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Dominican Republic numbers."""
+from __future__ import annotations
+
from stdnum.do import rnc as vat # noqa: F401
diff --git a/stdnum/do/cedula.py b/stdnum/do/cedula.py
index 7cf46271..98580011 100644
--- a/stdnum/do/cedula.py
+++ b/stdnum/do/cedula.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Cedula (Dominican Republic national identification number).
@@ -37,6 +35,8 @@
'224-0002211-1'
"""
+from __future__ import annotations
+
from stdnum import luhn
from stdnum.do import rnc
from stdnum.exceptions import *
@@ -145,13 +145,13 @@
'''.split())
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid cedula."""
number = compact(number)
if not isdigits(number):
@@ -163,7 +163,7 @@ def validate(number):
return luhn.validate(number)
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid cedula."""
try:
return bool(validate(number))
@@ -171,13 +171,17 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '-'.join((number[:3], number[3:-1], number[-1]))
-def check_dgii(number, timeout=30): # pragma: no cover
+def check_dgii(
+ number: str,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> dict[str, str] | None: # pragma: no cover
"""Lookup the number using the DGII online web service.
This uses the validation service run by the the Dirección General de
@@ -199,7 +203,7 @@ def check_dgii(number, timeout=30): # pragma: no cover
# this function isn't automatically tested because it would require
# network access for the tests and unnecessarily load the online service
# we use the RNC implementation and change the rnc result to cedula
- result = rnc.check_dgii(number, timeout)
+ result = rnc.check_dgii(number, timeout, verify)
if result and 'rnc' in result:
result['cedula'] = result.pop('rnc')
return result
diff --git a/stdnum/do/ncf.py b/stdnum/do/ncf.py
index a85e4c73..ed8f067d 100644
--- a/stdnum/do/ncf.py
+++ b/stdnum/do/ncf.py
@@ -1,7 +1,7 @@
# ncf.py - functions for handling Dominican Republic invoice numbers
# coding: utf-8
#
-# Copyright (C) 2017-2018 Arthur de Jong
+# Copyright (C) 2017-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
# Development of this functionality was funded by iterativo | https://iterativo.do
@@ -27,7 +25,7 @@
digital certificate for the same purpose. The number is either 19, 11 or 13
(e-CF) digits long.
-The 19 digit number starts wit a letter (A or P) to indicate that the number
+The 19 digit number starts with a letter (A or P) to indicate that the number
was assigned by the taxpayer or the DGII, followed a 2-digit business unit
number, a 3-digit location number, a 3-digit mechanism identifier, a 2-digit
document type and a 8-digit serial number.
@@ -56,11 +54,13 @@
InvalidFormat: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').strip().upper()
@@ -90,10 +90,12 @@ def compact(number):
'43', # minor expenses invoices (purchases)
'44', # invoices for special customers (tourists, free zones)
'45', # invoices for the government
+ '46', # invoices for exports
+ '47', # invoices for foreign payments
)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid NCF."""
number = compact(number)
if len(number) == 13:
@@ -116,7 +118,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid NCF."""
try:
return bool(validate(number))
@@ -124,7 +126,7 @@ def is_valid(number):
return False
-def _convert_result(result): # pragma: no cover
+def _convert_result(result: dict[str, str]) -> dict[str, str]: # pragma: no cover
"""Translate SOAP result entries into dictionaries."""
translation = {
'NOMBRE': 'name',
@@ -133,20 +135,36 @@ def _convert_result(result): # pragma: no cover
'MENSAJE_VALIDACION': 'validation_message',
'RNC': 'rnc',
'NCF': 'ncf',
- u'RNC / Cédula': 'rnc',
- u'RNC/Cédula': 'rnc',
- u'Nombre / Razón Social': 'name',
- u'Nombre/Razón Social': 'name',
+ 'RNC / Cédula': 'rnc',
+ 'RNC/Cédula': 'rnc',
+ 'Nombre / Razón Social': 'name',
+ 'Nombre/Razón Social': 'name',
'Estado': 'status',
'Tipo de comprobante': 'type',
- u'Válido hasta': 'valid_until',
+ 'Válido hasta': 'valid_until',
+ 'Código de Seguridad': 'security_code',
+ 'Rnc Emisor': 'issuing_rnc',
+ 'Rnc Comprador': 'buyer_rnc',
+ 'Monto Total': 'total',
+ 'Total de ITBIS': 'total_itbis',
+ 'Fecha Emisión': 'issuing_date',
+ 'Fecha Emisión': 'issuing_date',
+ 'Fecha de Firma': 'signature_date',
+ 'e-NCF': 'ncf',
}
return dict(
(translation.get(key, key), value)
for key, value in result.items())
-def check_dgii(rnc, ncf, timeout=30): # pragma: no cover
+def check_dgii(
+ rnc: str,
+ ncf: str,
+ buyer_rnc: str | None = None,
+ security_code: str | None = None,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> dict[str, str] | None: # pragma: no cover
"""Validate the RNC, NCF combination on using the DGII online web service.
This uses the validation service run by the the Dirección General de
@@ -154,7 +172,13 @@ def check_dgii(rnc, ncf, timeout=30): # pragma: no cover
whether the combination of RNC and NCF is valid. The timeout is in
seconds.
- Returns a dict with the following structure::
+ The `timeout` argument specifies the network timeout in seconds.
+
+ The `verify` argument is either a boolean that determines whether the
+ server's certificate is validate or a string which must be a path the CA
+ certificate bundle to use for verification.
+
+ Returns a dict with the following structure for a NCF::
{
'name': 'The registered name',
@@ -165,14 +189,32 @@ def check_dgii(rnc, ncf, timeout=30): # pragma: no cover
'validation_message': 'El NCF digitado es válido.',
}
+ For an ECNF::
+
+ {
+ 'status': 'Aceptado',
+ 'issuing_rnc': '1234567890123',
+ 'buyer_rnc': '123456789',
+ 'ncf': 'E300000000000',
+ 'security_code': '1+2kP3',
+ 'issuing_date': '2020-03-25',
+ 'signature_date': '2020-03-22',
+ 'total': '2203.50',
+ 'total_itbis': '305.10',
+ 'validation_message': 'Aceptado',
+ }
+
Will return None if the number is invalid or unknown."""
- import lxml.html
+ import lxml.html # type: ignore
import requests
- from stdnum.do.rnc import compact as rnc_compact
+ from stdnum.do.rnc import compact as rnc_compact # noqa: I003
rnc = rnc_compact(rnc)
ncf = compact(ncf)
+ if buyer_rnc:
+ buyer_rnc = rnc_compact(buyer_rnc)
url = 'https://dgii.gov.do/app/WebApps/ConsultasWeb2/ConsultasWeb/consultas/ncf.aspx'
session = requests.Session()
+ session.verify = verify
session.headers.update({
'User-Agent': 'Mozilla/5.0 (python-stdnum)',
})
@@ -188,15 +230,21 @@ def check_dgii(rnc, ncf, timeout=30): # pragma: no cover
'ctl00$cphMain$txtNCF': ncf,
'ctl00$cphMain$txtRNC': rnc,
}
+ if ncf[0] == 'E':
+ data['ctl00$cphMain$txtRncComprador'] = buyer_rnc
+ data['ctl00$cphMain$txtCodigoSeg'] = security_code
# Do the actual request
document = lxml.html.fromstring(
session.post(url, data=data, timeout=timeout).text)
- result = document.find('.//div[@id="cphMain_pResultado"]')
+ result_path = './/div[@id="cphMain_PResultadoFE"]' if ncf[0] == 'E' else './/div[@id="cphMain_pResultado"]'
+ result = document.find(result_path)
if result is not None:
+ lbl_path = './/*[@id="cphMain_lblEstadoFe"]' if ncf[0] == 'E' else './/*[@id="cphMain_lblInformacion"]'
data = {
- 'validation_message': document.findtext('.//*[@id="cphMain_lblInformacion"]').strip(),
+ 'validation_message': document.findtext(lbl_path).strip(),
}
data.update(zip(
- [x.text.strip() for x in result.findall('.//th')],
- [x.text.strip() for x in result.findall('.//td/span')]))
+ [x.text.strip() for x in result.findall('.//th') if x.text],
+ [x.text.strip() for x in result.findall('.//td/span') if x.text]))
return _convert_result(data)
+ return None
diff --git a/stdnum/do/rnc.py b/stdnum/do/rnc.py
index ddc6c3b6..4d6852c4 100644
--- a/stdnum/do/rnc.py
+++ b/stdnum/do/rnc.py
@@ -1,7 +1,7 @@
# rnc.py - functions for handling Dominican Republic tax registration
# coding: utf-8
#
-# Copyright (C) 2015-2018 Arthur de Jong
+# Copyright (C) 2015-2024 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
# Development of this functionality was funded by iterativo | https://iterativo.do
@@ -39,6 +37,8 @@
'1-31-24679-6'
"""
+from __future__ import annotations
+
import json
from stdnum.exceptions import *
@@ -58,20 +58,20 @@
"""The WSDL URL of DGII validation service."""
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit."""
weights = (7, 9, 8, 6, 5, 4, 3, 2)
check = sum(w * int(n) for w, n in zip(weights, number)) % 11
return str((10 - check) % 9 + 1)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid RNC."""
number = compact(number)
if not isdigits(number):
@@ -85,7 +85,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid RNC."""
try:
return bool(validate(number))
@@ -93,13 +93,13 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return '-'.join((number[:1], number[1:3], number[3:-1], number[-1]))
-def _convert_result(result): # pragma: no cover
+def _convert_result(result: str) -> dict[str, str]: # pragma: no cover
"""Translate SOAP result entries into dicts."""
translation = {
'RGE_RUC': 'rnc',
@@ -115,12 +115,22 @@ def _convert_result(result): # pragma: no cover
for key, value in json.loads(result.replace('\n', '\\n').replace('\t', '\\t')).items())
-def check_dgii(number, timeout=30): # pragma: no cover
+def check_dgii(
+ number: str,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> dict[str, str] | None: # pragma: no cover
"""Lookup the number using the DGII online web service.
This uses the validation service run by the the Dirección General de
Impuestos Internos, the Dominican Republic tax department to lookup
- registration information for the number. The timeout is in seconds.
+ registration information for the number.
+
+ The `timeout` argument specifies the network timeout in seconds.
+
+ The `verify` argument is either a boolean that determines whether the
+ server's certificate is validate or a string which must be a path the CA
+ certificate bundle to use for verification.
Returns a dict with the following structure::
@@ -137,7 +147,7 @@ def check_dgii(number, timeout=30): # pragma: no cover
# this function isn't automatically tested because it would require
# network access for the tests and unnecessarily load the online service
number = compact(number)
- client = get_soap_client(dgii_wsdl, timeout)
+ client = get_soap_client(dgii_wsdl, timeout=timeout, verify=verify)
result = client.GetContribuyentes(
value=number,
patronBusqueda=0, # search type: 0=by number, 1=by name
@@ -147,12 +157,18 @@ def check_dgii(number, timeout=30): # pragma: no cover
if result and 'GetContribuyentesResult' in result:
result = result['GetContribuyentesResult'] # PySimpleSOAP only
if result == '0':
- return
+ return None
result = [x for x in result.split('@@@')]
return _convert_result(result[0])
-def search_dgii(keyword, end_at=10, start_at=1, timeout=30): # pragma: no cover
+def search_dgii(
+ keyword: str,
+ end_at: int = 10,
+ start_at: int = 1,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> list[dict[str, str]]: # pragma: no cover
"""Search the DGII online web service using the keyword.
This uses the validation service run by the the Dirección General de
@@ -160,7 +176,13 @@ def search_dgii(keyword, end_at=10, start_at=1, timeout=30): # pragma: no cover
registration information using the keyword.
The number of entries returned can be tuned with the `end_at` and
- `start_at` arguments. The timeout is in seconds.
+ `start_at` arguments.
+
+ The `timeout` argument specifies the network timeout in seconds.
+
+ The `verify` argument is either a boolean that determines whether the
+ server's certificate is validate or a string which must be a path the CA
+ certificate bundle to use for verification.
Returns a list of dicts with the following structure::
@@ -180,7 +202,7 @@ def search_dgii(keyword, end_at=10, start_at=1, timeout=30): # pragma: no cover
Will return an empty list if the number is invalid or unknown."""
# this function isn't automatically tested because it would require
# network access for the tests and unnecessarily load the online service
- client = get_soap_client(dgii_wsdl, timeout)
+ client = get_soap_client(dgii_wsdl, timeout=timeout, verify=verify)
results = client.GetContribuyentes(
value=keyword,
patronBusqueda=1, # search type: 0=by number, 1=by name
diff --git a/stdnum/dz/__init__.py b/stdnum/dz/__init__.py
new file mode 100644
index 00000000..60cae228
--- /dev/null
+++ b/stdnum/dz/__init__.py
@@ -0,0 +1,24 @@
+# __init__.py - collection of Algerian numbers
+# coding: utf-8
+#
+# Copyright (C) 2022 Leandro Regueiro
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""Collection of Algerian numbers."""
+
+from __future__ import annotations
+
+# provide vat as an alias
+from stdnum.dz import nif as vat # noqa: F401
diff --git a/stdnum/dz/nif.py b/stdnum/dz/nif.py
new file mode 100644
index 00000000..c28173f8
--- /dev/null
+++ b/stdnum/dz/nif.py
@@ -0,0 +1,99 @@
+# nif.py - functions for handling Algeria NIF numbers
+# coding: utf-8
+#
+# Copyright (C) 2022 Leandro Regueiro
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""NIF, sometimes N.I.F. (Numéro d'Identification Fiscale, Algeria tax number).
+
+The NIF was adopted by the Algerian tax authorities on 2006, replacing the NIS
+number.
+
+The NIF applies to physical persons, legal persons, legal entities,
+administrative entities, local branches for foreign companies, associations,
+professional organisations, etc.
+
+The NIF consists of 15 digits, but sometimes it can be 20 digits long in order
+to represent branches or secondary establishments.
+
+More information:
+
+* http://www.jecreemonentreprise.dz/index.php?option=com_content&view=article&id=612&Itemid=463&lang=fr
+* https://www.mf.gov.dz/index.php/fr/fiscalite
+* https://cnrcinfo.cnrc.dz/numero-didentification-fiscale-nif/
+* https://nifenligne.mfdgi.gov.dz/
+* http://nif.mfdgi.gov.dz/nif.asp
+
+>>> validate('416001000000007')
+'416001000000007'
+>>> validate('408 020 000 150 039')
+'408020000150039'
+>>> validate('41201600000606600001')
+'41201600000606600001'
+>>> validate('000 216 001 808 337 13010')
+'00021600180833713010'
+>>> validate('12345')
+Traceback (most recent call last):
+ ...
+InvalidLength: ...
+>>> validate('X1600100000000V')
+Traceback (most recent call last):
+ ...
+InvalidFormat: ...
+>>> format('408 020 000 150 039')
+'408020000150039'
+>>> format('000 216 001 808 337 13010')
+'00021600180833713010'
+"""
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation.
+
+ This strips the number of any valid separators, removes surrounding
+ whitespace.
+ """
+ return clean(number, ' ')
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid Algeria NIF number.
+
+ This checks the length and formatting.
+ """
+ number = compact(number)
+ if len(number) not in (15, 20):
+ raise InvalidLength()
+ if not isdigits(number):
+ raise InvalidFormat()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid Algeria NIF number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def format(number: str) -> str:
+ """Reformat the number to the standard presentation format."""
+ return compact(number)
diff --git a/stdnum/ean.py b/stdnum/ean.py
index f7e4b63c..befa2327 100644
--- a/stdnum/ean.py
+++ b/stdnum/ean.py
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""EAN (International Article Number).
@@ -30,24 +28,26 @@
'98412345678908'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the EAN to the minimal representation. This strips the number
of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the EAN check digit for 13-digit numbers. The number passed
should not have the check bit included."""
return str((10 - sum((3, 1)[i % 2] * int(n)
for i, n in enumerate(reversed(number)))) % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid EAN-13. This checks the length
and the check bit but does not check whether a known GS1 Prefix and
company identifier are referenced."""
@@ -61,7 +61,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid EAN-13. This checks the length
and the check bit but does not check whether a known GS1 Prefix and
company identifier are referenced."""
diff --git a/stdnum/ec/__init__.py b/stdnum/ec/__init__.py
index 6e919064..da334132 100644
--- a/stdnum/ec/__init__.py
+++ b/stdnum/ec/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Ecuadorian numbers."""
+from __future__ import annotations
+
# provide vat as an alias
from stdnum.ec import ruc as vat # noqa: F401
diff --git a/stdnum/ec/ci.py b/stdnum/ec/ci.py
index c97c1937..0e48fe6b 100644
--- a/stdnum/ec/ci.py
+++ b/stdnum/ec/ci.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CI (Cédula de identidad, Ecuadorian personal identity code).
@@ -35,24 +33,27 @@
InvalidLength: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').upper().strip()
-def _checksum(number):
+def _checksum(number: str) -> int:
"""Calculate a checksum over the number."""
- fold = lambda x: x - 9 if x > 9 else x
+ def fold(x: int) -> int:
+ return x - 9 if x > 9 else x
return sum(fold((2, 1)[i % 2] * int(n))
for i, n in enumerate(number)) % 10
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid CI number. This checks the
length, formatting and check digit."""
number = compact(number)
@@ -69,7 +70,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid CI number. This checks the
length, formatting and check digit."""
try:
diff --git a/stdnum/ec/ruc.py b/stdnum/ec/ruc.py
index 6d0c961d..59fdbf65 100644
--- a/stdnum/ec/ruc.py
+++ b/stdnum/ec/ruc.py
@@ -2,7 +2,7 @@
# coding: utf-8
#
# Copyright (C) 2014 Jonathan Finlay
-# Copyright (C) 2014-2015 Arthur de Jong
+# Copyright (C) 2014-2021 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""RUC (Registro Único de Contribuyentes, Ecuadorian company tax number).
@@ -36,6 +34,8 @@
InvalidLength: ...
"""
+from __future__ import annotations
+
from stdnum.ec import ci
from stdnum.exceptions import *
from stdnum.util import isdigits
@@ -48,12 +48,38 @@
compact = ci.compact
-def _checksum(number, weights):
+def _checksum(number: str, weights: list[int]) -> int:
"""Calculate a checksum over the number given the weights."""
return sum(w * int(n) for w, n in zip(weights, number)) % 11
-def validate(number):
+def _validate_natural(number: str) -> str:
+ """Check if the number is a valid natural RUC (CI plus establishment)."""
+ if number[-3:] == '000':
+ raise InvalidComponent() # establishment number wrong
+ ci.validate(number[:10])
+ return number
+
+
+def _validate_public(number: str) -> str:
+ """Check if the number is a valid public RUC."""
+ if number[-4:] == '0000':
+ raise InvalidComponent() # establishment number wrong
+ if _checksum(number[:9], [3, 2, 7, 6, 5, 4, 3, 2, 1]) != 0:
+ raise InvalidChecksum()
+ return number
+
+
+def _validate_juridical(number: str) -> str:
+ """Check if the number is a valid juridical RUC."""
+ if number[-3:] == '000':
+ raise InvalidComponent() # establishment number wrong
+ if _checksum(number[:10], [4, 3, 2, 7, 6, 5, 4, 3, 2, 1]) != 0:
+ raise InvalidChecksum()
+ return number
+
+
+def validate(number: str) -> str:
"""Check if the number provided is a valid RUC number. This checks the
length, formatting, check digit and check sum."""
number = compact(number)
@@ -65,27 +91,25 @@ def validate(number):
raise InvalidComponent() # invalid province code
if number[2] < '6':
# 0..5 = natural RUC: CI plus establishment number
- if number[-3:] == '000':
- raise InvalidComponent() # establishment number wrong
- ci.validate(number[:10])
+ _validate_natural(number)
elif number[2] == '6':
- # 6 = public RUC
- if number[-4:] == '0000':
- raise InvalidComponent() # establishment number wrong
- if _checksum(number[:9], (3, 2, 7, 6, 5, 4, 3, 2, 1)) != 0:
- raise InvalidChecksum()
+ # 6 = public RUC (or natural RUC)
+ try:
+ _validate_public(number)
+ except ValidationError:
+ _validate_natural(number)
elif number[2] == '9':
- # 9 = juridical RUC
- if number[-3:] == '000':
- raise InvalidComponent() # establishment number wrong
- if _checksum(number[:10], (4, 3, 2, 7, 6, 5, 4, 3, 2, 1)) != 0:
- raise InvalidChecksum()
+ # 9 = juridical RUC (or public RUC)
+ try:
+ _validate_public(number)
+ except ValidationError:
+ _validate_juridical(number)
else:
raise InvalidComponent() # third digit wrong
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid RUC number. This checks the
length, formatting and check digit."""
try:
diff --git a/stdnum/ee/__init__.py b/stdnum/ee/__init__.py
index 7728e2d6..a7444b0b 100644
--- a/stdnum/ee/__init__.py
+++ b/stdnum/ee/__init__.py
@@ -14,11 +14,13 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Estonian numbers."""
-# provide vat as an alias
+from __future__ import annotations
+
+# provide aliases
+from stdnum.ee import ik as personalid # noqa: F401
from stdnum.ee import kmkr as vat # noqa: F401
+from stdnum.ee import registrikood as businessid # noqa: F401
diff --git a/stdnum/ee/ik.py b/stdnum/ee/ik.py
index 6eadb84d..10af45dd 100644
--- a/stdnum/ee/ik.py
+++ b/stdnum/ee/ik.py
@@ -15,11 +15,9 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
-"""Isikukood (Estonian Personcal ID number).
+"""Isikukood (Estonian Personal ID number).
The number consists of 11 digits: the first indicates the gender and century
the person was born in, the following 6 digits the birth date, followed by a
@@ -39,19 +37,21 @@
datetime.date(1968, 5, 28)
"""
+from __future__ import annotations
+
import datetime
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').strip()
-def get_birth_date(number):
+def get_birth_date(number: str) -> datetime.date:
"""Split the date parts from the number and return the birth date."""
number = compact(number)
if number[0] in '12':
@@ -73,7 +73,7 @@ def get_birth_date(number):
raise InvalidComponent()
-def get_gender(number):
+def get_gender(number: str) -> str:
"""Get the person's birth gender ('M' or 'F')."""
number = compact(number)
if number[0] in '1357':
@@ -84,7 +84,7 @@ def get_gender(number):
raise InvalidComponent()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit."""
check = sum(((i % 9) + 1) * int(n)
for i, n in enumerate(number[:-1])) % 11
@@ -94,7 +94,7 @@ def calc_check_digit(number):
return str(check % 10)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is valid. This checks the length,
formatting, embedded date and check digit."""
number = compact(number)
@@ -108,7 +108,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is valid. This checks the length,
formatting, embedded date and check digit."""
try:
diff --git a/stdnum/ee/kmkr.py b/stdnum/ee/kmkr.py
index 24ddbb38..85383a80 100644
--- a/stdnum/ee/kmkr.py
+++ b/stdnum/ee/kmkr.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""KMKR (Käibemaksukohuslase, Estonian VAT number).
@@ -30,11 +28,13 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' ').upper().strip()
@@ -43,13 +43,13 @@ def compact(number):
return number
-def checksum(number):
+def checksum(number: str) -> int:
"""Calculate the checksum."""
weights = (3, 7, 1, 3, 7, 1, 3, 7, 1)
return sum(w * int(n) for w, n in zip(weights, number)) % 10
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid VAT number. This checks the
length, formatting and check digit."""
number = compact(number)
@@ -62,7 +62,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid VAT number. This checks the
length, formatting and check digit."""
try:
diff --git a/stdnum/ee/registrikood.py b/stdnum/ee/registrikood.py
index 8f0ebc1a..0a3228c1 100644
--- a/stdnum/ee/registrikood.py
+++ b/stdnum/ee/registrikood.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Registrikood (Estonian organisation registration code).
@@ -47,18 +45,20 @@
InvalidComponent: ...
"""
+from __future__ import annotations
+
from stdnum.ee.ik import calc_check_digit
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is valid. This checks the length and
check digit."""
number = compact(number)
@@ -73,7 +73,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is valid. This checks the length and
check digit."""
try:
diff --git a/stdnum/eg/__init__.py b/stdnum/eg/__init__.py
new file mode 100644
index 00000000..347c1f36
--- /dev/null
+++ b/stdnum/eg/__init__.py
@@ -0,0 +1,24 @@
+# __init__.py - collection of Egypt numbers
+# coding: utf-8
+#
+# Copyright (C) 2022 Leandro Regueiro
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""Collection of Egypt numbers."""
+
+from __future__ import annotations
+
+# provide aliases
+from stdnum.eg import tn as vat # noqa: F401
diff --git a/stdnum/eg/tn.py b/stdnum/eg/tn.py
new file mode 100644
index 00000000..92e93674
--- /dev/null
+++ b/stdnum/eg/tn.py
@@ -0,0 +1,110 @@
+# tn.py - functions for handling Egypt Tax Number numbers
+# coding: utf-8
+#
+# Copyright (C) 2022 Leandro Regueiro
+# Copyright (C) 2025 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""Tax Registration Number (الرقم الضريبي, Egypt tax number).
+
+This number consists of 9 digits, usually separated into three groups
+using hyphens to make it easier to read, like XXX-XXX-XXX.
+
+More information:
+
+* https://emsp.mts.gov.eg:8181/EMDB-web/faces/authoritiesandcompanies/authority/website/SearchAuthority.xhtml?lang=en
+
+>>> validate('100-531-385')
+'100531385'
+>>> validate('٣٣١-١٠٥-٢٦٨')
+'331105268'
+>>> validate('12345')
+Traceback (most recent call last):
+ ...
+InvalidLength: ...
+>>> validate('VV3456789')
+Traceback (most recent call last):
+ ...
+InvalidFormat: ...
+>>> format('100531385')
+'100-531-385'
+""" # noqa: E501
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+_ARABIC_NUMBERS_MAP = {
+ # Arabic-indic digits.
+ '٠': '0',
+ '١': '1',
+ '٢': '2',
+ '٣': '3',
+ '٤': '4',
+ '٥': '5',
+ '٦': '6',
+ '٧': '7',
+ '٨': '8',
+ '٩': '9',
+ # Extended arabic-indic digits.
+ '۰': '0',
+ '۱': '1',
+ '۲': '2',
+ '۳': '3',
+ '۴': '4',
+ '۵': '5',
+ '۶': '6',
+ '۷': '7',
+ '۸': '8',
+ '۹': '9',
+}
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation.
+
+ This strips the number of any valid separators and removes surrounding
+ whitespace. It also converts arabic numbers.
+ """
+ return ''.join((_ARABIC_NUMBERS_MAP.get(c, c) for c in clean(number, ' -/').strip()))
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid Egypt Tax Number number.
+
+ This checks the length and formatting.
+ """
+ number = compact(number)
+ if not isdigits(number):
+ raise InvalidFormat()
+ if len(number) != 9:
+ raise InvalidLength()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid Egypt Tax Number number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
+
+
+def format(number: str) -> str:
+ """Reformat the number to the standard presentation format."""
+ number = compact(number)
+ return '-'.join([number[:3], number[3:-3], number[-3:]])
diff --git a/stdnum/es/__init__.py b/stdnum/es/__init__.py
index e74786c8..247f5526 100644
--- a/stdnum/es/__init__.py
+++ b/stdnum/es/__init__.py
@@ -14,11 +14,11 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Spanish numbers."""
+from __future__ import annotations
+
# provide vat as an alias
from stdnum.es import nif as vat # noqa: F401
diff --git a/stdnum/es/cae.py b/stdnum/es/cae.py
new file mode 100644
index 00000000..2cfb3407
--- /dev/null
+++ b/stdnum/es/cae.py
@@ -0,0 +1,239 @@
+# cae.py - functions for handling Spanish CAE number
+# coding: utf-8
+#
+# Copyright (C) 2024 Quique Porta
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""CAE (Código de Actividad y Establecimiento, Spanish activity establishment code).
+
+The Código de Actividad y Establecimiento (CAE) is assigned by the Spanish
+Tax Agency companies or establishments that carry out activities related to
+products subject to excise duty. It identifies an activity and the
+establishment in which it is carried out.
+
+The number consists of 13 characters where the sixth and seventh characters
+identify the managing office in which the territorial registration is carried
+out and the eighth and ninth characters identify the activity that takes
+place.
+
+
+More information:
+
+* https://www.boe.es/boe/dias/2006/12/28/pdfs/A46098-46100.pdf
+* https://www2.agenciatributaria.gob.es/L/inwinvoc/es.aeat.dit.adu.adce.cae.cw.AccW?fAccion=consulta
+
+>>> validate('ES00008V1488Q')
+'ES00008V1488Q'
+>>> validate('00008V1488') # invalid check length
+Traceback (most recent call last):
+ ...
+InvalidLength: ...
+>>> is_valid('ES00008V1488Q')
+True
+>>> is_valid('00008V1488')
+False
+>>> compact('ES00008V1488Q')
+'ES00008V1488Q'
+"""
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+_OFFICES = {
+ '01', # Álava
+ '02', # Albacete
+ '03', # Alicante
+ '04', # Almería
+ '05', # Ávila
+ '06', # Badajoz
+ '07', # Illes Balears
+ '08', # Barcelona
+ '09', # Burgos
+ '10', # Cáceres
+ '11', # Cádiz
+ '12', # Castellón
+ '13', # Ciudad Real
+ '14', # Córdoba
+ '15', # A Coruña
+ '16', # Cuenca
+ '17', # Girona
+ '18', # Granada
+ '19', # Guadalajara
+ '20', # Guipúzcoa
+ '21', # Huelva
+ '22', # Huesca
+ '23', # Jaén
+ '24', # León
+ '25', # Lleida
+ '26', # La Rioja
+ '27', # Lugo
+ '28', # Madrid
+ '29', # Málaga
+ '30', # Murcia
+ '31', # Navarra
+ '32', # Ourense
+ '33', # Oviedo
+ '34', # Palencia
+ '35', # Las Palmas
+ '36', # Pontevedra
+ '37', # Salamanca
+ '38', # Santa Cruz de Tenerife
+ '39', # Santander
+ '40', # Segovia
+ '41', # Sevilla
+ '42', # Soria
+ '43', # Tarragona
+ '44', # Teruel
+ '45', # Toledo
+ '46', # Valencia
+ '47', # Valladolid
+ '48', # Bizcaia
+ '49', # Zamora
+ '50', # Zaragoza
+ '51', # Cartagena
+ '52', # Gijón
+ '53', # Jerez de la Frontera
+ '54', # Vigo
+ '55', # Ceuta
+ '56', # Melilla
+}
+
+_ACTIVITY_KEYS = {
+ 'A1', # Fábricas de alcohol
+ 'B1', # Fábricas de bebidas derivadas
+ 'B9', # Elaboradores de productos intermedios distintos de los comprendidos en B-0
+ 'B0', # Elaboradores de productos intermedios en régimen especial
+ 'BA', # Fábricas de bebidas alcohólicas
+ 'C1', # Fábricas de cerveza
+ 'DA', # Destiladores artesanales
+ 'EC', # Fábricas de extractos y concentrados alcohólicos
+ 'F1', # Elaboradores de otras bebidas fermentadas
+ 'V1', # Elaboradores de vinos
+ 'A7', # Depósitos fiscales de alcohol
+ 'AT', # Almacenes fiscales de alcohol
+ 'B7', # Depósitos fiscales de bebidas derivadas
+ 'BT', # Almacenes fiscales de bebidas alcohólicas
+ 'C7', # Depósitos fiscales de cerveza
+ 'DB', # Depósitos fiscales de bebidas alcohólicas
+ 'E7', # Depósitos fiscales de extractos y concentrados alcohólicos exclusivamente
+ 'M7', # Depósitos fiscales de productos intermedios
+ 'OA', # Operadores registrados de alcohol
+ 'OB', # Operadores registrados de bebidas alcohólicas
+ 'OE', # Operadores registrados de extractos y concentrados alcohólicos
+ 'OV', # Operadores registrados de vinos y de otras bebidas fermentadas
+ 'V7', # Depósitos fiscales de vinos y de otras bebidas fermentadas
+ 'B6', # Plantas embotelladoras de bebidas derivadas
+ 'A2', # Centros de investigación
+ 'A6', # Usuarios de alcohol totalmente desnaturalizado
+ 'A9', # Industrias de especialidades farmacéuticas
+ 'A0', # Centros de atención médica
+ 'AC', # Usuarios con derecho a devolución
+ 'AV', # Usuarios de alcohol parcialmente desnaturalizado con desnaturalizante general
+ 'AW', # Usuarios de alcohol parcialmente desnaturalizado con desnaturalizante especial
+ 'AX', # Fábricas de vinagre
+ 'H1', # Refinerías de crudo de petróleo
+ 'H2', # Fábricas de biocarburante, consistente en alcohol etílico
+ 'H4', # Fábricas de biocarburante o biocombustible con sistente en biodiesel
+ 'H6', # Fábricas de biocarburante o biocombustible con sistente en alcohol metílico
+ 'H9', # Industrias extractoras de gas natural y otros productos gaseosos
+ 'H0', # Las demás industrias que obtienen productos gravados
+ 'HD', # Industrias o establecimientos que someten productos a un tratamiento definido o,
+ # Previa solicitud, a una transformación química
+ 'HH', # Industrias extractoras de crudo de petróleo
+ 'H7', # Depósitos fiscales de hidrocarburos
+ 'H8', # Depósitos fiscales exclusivamente de biocarburantes
+ 'HB', # Obtención accesoria de productos sujetos alimpuesto
+ 'HF', # Almacenes fiscales para el suministro directo a instalaciones fijas
+ 'HI', # Depósitos fiscales exclusivamente para la distribución de querosenos y gasolinas de aviación
+ 'HJ', # Depósitos fiscales exclusivamente de productos de la tarifa segunda
+ 'HK', # Instalaciones de venta de gas natural con tipo general y tipo reducido
+ 'HL', # Almacenes fiscales exclusivamente de productos de la tarifa segunda
+ 'HM', # Almacenes fiscales para la gestión de aceites usados destinados a su utilización como combustibles
+ 'HN', # Depósitos fiscales constituidos por una red de oleoductos
+ 'HT', # Almacenes fiscales para el comercio al por mayor de hidrocarburos
+ 'HU', # Almacenes fiscales constituidos por redes de transporte o distribución de gas natural
+ 'HV', # Puntos de suministro marítimo de gasóleo
+ 'HX', # Depósitos fiscales constituidos por una red de gasoductos
+ 'HZ', # Detallistas de gasóleo
+ 'OH', # Operadores registrados de hidrocarburos
+ 'HA', # Titulares de aeronaves que utilizan instalaciones privadas
+ 'HC', # Explotaciones industriales y proyectos piloto con derecho a devolución
+ 'HE', # Los demás usuarios con derecho a exención
+ 'HP', # Inyección en altos hornos
+ 'HQ', # Construcción, modificación, pruebas y mantenimiento de aeronaves y embarcaciones
+ 'HR', # Producción de electricidad en centrales eléctricas o producción de electricidad o
+ # cogeneración de electricidad y de calor en centrales combinadas
+ 'HS', # Transporte por ferrocarril
+ 'HW', # Consumidores de combustibles y carburantes a tipo reducido (artículos 106.4 y 108
+ # del Reglamento de los Impuestos Especiales)
+ 'T1', # Fábricas de labores del tabaco
+ 'OT', # Operadores registrados de labores del tabaco
+ 'T7', # Depósitos fiscales de labores del tabaco
+ 'TT', # Almacenes fiscales de labores del tabaco
+ 'L1', # Fábricas de electricidad en régimen ordinario
+ 'L2', # Generadores o conjunto de generadores de potencia total superior a 100 kilovatios
+ 'L0', # Fábricas de electricidad en régimen especial
+ 'L3', # Los demás sujetos pasivos
+ 'L7', # Depósitos fiscales de electricidad
+ 'AF', # Almacenes fiscales de bebidas alcohólicas y de labores del tabaco
+ 'DF', # Depósitos fiscales de bebidas alcohólicas y de labores del tabaco
+ 'DM', # Depósitos fiscales de bebidas alcohólicas y de labores del tabaco situados en
+ # puertos y aeropuertos y que funcionen exclusivamente como establecimientos minoristas
+ 'DP', # Depósitos fiscales para el suministro de bebidas alcohólicas y de labores del
+ # tabaco para consumo o venta a bordo de buques y/o aeronaves
+ 'OR', # Operadores registrados de bebidas alcohólicas y de labores del tabaco
+ 'PF', # Industrias o usuarios en régimen de perfeccionamiento fiscal
+ 'RF', # Representantes fiscales
+ 'VD', # Empresas de ventas a distancia
+}
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the
+ number of any valid separators and removes surrounding whitespace."""
+ return clean(number).upper().strip()
+
+
+def validate(number: str) -> str:
+ """Check if the number provided is a valid CAE number. This checks the
+ length and formatting."""
+ number = compact(number)
+ if len(number) != 13:
+ raise InvalidLength()
+ if number[:2] != 'ES':
+ raise InvalidFormat()
+ if number[2:5] != '000':
+ raise InvalidFormat()
+ if number[5:7] not in _OFFICES:
+ raise InvalidFormat()
+ if number[7:9] not in _ACTIVITY_KEYS:
+ raise InvalidFormat()
+ if not isdigits(number[9:12]):
+ raise InvalidFormat()
+ if not number[12].isalpha():
+ raise InvalidFormat()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number provided is a valid CAE number. This checks the
+ length and formatting."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
diff --git a/stdnum/es/ccc.py b/stdnum/es/ccc.py
index 3306c200..952d2506 100644
--- a/stdnum/es/ccc.py
+++ b/stdnum/es/ccc.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CCC (Código Cuenta Corriente, Spanish Bank Account Code)
@@ -62,17 +60,19 @@
'ES2121000418450200051331'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip().upper()
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return ' '.join([
@@ -84,13 +84,13 @@ def format(number):
])
-def _calc_check_digit(number):
+def _calc_check_digit(number: str) -> str:
"""Calculate a single check digit on the provided part of the number."""
check = sum(int(n) * 2 ** i for i, n in enumerate(number)) % 11
return str(check if check < 2 else 11 - check)
-def calc_check_digits(number):
+def calc_check_digits(number: str) -> str:
"""Calculate the check digits for the number. The supplied number should
have check digits included but are ignored."""
number = compact(number)
@@ -98,7 +98,7 @@ def calc_check_digits(number):
_calc_check_digit('00' + number[:8]) + _calc_check_digit(number[10:]))
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid CCC."""
number = compact(number)
if len(number) != 20:
@@ -110,7 +110,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid CCC."""
try:
return bool(validate(number))
@@ -118,7 +118,7 @@ def is_valid(number):
return False
-def to_iban(number):
+def to_iban(number: str) -> str:
"""Convert the number to an IBAN."""
from stdnum import iban
separator = ' ' if ' ' in number else ''
diff --git a/stdnum/es/cif.py b/stdnum/es/cif.py
index 395db81c..4072d0e8 100644
--- a/stdnum/es/cif.py
+++ b/stdnum/es/cif.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CIF (Código de Identificación Fiscal, Spanish company tax number).
@@ -50,6 +48,8 @@
('A', '13', '58562', '5')
"""
+from __future__ import annotations
+
from stdnum import luhn
from stdnum.es import dni
from stdnum.exceptions import *
@@ -63,7 +63,7 @@
compact = dni.compact
-def calc_check_digits(number):
+def calc_check_digits(number: str) -> str:
"""Calculate the check digits for the specified number. The number
passed should not have the check digit included. This function returns
both the number and character check digit candidates."""
@@ -71,7 +71,7 @@ def calc_check_digits(number):
return check + 'JABCDEFGHI'[int(check)]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid DNI number. This checks the
length, formatting and check digit."""
number = compact(number)
@@ -91,7 +91,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid DNI number. This checks the
length, formatting and check digit."""
try:
@@ -100,7 +100,7 @@ def is_valid(number):
return False
-def split(number):
+def split(number: str) -> tuple[str, str, str, str]:
"""Split the provided number into a letter to define the type of
organisation, two digits that specify a province, a 5 digit sequence
number within the province and a check digit."""
diff --git a/stdnum/es/cups.py b/stdnum/es/cups.py
index cbbcacd2..59913d95 100644
--- a/stdnum/es/cups.py
+++ b/stdnum/es/cups.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""CUPS (Código Unificado de Punto de Suministro, Spanish meter point number).
@@ -53,17 +51,19 @@
'ES 1234 1234 5678 9012 JY 1F'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip().upper()
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return ' '.join((
@@ -77,14 +77,14 @@ def format(number):
)).strip()
-def calc_check_digits(number):
+def calc_check_digits(number: str) -> str:
"""Calculate the check digits for the number."""
alphabet = 'TRWAGMYFPDXBNJZSQVHLCKE'
check0, check1 = divmod(int(number[2:18]) % 529, 23)
return alphabet[check0] + alphabet[check1]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid CUPS. This checks length,
formatting and check digits."""
number = compact(number)
@@ -94,8 +94,8 @@ def validate(number):
raise InvalidComponent()
if not isdigits(number[2:18]):
raise InvalidFormat()
- if number[20:]:
- pnumber, ptype = number[20:]
+ if len(number) == 22:
+ pnumber, ptype = number[20], number[21]
if not isdigits(pnumber):
raise InvalidFormat()
if ptype not in 'FPRCXYZ':
@@ -105,7 +105,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid CUPS."""
try:
return bool(validate(number))
diff --git a/stdnum/es/dni.py b/stdnum/es/dni.py
index 379ac2f6..66979424 100644
--- a/stdnum/es/dni.py
+++ b/stdnum/es/dni.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""DNI (Documento Nacional de Identidad, Spanish personal identity codes).
@@ -38,23 +36,25 @@
InvalidLength: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').upper().strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should not have the
check digit included."""
return 'TRWAGMYFPDXBNJZSQVHLCKE'[int(number) % 23]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid DNI number. This checks the
length, formatting and check digit."""
number = compact(number)
@@ -67,7 +67,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid DNI number. This checks the
length, formatting and check digit."""
try:
diff --git a/stdnum/es/iban.py b/stdnum/es/iban.py
index 9c312969..b777f4c3 100644
--- a/stdnum/es/iban.py
+++ b/stdnum/es/iban.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Spanish IBAN (International Bank Account Number).
@@ -44,6 +42,8 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum import iban
from stdnum.es import ccc
from stdnum.exceptions import *
@@ -56,7 +56,7 @@
format = iban.format
-def to_ccc(number):
+def to_ccc(number: str) -> str:
"""Return the CCC (Código Cuenta Corriente) part of the number."""
number = compact(number)
if not number.startswith('ES'):
@@ -64,14 +64,14 @@ def to_ccc(number):
return number[4:]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid Spanish IBAN."""
number = iban.validate(number, check_country=False)
ccc.validate(to_ccc(number))
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid Spanish IBAN."""
try:
return bool(validate(number))
diff --git a/stdnum/es/nie.py b/stdnum/es/nie.py
index 0c0a73bf..400bc709 100644
--- a/stdnum/es/nie.py
+++ b/stdnum/es/nie.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""NIE (Número de Identificación de Extranjero, Spanish foreigner number).
@@ -40,6 +38,8 @@
InvalidLength: ...
"""
+from __future__ import annotations
+
from stdnum.es import dni
from stdnum.exceptions import *
from stdnum.util import isdigits
@@ -52,7 +52,7 @@
compact = dni.compact
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit. The number passed should not have the
check digit included."""
# replace XYZ with 012
@@ -60,7 +60,7 @@ def calc_check_digit(number):
return dni.calc_check_digit(number)
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid NIE. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -73,7 +73,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid NIE. This checks the length,
formatting and check digit."""
try:
diff --git a/stdnum/es/nif.py b/stdnum/es/nif.py
index 76f05706..7eb4c01b 100644
--- a/stdnum/es/nif.py
+++ b/stdnum/es/nif.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""NIF (Número de Identificación Fiscal, Spanish VAT number).
@@ -44,12 +42,14 @@
'M1234567L'
"""
+from __future__ import annotations
+
from stdnum.es import cif, dni, nie
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -').upper().strip()
@@ -58,7 +58,7 @@ def compact(number):
return number
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid VAT number. This checks the
length, formatting and check digit."""
number = compact(number)
@@ -85,7 +85,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid VAT number. This checks the
length, formatting and check digit."""
try:
diff --git a/stdnum/es/postal_code.py b/stdnum/es/postal_code.py
new file mode 100644
index 00000000..a9a4ab80
--- /dev/null
+++ b/stdnum/es/postal_code.py
@@ -0,0 +1,83 @@
+# postal_code.py - functions for handling Spanish postal code numbers
+# coding: utf-8
+#
+# Copyright (C) 2023 Víctor Ramos
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""Postcode (the Spanish postal code).
+
+The Spanish postal code consists of five digits where the first two digits,
+ranging 01 to 52, correspond either to one of the 50 provinces of Spain or to
+one of the two autonomous cities on the African coast.
+
+More information:
+
+* https://en.wikipedia.org/wiki/Postal_codes_in_Spain
+
+>>> validate('01000')
+'01000'
+>>> validate('52000')
+'52000'
+>>> validate('00000')
+Traceback (most recent call last):
+ ...
+InvalidComponent: ...
+>>> validate('53000')
+Traceback (most recent call last):
+ ...
+InvalidComponent: ...
+>>> validate('99999')
+Traceback (most recent call last):
+ ...
+InvalidComponent: ...
+>>> validate('5200')
+Traceback (most recent call last):
+ ...
+InvalidLength: ...
+>>> validate('520000')
+Traceback (most recent call last):
+ ...
+InvalidLength: ...
+"""
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation."""
+ return clean(number, ' ').strip()
+
+
+def validate(number: str) -> str:
+ """Check if the number provided is a valid postal code."""
+ number = compact(number)
+ if len(number) != 5:
+ raise InvalidLength()
+ if not isdigits(number):
+ raise InvalidFormat()
+ if not '01' <= number[:2] <= '52':
+ raise InvalidComponent()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number provided is a valid postal code."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
diff --git a/stdnum/es/referenciacatastral.py b/stdnum/es/referenciacatastral.py
index 8d5ee1fb..82c3d177 100644
--- a/stdnum/es/referenciacatastral.py
+++ b/stdnum/es/referenciacatastral.py
@@ -2,7 +2,7 @@
# coding: utf-8
#
# Copyright (C) 2016 David García Garzón
-# Copyright (C) 2016-2017 Arthur de Jong
+# Copyright (C) 2016-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Referencia Catastral (Spanish real estate property id)
@@ -32,8 +30,8 @@
More information:
-* http://www.catastro.meh.es/esp/referencia_catastral_1.asp (Spanish)
-* http://www.catastro.meh.es/documentos/05042010_P.pdf (Spanish)
+* https://www.catastro.meh.es/ (Spanish)
+* https://www.catastro.meh.es/documentos/05042010_P.pdf (Spanish)
* https://es.wikipedia.org/wiki/Catastro#Referencia_catastral
>>> validate('7837301-VG8173B-0001 TT') # Lanteira town hall
@@ -54,20 +52,22 @@
'4A08169 P03PRAT 0001 LR'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
-from stdnum.util import clean, to_unicode
+from stdnum.util import clean
-alphabet = u'ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789'
+alphabet = 'ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789'
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -').strip().upper()
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
return ' '.join([
@@ -81,7 +81,7 @@ def format(number):
# implementation by Vicente Sancho that can be found at
# https://trellat.es/validar-la-referencia-catastral-en-javascript/
-def _check_digit(number):
+def _check_digit(number: str) -> str:
"""Calculate a single check digit on the provided part of the number."""
weights = (13, 15, 12, 5, 4, 17, 9, 21, 3, 7, 1)
s = sum(w * (int(n) if n.isdigit() else alphabet.find(n) + 1)
@@ -89,29 +89,28 @@ def _check_digit(number):
return 'MQWERTYUIOPASDFGHJKLBZX'[s % 23]
-def calc_check_digits(number):
+def calc_check_digits(number: str) -> str:
"""Calculate the check digits for the number."""
- number = to_unicode(compact(number))
+ number = compact(number)
return (
_check_digit(number[0:7] + number[14:18]) +
_check_digit(number[7:14] + number[14:18]))
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid Cadastral Reference. This checks the
length, formatting and check digits."""
number = compact(number)
- n = to_unicode(number)
- if not all(c in alphabet for c in n):
+ if not all(c in alphabet for c in number):
raise InvalidFormat()
- if len(n) != 20:
+ if len(number) != 20:
raise InvalidLength()
- if calc_check_digits(n) != n[18:]:
+ if calc_check_digits(number) != number[18:]:
raise InvalidChecksum()
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid Cadastral Reference."""
try:
return bool(validate(number))
diff --git a/stdnum/eu/__init__.py b/stdnum/eu/__init__.py
index a00e8320..f76f0a21 100644
--- a/stdnum/eu/__init__.py
+++ b/stdnum/eu/__init__.py
@@ -14,8 +14,6 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of European Union numbers."""
diff --git a/stdnum/eu/at_02.py b/stdnum/eu/at_02.py
index a8fa9bca..610ef615 100644
--- a/stdnum/eu/at_02.py
+++ b/stdnum/eu/at_02.py
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""SEPA Identifier of the Creditor (AT-02).
@@ -38,6 +36,8 @@
'23'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.iso7064 import mod_97_10
from stdnum.util import clean
@@ -47,32 +47,32 @@
_alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-def compact(number):
+def compact(number: str) -> str:
"""Convert the AT-02 number to the minimal representation. This strips
the number of any valid separators and removes invalid characters."""
return clean(number, ' -/?:().m\'+"').strip().upper()
-def _to_base10(number):
+def _to_base10(number: str) -> str:
"""Prepare the number to its base10 representation so it can be checked
with the ISO 7064 Mod 97, 10 algorithm. That means excluding positions 5
to 7 and moving the first four digits to the end."""
return ''.join(str(_alphabet.index(x)) for x in number[7:] + number[:4])
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number provided is a valid AT-02."""
number = compact(number)
try:
test_number = _to_base10(number)
- except Exception:
+ except Exception: # noqa: B902
raise InvalidFormat()
# ensure that checksum is valid
mod_97_10.validate(test_number)
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number provided is a valid AT-02."""
try:
return bool(validate(number))
@@ -80,7 +80,7 @@ def is_valid(number):
return False
-def calc_check_digits(number):
+def calc_check_digits(number: str) -> str:
"""Calculate the check digits that should be put in the number to make it
valid. Check digits in the supplied number are ignored."""
number = compact(number)
diff --git a/stdnum/eu/banknote.py b/stdnum/eu/banknote.py
index 24860e0f..47f83ea6 100644
--- a/stdnum/eu/banknote.py
+++ b/stdnum/eu/banknote.py
@@ -13,9 +13,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Euro banknote serial numbers.
@@ -34,23 +32,25 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' ').upper().strip()
-def checksum(number):
+def checksum(number: str) -> int:
"""Calculate the checksum over the number."""
# replace letters by their ASCII number
return sum(int(x) if isdigits(x) else ord(x) for x in number) % 9
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid banknote serial number."""
number = compact(number)
if not number[:2].isalnum() or not isdigits(number[2:]):
@@ -64,7 +64,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid banknote serial number."""
try:
return bool(validate(number))
diff --git a/stdnum/eu/ecnumber.py b/stdnum/eu/ecnumber.py
new file mode 100644
index 00000000..5255c955
--- /dev/null
+++ b/stdnum/eu/ecnumber.py
@@ -0,0 +1,83 @@
+# ecnumber.py - functions for handling European Community Numbers
+
+# Copyright (C) 2023 Daniel Weber
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""EC Number (European Community number).
+
+The EC Number is a unique seven-digit number assigned to chemical substances
+for regulatory purposes within the European Union by the European Commission.
+
+More information:
+
+* https://en.wikipedia.org/wiki/European_Community_number
+
+>>> validate('200-001-8')
+'200-001-8'
+>>> validate('200-001-9')
+Traceback (most recent call last):
+ ...
+InvalidChecksum: ...
+>>> validate('20-0001-8')
+Traceback (most recent call last):
+ ...
+InvalidFormat: ...
+"""
+
+from __future__ import annotations
+
+import re
+
+from stdnum.exceptions import *
+from stdnum.util import clean
+
+
+_ec_number_re = re.compile(r'^[0-9]{3}-[0-9]{3}-[0-9]$')
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation."""
+ number = clean(number, ' ').strip()
+ if '-' not in number:
+ number = '-'.join((number[:3], number[3:6], number[6:]))
+ return number
+
+
+def calc_check_digit(number: str) -> str:
+ """Calculate the check digit for the number. The passed number should not
+ have the check digit included."""
+ number = compact(number).replace('-', '')
+ return str(
+ sum((i + 1) * int(n) for i, n in enumerate(number)) % 11)[0]
+
+
+def validate(number: str) -> str:
+ """Check if the number provided is a valid EC Number."""
+ number = compact(number)
+ if not len(number) == 9:
+ raise InvalidLength()
+ if not _ec_number_re.match(number):
+ raise InvalidFormat()
+ if number[-1] != calc_check_digit(number[:-1]):
+ raise InvalidChecksum()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number provided is a valid EC Number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
diff --git a/stdnum/eu/eic.py b/stdnum/eu/eic.py
index 63425183..47e69995 100644
--- a/stdnum/eu/eic.py
+++ b/stdnum/eu/eic.py
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""EIC (European Energy Identification Code).
@@ -44,6 +42,8 @@
InvalidFormat: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean
@@ -51,20 +51,20 @@
_alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-'
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding white space."""
return clean(number, ' ').strip()
-def calc_check_digit(number):
+def calc_check_digit(number: str) -> str:
"""Calculate the check digit for the number."""
number = compact(number)
s = sum((16 - i) * _alphabet.index(n) for i, n in enumerate(number[:15]))
return _alphabet[36 - ((s - 1) % 37)]
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is valid. This checks the length, format and check
digit."""
number = compact(number)
@@ -79,7 +79,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is valid. This checks the length, format and check
digit."""
try:
diff --git a/stdnum/eu/excise.py b/stdnum/eu/excise.py
new file mode 100644
index 00000000..736a22a9
--- /dev/null
+++ b/stdnum/eu/excise.py
@@ -0,0 +1,81 @@
+# excise.py - functions for handling EU Excise numbers
+# coding: utf-8
+#
+# Copyright (C) 2023 Cédric Krier
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""European Excise Number
+
+The excise duty identification number assigned to businesses authorised to
+operate with excise goods (e.g. alcohol, tobacco, energy products, etc.).
+
+The number is issued by the national customs or tax authority of the Member
+State where the business is established. The number consists of a two-letter
+country code followed by up to 13 alphanumeric characters.
+
+More information:
+
+* https://ec.europa.eu/taxation_customs/dds2/seed/
+
+>>> validate('LU 987ABC')
+'LU00000987ABC'
+"""
+
+from __future__ import annotations
+
+from stdnum.eu.vat import MEMBER_STATES
+from stdnum.exceptions import *
+from stdnum.util import NumberValidationModule, clean, get_cc_module
+
+
+_country_modules = dict()
+
+
+def _get_cc_module(cc: str) -> NumberValidationModule | None:
+ """Get the Excise number module based on the country code."""
+ cc = cc.lower()
+ if cc not in MEMBER_STATES:
+ raise InvalidComponent()
+ if cc not in _country_modules:
+ _country_modules[cc] = get_cc_module(cc, 'excise')
+ return _country_modules[cc]
+
+
+def compact(number: str) -> str:
+ """Convert the number to the minimal representation. This strips the number
+ of any valid separators and removes surrounding whitespace."""
+ number = clean(number, ' ').upper().strip()
+ if len(number) < 13:
+ number = number[:2] + number[2:].zfill(11)
+ return number
+
+
+def validate(number: str) -> str:
+ """Check if the number is a valid Excise number."""
+ number = compact(number)
+ if len(number) != 13:
+ raise InvalidLength()
+ module = _get_cc_module(number[:2])
+ if module:
+ module.validate(number)
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid excise number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
diff --git a/stdnum/eu/nace.py b/stdnum/eu/nace.py
index 91fc2a4a..e0c9db4c 100644
--- a/stdnum/eu/nace.py
+++ b/stdnum/eu/nace.py
@@ -1,7 +1,7 @@
# nace.py - functions for handling EU NACE classification
# coding: utf-8
#
-# Copyright (C) 2017-2019 Arthur de Jong
+# Copyright (C) 2017-2025 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""NACE (classification for businesses in the European Union).
@@ -27,18 +25,20 @@
The first 4 digits are the same in all EU countries while additional levels
and digits may be vary between countries. This module validates the numbers
-according to revision 2 and based on the registry as published by the EC.
+according to revision 2.1 (or 2.0 if that version is supplied) and based on
+the registry as published by the EC.
More information:
* https://en.wikipedia.org/wiki/Statistical_Classification_of_Economic_Activities_in_the_European_Community
* https://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM_DTL&StrNom=NACE_REV2&StrLanguageCode=EN&IntPcKey=&StrLayoutCode=HIERARCHIC
+* https://showvoc.op.europa.eu/#/datasets/ESTAT_Statistical_Classification_of_Economic_Activities_in_the_European_Community_Rev._2.1._%28NACE_2.1%29/data
>>> validate('A')
'A'
->>> validate('62.01')
+>>> validate('62.01', revision='2.0')
'6201'
->>> str(get_label('62.01'))
+>>> get_label('62.10')
'Computer programming activities'
>>> validate('62.05')
Traceback (most recent call last):
@@ -50,7 +50,9 @@
InvalidLength: ...
>>> format('6201')
'62.01'
-"""
+""" # noqa: E501
+
+from __future__ import annotations
import warnings
@@ -58,38 +60,43 @@
from stdnum.util import clean, isdigits
-def compact(number):
+# The revision of the NACE definition to use
+DEFAULT_REVISION = '2.1'
+
+
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, '.').strip()
-def info(number):
+def info(number: str, *, revision: str = DEFAULT_REVISION) -> dict[str, str]:
"""Lookup information about the specified NACE. This returns a dict."""
number = compact(number)
+ revision = revision.replace('.', '')
from stdnum import numdb
info = dict()
- for _n, i in numdb.get('eu/nace').info(number):
+ for _n, i in numdb.get(f'eu/nace{revision}').info(number):
if not i:
raise InvalidComponent()
info.update(i)
return info
-def get_label(number):
+def get_label(number: str, revision: str = DEFAULT_REVISION) -> str:
"""Lookup the category label for the number."""
- return info(number)['label']
+ return info(number, revision=revision)['label']
-def label(number): # pragma: no cover (deprecated function)
+def label(number: str) -> str: # pragma: no cover (deprecated function)
"""DEPRECATED: use `get_label()` instead.""" # noqa: D40
warnings.warn(
'label() has been to get_label()',
DeprecationWarning, stacklevel=2)
- return get_label(number)
+ return get_label(number, revision='2.0')
-def validate(number):
+def validate(number: str, revision: str = DEFAULT_REVISION) -> str:
"""Check if the number is a valid NACE. This checks the format and
searches the registry to see if it exists."""
number = compact(number)
@@ -101,19 +108,19 @@ def validate(number):
else:
if not isdigits(number):
raise InvalidFormat()
- info(number)
+ info(number, revision=revision)
return number
-def is_valid(number):
+def is_valid(number: str, revision: str = DEFAULT_REVISION) -> bool:
"""Check if the number is a valid NACE. This checks the format and
searches the registry to see if it exists."""
try:
- return bool(validate(number))
+ return bool(validate(number, revision=revision))
except ValidationError:
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
return '.'.join((number[:2], number[2:])).strip('.')
diff --git a/stdnum/eu/nace.dat b/stdnum/eu/nace20.dat
similarity index 99%
rename from stdnum/eu/nace.dat
rename to stdnum/eu/nace20.dat
index 2c0ed855..cb81a329 100644
--- a/stdnum/eu/nace.dat
+++ b/stdnum/eu/nace20.dat
@@ -1,4 +1,4 @@
-# generated from NACE_REV2_20200809_170835.xml, downloaded from
+# generated from NACE_REV2_20221113_175805.xml, downloaded from
# https://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=ACT_OTH_CLS_DLD&StrNom=NACE_REV2&StrFormat=XML&StrLanguageCode=EN
# NACE_REV2: Statistical Classification of Economic Activities in the European Community, Rev. 2 (2008)
A label="AGRICULTURE, FORESTRY AND FISHING" isic="A"
diff --git a/stdnum/eu/nace21.dat b/stdnum/eu/nace21.dat
new file mode 100644
index 00000000..d2210dca
--- /dev/null
+++ b/stdnum/eu/nace21.dat
@@ -0,0 +1,1050 @@
+# generated from NACE_Rev2.1_Heading_All_Languages.tsv, downloaded from
+# https://showvoc.op.europa.eu/#/datasets/ESTAT_Statistical_Classification_of_Economic_Activities_in_the_European_Community_Rev._2.1._%28NACE_2.1%29/downloads
+# NACE_REV2.1: Statistical Classification of Economic Activities in the European Community, Rev. 2.1 (2025)
+A label="AGRICULTURE, FORESTRY AND FISHING" isic="A"
+01 section="A" label="Crop and animal production, hunting and related service activities" isic="01"
+ 1 label="Growing of non-perennial crops" isic="011"
+ 1 label="Growing of cereals, other than rice, leguminous crops and oil seeds" isic="0111"
+ 2 label="Growing of rice" isic="0112"
+ 3 label="Growing of vegetables and melons, roots and tubers" isic="0113"
+ 4 label="Growing of sugar cane" isic="0114"
+ 5 label="Growing of tobacco" isic="0115"
+ 6 label="Growing of fibre crops" isic="0116"
+ 9 label="Growing of other non-perennial crops" isic="0119"
+ 2 label="Growing of perennial crops" isic="012"
+ 1 label="Growing of grapes" isic="0121"
+ 2 label="Growing of tropical and subtropical fruits" isic="0122"
+ 3 label="Growing of citrus fruits" isic="0123"
+ 4 label="Growing of pome fruits and stone fruits" isic="0124"
+ 5 label="Growing of other tree and bush fruits and nuts" isic="0125"
+ 6 label="Growing of oleaginous fruits" isic="0126"
+ 7 label="Growing of beverage crops" isic="0127"
+ 8 label="Growing of spices, aromatic, drug and pharmaceutical crops" isic="0128"
+ 9 label="Growing of other perennial crops" isic="0129"
+ 3 label="Plant propagation" isic="013"
+ 0 label="Plant propagation" isic="0130"
+ 4 label="Animal production" isic="014"
+ 1 label="Raising of dairy cattle" isic="0141"
+ 2 label="Raising of other cattle and buffaloes" isic="0142"
+ 3 label="Raising of horses and other equines" isic="0143"
+ 4 label="Raising of camels and camelids" isic="0144"
+ 5 label="Raising of sheep and goats" isic="0145"
+ 6 label="Raising of swine and pigs" isic="0146"
+ 7 label="Raising of poultry" isic="0147"
+ 8 label="Raising of other animals" isic="0148"
+ 5 label="Mixed farming" isic="015"
+ 0 label="Mixed farming" isic="0150"
+ 6 label="Support activities to agriculture and post-harvest crop activities" isic="016"
+ 1 label="Support activities for crop production" isic="0161"
+ 2 label="Support activities for animal production" isic="0162"
+ 3 label="Post-harvest crop activities and seed processing for propagation" isic="0163"
+ 7 label="Hunting, trapping and related service activities" isic="017"
+ 0 label="Hunting, trapping and related service activities" isic="0170"
+02 section="A" label="Forestry and logging" isic="02"
+ 1 label="Silviculture and other forestry activities" isic="021"
+ 0 label="Silviculture and other forestry activities" isic="0210"
+ 2 label="Logging" isic="022"
+ 0 label="Logging" isic="0220"
+ 3 label="Gathering of wild growing non-wood products" isic="023"
+ 0 label="Gathering of wild growing non-wood products" isic="0230"
+ 4 label="Support services to forestry" isic="024"
+ 0 label="Support services to forestry" isic="0240"
+03 section="A" label="Fishing and aquaculture" isic="03"
+ 1 label="Fishing" isic="031"
+ 1 label="Marine fishing" isic="0311"
+ 2 label="Freshwater fishing" isic="0312"
+ 2 label="Aquaculture" isic="032"
+ 1 label="Marine aquaculture" isic="0321"
+ 2 label="Freshwater aquaculture" isic="0322"
+ 3 label="Support activities for fishing and aquaculture" isic="033"
+ 0 label="Support activities for fishing and aquaculture" isic="0330"
+B label="MINING AND QUARRYING" isic="B"
+05 section="B" label="Mining of coal and lignite" isic="05"
+ 1 label="Mining of hard coal" isic="051"
+ 0 label="Mining of hard coal" isic="0510"
+ 2 label="Mining of lignite" isic="052"
+ 0 label="Mining of lignite" isic="0520"
+06 section="B" label="Extraction of crude petroleum and natural gas" isic="06"
+ 1 label="Extraction of crude petroleum" isic="061"
+ 0 label="Extraction of crude petroleum" isic="0610"
+ 2 label="Extraction of natural gas" isic="062"
+ 0 label="Extraction of natural gas" isic="0620"
+07 section="B" label="Mining of metal ores" isic="07"
+ 1 label="Mining of iron ores" isic="071"
+ 0 label="Mining of iron ores" isic="0710"
+ 2 label="Mining of non-ferrous metal ores" isic="072"
+ 1 label="Mining of uranium and thorium ores" isic="0721"
+ 9 label="Mining of other non-ferrous metal ores" isic="0729"
+08 section="B" label="Other mining and quarrying" isic="08"
+ 1 label="Quarrying of stone, sand and clay" isic="081"
+ 1 label="Quarrying of ornamental stone, limestone, gypsum, slate and other stone" isic="0811"
+ 2 label="Operation of gravel and sand pits and mining of clay and kaolin" isic="0812"
+ 9 label="Mining and quarrying n.e.c." isic="089"
+ 1 label="Mining of chemical and fertiliser minerals" isic="0891"
+ 2 label="Extraction of peat" isic="0892"
+ 3 label="Extraction of salt" isic="0893"
+ 9 label="Other mining and quarrying n.e.c." isic="0899"
+09 section="B" label="Mining support service activities" isic="09"
+ 1 label="Support activities for petroleum and natural gas extraction" isic="091"
+ 0 label="Support activities for petroleum and natural gas extraction" isic="0910"
+ 9 label="Support activities for other mining and quarrying" isic="099"
+ 0 label="Support activities for other mining and quarrying" isic="0990"
+C label="MANUFACTURING" isic="C"
+10 section="C" label="Manufacture of food products" isic="10"
+ 1 label="Processing and preserving of meat and production of meat products" isic="101"
+ 1 label="Processing and preserving of meat, except of poultry meat" isic="1011"
+ 2 label="Processing and preserving of poultry meat" isic="1012"
+ 3 label="Production of meat and poultry meat products" isic="1013"
+ 2 label="Processing and preserving of fish, crustaceans and molluscs" isic="102"
+ 0 label="Processing and preserving of fish, crustaceans and molluscs" isic="1020"
+ 3 label="Processing and preserving of fruit and vegetables" isic="103"
+ 1 label="Processing and preserving of potatoes" isic="1031"
+ 2 label="Manufacture of fruit and vegetable juice" isic="1032"
+ 9 label="Other processing and preserving of fruit and vegetables" isic="1039"
+ 4 label="Manufacture of vegetable and animal oils and fats" isic="104"
+ 1 label="Manufacture of oils and fats" isic="1041"
+ 2 label="Manufacture of margarine and similar edible fats" isic="1042"
+ 5 label="Manufacture of dairy products and edible ice" isic="105"
+ 1 label="Manufacture of dairy products" isic="1051"
+ 2 label="Manufacture of ice cream and other edible ice" isic="1052"
+ 6 label="Manufacture of grain mill products, starches and starch products" isic="106"
+ 1 label="Manufacture of grain mill products" isic="1061"
+ 2 label="Manufacture of starches and starch products" isic="1062"
+ 7 label="Manufacture of bakery and farinaceous products" isic="107"
+ 1 label="Manufacture of bread; manufacture of fresh pastry goods and cakes" isic="1071"
+ 2 label="Manufacture of rusks, biscuits, preserved pastries and cakes" isic="1072"
+ 3 label="Manufacture of farinaceous products" isic="1073"
+ 8 label="Manufacture of other food products" isic="108"
+ 1 label="Manufacture of sugar" isic="1081"
+ 2 label="Manufacture of cocoa, chocolate and sugar confectionery" isic="1082"
+ 3 label="Processing of tea and coffee" isic="1083"
+ 4 label="Manufacture of condiments and seasonings" isic="1084"
+ 5 label="Manufacture of prepared meals and dishes" isic="1085"
+ 6 label="Manufacture of homogenised food preparations and dietetic food" isic="1086"
+ 9 label="Manufacture of other food products n.e.c." isic="1089"
+ 9 label="Manufacture of prepared animal feeds" isic="109"
+ 1 label="Manufacture of prepared feeds for farm animals" isic="1091"
+ 2 label="Manufacture of prepared pet foods" isic="1092"
+11 section="C" label="Manufacture of beverages" isic="11"
+ 0 label="Manufacture of beverages" isic="110"
+ 1 label="Distilling, rectifying and blending of spirits" isic="1101"
+ 2 label="Manufacture of wine from grape" isic="1102"
+ 3 label="Manufacture of cider and other fruit fermented beverages" isic="1103"
+ 4 label="Manufacture of other non-distilled fermented beverages" isic="1104"
+ 5 label="Manufacture of beer" isic="1105"
+ 6 label="Manufacture of malt" isic="1106"
+ 7 label="Manufacture of soft drinks and bottled waters" isic="1107"
+12 section="C" label="Manufacture of tobacco products" isic="12"
+ 0 label="Manufacture of tobacco products" isic="120"
+ 0 label="Manufacture of tobacco products" isic="1200"
+13 section="C" label="Manufacture of textiles" isic="13"
+ 1 label="Preparation and spinning of textile fibres" isic="131"
+ 0 label="Preparation and spinning of textile fibres" isic="1310"
+ 2 label="Weaving of textiles" isic="132"
+ 0 label="Weaving of textiles" isic="1320"
+ 3 label="Finishing of textiles" isic="133"
+ 0 label="Finishing of textiles" isic="1330"
+ 9 label="Manufacture of other textiles" isic="139"
+ 1 label="Manufacture of knitted and crocheted fabrics" isic="1391"
+ 2 label="Manufacture of household textiles and made-up furnishing articles" isic="1392"
+ 3 label="Manufacture of carpets and rugs" isic="1393"
+ 4 label="Manufacture of cordage, rope, twine and netting" isic="1394"
+ 5 label="Manufacture of non-wovens and non-woven articles" isic="1395"
+ 6 label="Manufacture of other technical and industrial textiles" isic="1396"
+ 9 label="Manufacture of other textiles n.e.c." isic="1399"
+14 section="C" label="Manufacture of wearing apparel" isic="14"
+ 1 label="Manufacture of knitted and crocheted apparel" isic="141"
+ 0 label="Manufacture of knitted and crocheted apparel" isic="1410"
+ 2 label="Manufacture of other wearing apparel and accessories" isic="142"
+ 1 label="Manufacture of outerwear" isic="1421"
+ 2 label="Manufacture of underwear" isic="1422"
+ 3 label="Manufacture of workwear" isic="1423"
+ 4 label="Manufacture of leather clothes and fur apparel" isic="1424"
+ 9 label="Manufacture of other wearing apparel and accessories n.e.c." isic="1429"
+15 section="C" label="Manufacture of leather and related products of other materials" isic="15"
+ 1 label="Tanning, dyeing, dressing of leather and fur; manufacture of luggage, handbags, saddlery and harness" isic="151"
+ 1 label="Tanning, dressing, dyeing of leather and fur" isic="1511"
+ 2 label="Manufacture of luggage, handbags, saddlery and harness of any material" isic="1512"
+ 2 label="Manufacture of footwear" isic="152"
+ 0 label="Manufacture of footwear" isic="1520"
+16 section="C" label="Manufacture of wood and of products of wood and cork, except furniture; manufacture of articles of straw and plaiting materials" isic="16"
+ 1 label="Sawmilling and planing of wood; processing and finishing of wood" isic="161"
+ 1 label="Sawmilling and planing of wood" isic="1611"
+ 2 label="Processing and finishing of wood" isic="1612"
+ 2 label="Manufacture of products of wood, cork, straw and plaiting materials" isic="162"
+ 1 label="Manufacture of veneer sheets and wood-based panels" isic="1621"
+ 2 label="Manufacture of assembled parquet floors" isic="1622"
+ 3 label="Manufacture of other builders' carpentry and joinery" isic="1623"
+ 4 label="Manufacture of wooden containers" isic="1624"
+ 5 label="Manufacture of doors and windows of wood" isic="1625"
+ 6 label="Manufacture of solid fuels from vegetable biomass" isic="1626"
+ 7 label="Finishing of wooden products" isic="1627"
+ 8 label="Manufacture of other products of wood and articles of cork, straw and plaiting materials" isic="1628"
+17 section="C" label="Manufacture of paper and paper products" isic="17"
+ 1 label="Manufacture of pulp, paper and paperboard" isic="171"
+ 1 label="Manufacture of pulp" isic="1711"
+ 2 label="Manufacture of paper and paperboard" isic="1712"
+ 2 label="Manufacture of articles of paper and paperboard" isic="172"
+ 1 label="Manufacture of corrugated paper, paperboard and containers of paper and paperboard" isic="1721"
+ 2 label="Manufacture of household and sanitary goods and of toilet requisites" isic="1722"
+ 3 label="Manufacture of paper stationery" isic="1723"
+ 4 label="Manufacture of wallpaper" isic="1724"
+ 5 label="Manufacture of other articles of paper and paperboard" isic="1725"
+18 section="C" label="Printing and reproduction of recorded media" isic="18"
+ 1 label="Printing and service activities related to printing" isic="181"
+ 1 label="Printing of newspapers" isic="1811"
+ 2 label="Other printing" isic="1812"
+ 3 label="Pre-press and pre-media services" isic="1813"
+ 4 label="Binding and related services" isic="1814"
+ 2 label="Reproduction of recorded media" isic="182"
+ 0 label="Reproduction of recorded media" isic="1820"
+19 section="C" label="Manufacture of coke and refined petroleum products" isic="19"
+ 1 label="Manufacture of coke oven products" isic="191"
+ 0 label="Manufacture of coke oven products" isic="1910"
+ 2 label="Manufacture of refined petroleum products and fossil fuel products" isic="192"
+ 0 label="Manufacture of refined petroleum products and fossil fuel products" isic="1920"
+20 section="C" label="Manufacture of chemicals and chemical products" isic="20"
+ 1 label="Manufacture of basic chemicals, fertilisers and nitrogen compounds, plastics and synthetic rubber in primary forms" isic="201"
+ 1 label="Manufacture of industrial gases" isic="2011"
+ 2 label="Manufacture of dyes and pigments" isic="2012"
+ 3 label="Manufacture of other inorganic basic chemicals" isic="2013"
+ 4 label="Manufacture of other organic basic chemicals" isic="2014"
+ 5 label="Manufacture of fertilisers and nitrogen compounds" isic="2015"
+ 6 label="Manufacture of plastics in primary forms" isic="2016"
+ 7 label="Manufacture of synthetic rubber in primary forms" isic="2017"
+ 2 label="Manufacture of pesticides, disinfectants and other agrochemical products" isic="202"
+ 0 label="Manufacture of pesticides, disinfectants and other agrochemical products" isic="2020"
+ 3 label="Manufacture of paints, varnishes and similar coatings, printing ink and mastics" isic="203"
+ 0 label="Manufacture of paints, varnishes and similar coatings, printing ink and mastics" isic="2030"
+ 4 label="Manufacture of washing, cleaning and polishing preparations" isic="204"
+ 1 label="Manufacture of soap and detergents, cleaning and polishing preparations" isic="2041"
+ 2 label="Manufacture of perfumes and toilet preparations" isic="2042"
+ 5 label="Manufacture of other chemical products" isic="205"
+ 1 label="Manufacture of liquid biofuels" isic="2051"
+ 9 label="Manufacture of other chemical products n.e.c." isic="2059"
+ 6 label="Manufacture of man-made fibres" isic="206"
+ 0 label="Manufacture of man-made fibres" isic="2060"
+21 section="C" label="Manufacture of basic pharmaceutical products and pharmaceutical preparations" isic="21"
+ 1 label="Manufacture of basic pharmaceutical products" isic="211"
+ 0 label="Manufacture of basic pharmaceutical products" isic="2110"
+ 2 label="Manufacture of pharmaceutical preparations" isic="212"
+ 0 label="Manufacture of pharmaceutical preparations" isic="2120"
+22 section="C" label="Manufacture of rubber and plastic products" isic="22"
+ 1 label="Manufacture of rubber products" isic="221"
+ 1 label="Manufacture, retreading and rebuilding of rubber tyres and manufacture of tubes" isic="2211"
+ 2 label="Manufacture of other rubber products" isic="2212"
+ 2 label="Manufacture of plastic products" isic="222"
+ 1 label="Manufacture of plastic plates, sheets, tubes and profiles" isic="2221"
+ 2 label="Manufacture of plastic packing goods" isic="2222"
+ 3 label="Manufacture of doors and windows of plastic" isic="2223"
+ 4 label="Manufacture of builders’ ware of plastic" isic="2224"
+ 5 label="Processing and finishing of plastic products" isic="2225"
+ 6 label="Manufacture of other plastic products" isic="2226"
+23 section="C" label="Manufacture of other non-metallic mineral products" isic="23"
+ 1 label="Manufacture of glass and glass products" isic="231"
+ 1 label="Manufacture of flat glass" isic="2311"
+ 2 label="Shaping and processing of flat glass" isic="2312"
+ 3 label="Manufacture of hollow glass" isic="2313"
+ 4 label="Manufacture of glass fibres" isic="2314"
+ 5 label="Manufacture and processing of other glass, including technical glassware" isic="2315"
+ 2 label="Manufacture of refractory products" isic="232"
+ 0 label="Manufacture of refractory products" isic="2320"
+ 3 label="Manufacture of clay building materials" isic="233"
+ 1 label="Manufacture of ceramic tiles and flags" isic="2331"
+ 2 label="Manufacture of bricks, tiles and construction products, in baked clay" isic="2332"
+ 4 label="Manufacture of other porcelain and ceramic products" isic="234"
+ 1 label="Manufacture of ceramic household and ornamental articles" isic="2341"
+ 2 label="Manufacture of ceramic sanitary fixtures" isic="2342"
+ 3 label="Manufacture of ceramic insulators and insulating fittings" isic="2343"
+ 4 label="Manufacture of other technical ceramic products" isic="2344"
+ 5 label="Manufacture of other ceramic products" isic="2345"
+ 5 label="Manufacture of cement, lime and plaster" isic="235"
+ 1 label="Manufacture of cement" isic="2351"
+ 2 label="Manufacture of lime and plaster" isic="2352"
+ 6 label="Manufacture of articles of concrete, cement and plaster" isic="236"
+ 1 label="Manufacture of concrete products for construction purposes" isic="2361"
+ 2 label="Manufacture of plaster products for construction purposes" isic="2362"
+ 3 label="Manufacture of ready-mixed concrete" isic="2363"
+ 4 label="Manufacture of mortars" isic="2364"
+ 5 label="Manufacture of fibre cement" isic="2365"
+ 6 label="Manufacture of other articles of concrete, cement and plaster" isic="2366"
+ 7 label="Cutting, shaping and finishing of stone" isic="237"
+ 0 label="Cutting, shaping and finishing of stone" isic="2370"
+ 9 label="Manufacture of abrasive products and non-metallic mineral products n.e.c." isic="239"
+ 1 label="Manufacture of abrasive products" isic="2391"
+ 9 label="Manufacture of other non-metallic mineral products n.e.c." isic="2399"
+24 section="C" label="Manufacture of basic metals" isic="24"
+ 1 label="Manufacture of basic iron and steel and of ferro-alloys" isic="241"
+ 0 label="Manufacture of basic iron and steel and of ferro-alloys" isic="2410"
+ 2 label="Manufacture of tubes, pipes, hollow profiles and related fittings, of steel" isic="242"
+ 0 label="Manufacture of tubes, pipes, hollow profiles and related fittings, of steel" isic="2420"
+ 3 label="Manufacture of other products of first processing of steel" isic="243"
+ 1 label="Cold drawing of bars" isic="2431"
+ 2 label="Cold rolling of narrow strip" isic="2432"
+ 3 label="Cold forming or folding" isic="2433"
+ 4 label="Cold drawing of wire" isic="2434"
+ 4 label="Manufacture of basic precious and other non-ferrous metals" isic="244"
+ 1 label="Precious metals production" isic="2441"
+ 2 label="Aluminium production" isic="2442"
+ 3 label="Lead, zinc and tin production" isic="2443"
+ 4 label="Copper production" isic="2444"
+ 5 label="Other non-ferrous metal production" isic="2445"
+ 6 label="Processing of nuclear fuel" isic="2446"
+ 5 label="Casting of metals" isic="245"
+ 1 label="Casting of iron" isic="2451"
+ 2 label="Casting of steel" isic="2452"
+ 3 label="Casting of light metals" isic="2453"
+ 4 label="Casting of other non-ferrous metals" isic="2454"
+25 section="C" label="Manufacture of fabricated metal products, except machinery and equipment" isic="25"
+ 1 label="Manufacture of structural metal products" isic="251"
+ 1 label="Manufacture of metal structures and parts of structures" isic="2511"
+ 2 label="Manufacture of doors and windows of metal" isic="2512"
+ 2 label="Manufacture of tanks, reservoirs and containers of metal" isic="252"
+ 1 label="Manufacture of central heating radiators, steam generators and boilers" isic="2521"
+ 2 label="Manufacture of other tanks, reservoirs and containers of metal" isic="2522"
+ 3 label="Manufacture of weapons and ammunition" isic="253"
+ 0 label="Manufacture of weapons and ammunition" isic="2530"
+ 4 label="Forging and shaping metal and powder metallurgy" isic="254"
+ 0 label="Forging and shaping metal and powder metallurgy" isic="2540"
+ 5 label="Treatment and coating of metals; machining" isic="255"
+ 1 label="Coating of metals" isic="2551"
+ 2 label="Heat treatment of metals" isic="2552"
+ 3 label="Machining of metals" isic="2553"
+ 6 label="Manufacture of cutlery, tools and general hardware" isic="256"
+ 1 label="Manufacture of cutlery" isic="2561"
+ 2 label="Manufacture of locks and hinges" isic="2562"
+ 3 label="Manufacture of tools" isic="2563"
+ 9 label="Manufacture of other fabricated metal products" isic="259"
+ 1 label="Manufacture of steel drums and similar containers" isic="2591"
+ 2 label="Manufacture of light metal packaging" isic="2592"
+ 3 label="Manufacture of wire products, chain and springs" isic="2593"
+ 4 label="Manufacture of fasteners and screw machine products" isic="2594"
+ 9 label="Manufacture of other fabricated metal products n.e.c." isic="2599"
+26 section="C" label="Manufacture of computer, electronic and optical products" isic="26"
+ 1 label="Manufacture of electronic components and boards" isic="261"
+ 1 label="Manufacture of electronic components" isic="2611"
+ 2 label="Manufacture of loaded electronic boards" isic="2612"
+ 2 label="Manufacture of computers and peripheral equipment" isic="262"
+ 0 label="Manufacture of computers and peripheral equipment" isic="2620"
+ 3 label="Manufacture of communication equipment" isic="263"
+ 0 label="Manufacture of communication equipment" isic="2630"
+ 4 label="Manufacture of consumer electronics" isic="264"
+ 0 label="Manufacture of consumer electronics" isic="2640"
+ 5 label="Manufacture of measuring testing instruments, clocks and watches" isic="265"
+ 1 label="Manufacture of instruments and appliances for measuring, testing and navigation" isic="2651"
+ 2 label="Manufacture of watches and clocks" isic="2652"
+ 6 label="Manufacture of irradiation, electromedical and electrotherapeutic equipment" isic="266"
+ 0 label="Manufacture of irradiation, electromedical and electrotherapeutic equipment" isic="2660"
+ 7 label="Manufacture of optical instruments, magnetic and optical media and photographic equipment" isic="267"
+ 0 label="Manufacture of optical instruments, magnetic and optical media and photographic equipment" isic="2670"
+27 section="C" label="Manufacture of electrical equipment" isic="27"
+ 1 label="Manufacture of electric motors, generators, transformers and electricity distribution and control apparatus" isic="271"
+ 1 label="Manufacture of electric motors, generators and transformers" isic="2711"
+ 2 label="Manufacture of electricity distribution and control apparatus" isic="2712"
+ 2 label="Manufacture of batteries and accumulators" isic="272"
+ 0 label="Manufacture of batteries and accumulators" isic="2720"
+ 3 label="Manufacture of wiring and wiring devices" isic="273"
+ 1 label="Manufacture of fibre optic cables" isic="2731"
+ 2 label="Manufacture of other electronic and electric wires and cables" isic="2732"
+ 3 label="Manufacture of wiring devices" isic="2733"
+ 4 label="Manufacture of lighting equipment" isic="274"
+ 0 label="Manufacture of lighting equipment" isic="2740"
+ 5 label="Manufacture of domestic appliances" isic="275"
+ 1 label="Manufacture of electric domestic appliances" isic="2751"
+ 2 label="Manufacture of non-electric domestic appliances" isic="2752"
+ 9 label="Manufacture of other electrical equipment" isic="279"
+ 0 label="Manufacture of other electrical equipment" isic="2790"
+28 section="C" label="Manufacture of machinery and equipment n.e.c." isic="28"
+ 1 label="Manufacture of general-purpose machinery" isic="281"
+ 1 label="Manufacture of engines and turbines, except aircraft, vehicle and cycle engines" isic="2811"
+ 2 label="Manufacture of fluid power equipment" isic="2812"
+ 3 label="Manufacture of other pumps and compressors" isic="2813"
+ 4 label="Manufacture of other taps and valves" isic="2814"
+ 5 label="Manufacture of bearings, gears, gearing and driving elements" isic="2815"
+ 2 label="Manufacture of other general-purpose machinery" isic="282"
+ 1 label="Manufacture of ovens, furnaces and permanent household heating equipment" isic="2821"
+ 2 label="Manufacture of lifting and handling equipment" isic="2822"
+ 3 label="Manufacture of office machinery and equipment, except computers and peripheral equipment" isic="2823"
+ 4 label="Manufacture of power-driven hand tools" isic="2824"
+ 5 label="Manufacture of non-domestic air conditioning equipment" isic="2825"
+ 9 label="Manufacture of other general-purpose machinery n.e.c." isic="2829"
+ 3 label="Manufacture of agricultural and forestry machinery" isic="283"
+ 0 label="Manufacture of agricultural and forestry machinery" isic="2830"
+ 4 label="Manufacture of metal forming machinery and machine tools" isic="284"
+ 1 label="Manufacture of metal forming machinery and machine tools for metal work" isic="2841"
+ 2 label="Manufacture of other machine tools" isic="2842"
+ 9 label="Manufacture of other special-purpose machinery" isic="289"
+ 1 label="Manufacture of machinery for metallurgy" isic="2891"
+ 2 label="Manufacture of machinery for mining, quarrying and construction" isic="2892"
+ 3 label="Manufacture of machinery for food, beverage and tobacco processing" isic="2893"
+ 4 label="Manufacture of machinery for textile, apparel and leather production" isic="2894"
+ 5 label="Manufacture of machinery for paper and paperboard production" isic="2895"
+ 6 label="Manufacture of plastics and rubber machinery" isic="2896"
+ 7 label="Manufacture of additive manufacturing machinery" isic="2897"
+ 9 label="Manufacture of other special-purpose machinery n.e.c." isic="2899"
+29 section="C" label="Manufacture of motor vehicles, trailers and semi-trailers" isic="29"
+ 1 label="Manufacture of motor vehicles" isic="291"
+ 0 label="Manufacture of motor vehicles" isic="2910"
+ 2 label="Manufacture of bodies and coachwork for motor vehicles; manufacture of trailers and semi-trailers" isic="292"
+ 0 label="Manufacture of bodies and coachwork for motor vehicles; manufacture of trailers and semi-trailers" isic="2920"
+ 3 label="Manufacture of motor vehicle parts and accessories" isic="293"
+ 1 label="Manufacture of electrical and electronic equipment for motor vehicles" isic="2931"
+ 2 label="Manufacture of other parts and accessories for motor vehicles" isic="2932"
+30 section="C" label="Manufacture of other transport equipment" isic="30"
+ 1 label="Building of ships and boats" isic="301"
+ 1 label="Building of civilian ships and floating structures" isic="3011"
+ 2 label="Building of pleasure and sporting boats" isic="3012"
+ 3 label="Building of military ships and vessels" isic="3013"
+ 2 label="Manufacture of railway locomotives and rolling stock" isic="302"
+ 0 label="Manufacture of railway locomotives and rolling stock" isic="3020"
+ 3 label="Manufacture of air and spacecraft and related machinery" isic="303"
+ 1 label="Manufacture of civilian air and spacecraft and related machinery" isic="3031"
+ 2 label="Manufacture of military air and spacecraft and related machinery" isic="3032"
+ 4 label="Manufacture of military fighting vehicles" isic="304"
+ 0 label="Manufacture of military fighting vehicles" isic="3040"
+ 9 label="Manufacture of transport equipment n.e.c." isic="309"
+ 1 label="Manufacture of motorcycles" isic="3091"
+ 2 label="Manufacture of bicycles and invalid carriages" isic="3092"
+ 9 label="Manufacture of other transport equipment n.e.c." isic="3099"
+31 section="C" label="Manufacture of furniture" isic="31"
+ 0 label="Manufacture of furniture" isic="310"
+ 0 label="Manufacture of furniture" isic="3100"
+32 section="C" label="Other manufacturing" isic="32"
+ 1 label="Manufacture of jewellery, bijouterie and related articles" isic="321"
+ 1 label="Striking of coins" isic="3211"
+ 2 label="Manufacture of jewellery and related articles" isic="3212"
+ 3 label="Manufacture of imitation jewellery and related articles" isic="3213"
+ 2 label="Manufacture of musical instruments" isic="322"
+ 0 label="Manufacture of musical instruments" isic="3220"
+ 3 label="Manufacture of sports goods" isic="323"
+ 0 label="Manufacture of sports goods" isic="3230"
+ 4 label="Manufacture of games and toys" isic="324"
+ 0 label="Manufacture of games and toys" isic="3240"
+ 5 label="Manufacture of medical and dental instruments and supplies" isic="325"
+ 0 label="Manufacture of medical and dental instruments and supplies" isic="3250"
+ 9 label="Manufacturing n.e.c." isic="329"
+ 1 label="Manufacture of brooms and brushes" isic="3291"
+ 9 label="Other manufacturing n.e.c." isic="3299"
+33 section="C" label="Repair, maintenance and installation of machinery and equipment" isic="33"
+ 1 label="Repair and maintenance of fabricated metal products, machinery and equipment" isic="331"
+ 1 label="Repair and maintenance of fabricated metal products" isic="3311"
+ 2 label="Repair and maintenance of machinery" isic="3312"
+ 3 label="Repair and maintenance of electronic and optical equipment" isic="3313"
+ 4 label="Repair and maintenance of electrical equipment" isic="3314"
+ 5 label="Repair and maintenance of civilian ships and boats" isic="3315"
+ 6 label="Repair and maintenance of civilian air and spacecraft" isic="3316"
+ 7 label="Repair and maintenance of other civilian transport equipment" isic="3317"
+ 8 label="Repair and maintenance of military fighting vehicles, ships, boats, air and spacecraft" isic="3318"
+ 9 label="Repair and maintenance of other equipment" isic="3319"
+ 2 label="Installation of industrial machinery and equipment" isic="332"
+ 0 label="Installation of industrial machinery and equipment" isic="3320"
+D label="ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY" isic="D"
+35 section="D" label="Electricity, gas, steam and air conditioning supply" isic="35"
+ 1 label="Electric power generation, transmission and distribution" isic="351"
+ 1 label="Production of electricity from non-renewable sources" isic="3511"
+ 2 label="Production of electricity from renewable sources" isic="3512"
+ 3 label="Transmission of electricity" isic="3513"
+ 4 label="Distribution of electricity" isic="3514"
+ 5 label="Trade of electricity" isic="3515"
+ 6 label="Storage of electricity" isic="3516"
+ 2 label="Manufacture of gas, and distribution of gaseous fuels through mains" isic="352"
+ 1 label="Manufacture of gas" isic="3521"
+ 2 label="Distribution of gaseous fuels through mains" isic="3522"
+ 3 label="Trade of gas through mains" isic="3523"
+ 4 label="Storage of gas as part of network supply services" isic="3524"
+ 3 label="Steam and air conditioning supply" isic="353"
+ 0 label="Steam and air conditioning supply" isic="3530"
+ 4 label="Activities of brokers and agents for electric power and natural gas" isic="354"
+ 0 label="Activities of brokers and agents for electric power and natural gas" isic="3540"
+E label="WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES" isic="E"
+36 section="E" label="Water collection, treatment and supply" isic="36"
+ 0 label="Water collection, treatment and supply" isic="360"
+ 0 label="Water collection, treatment and supply" isic="3600"
+37 section="E" label="Sewerage" isic="37"
+ 0 label="Sewerage" isic="370"
+ 0 label="Sewerage" isic="3700"
+38 section="E" label="Waste collection, recovery and disposal activities" isic="38"
+ 1 label="Waste collection" isic="381"
+ 1 label="Collection of non-hazardous waste" isic="3811"
+ 2 label="Collection of hazardous waste" isic="3812"
+ 2 label="Waste recovery" isic="382"
+ 1 label="Materials recovery" isic="3821"
+ 2 label="Energy recovery" isic="3822"
+ 3 label="Other waste recovery" isic="3823"
+ 3 label="Waste disposal without recovery" isic="383"
+ 1 label="Incineration without energy recovery" isic="3831"
+ 2 label="Landfilling or permanent storage" isic="3832"
+ 3 label="Other waste disposal" isic="3833"
+39 section="E" label="Remediation activities and other waste management service activities" isic="39"
+ 0 label="Remediation activities and other waste management service activities" isic="390"
+ 0 label="Remediation activities and other waste management service activities" isic="3900"
+F label="CONSTRUCTION" isic="F"
+41 section="F" label="Construction of residential and non-residential buildings" isic="41"
+ 0 label="Construction of residential and non-residential buildings" isic="410"
+ 0 label="Construction of residential and non-residential buildings" isic="4100"
+42 section="F" label="Civil engineering" isic="42"
+ 1 label="Construction of roads and railways" isic="421"
+ 1 label="Construction of roads and motorways" isic="4211"
+ 2 label="Construction of railways and underground railways" isic="4212"
+ 3 label="Construction of bridges and tunnels" isic="4213"
+ 2 label="Construction of utility projects" isic="422"
+ 1 label="Construction of utility projects for fluids" isic="4221"
+ 2 label="Construction of utility projects for electricity and telecommunications" isic="4222"
+ 9 label="Construction of other civil engineering projects" isic="429"
+ 1 label="Construction of water projects" isic="4291"
+ 9 label="Construction of other civil engineering projects n.e.c." isic="4299"
+43 section="F" label="Specialised construction activities" isic="43"
+ 1 label="Demolition and site preparation" isic="431"
+ 1 label="Demolition" isic="4311"
+ 2 label="Site preparation" isic="4312"
+ 3 label="Test drilling and boring" isic="4313"
+ 2 label="Electrical, plumbing and other construction installation activities" isic="432"
+ 1 label="Electrical installation" isic="4321"
+ 2 label="Plumbing, heat and air-conditioning installation" isic="4322"
+ 3 label="Installation of insulation" isic="4323"
+ 4 label="Other construction installation" isic="4324"
+ 3 label="Building completion and finishing" isic="433"
+ 1 label="Plastering" isic="4331"
+ 2 label="Joinery installation" isic="4332"
+ 3 label="Floor and wall covering" isic="4333"
+ 4 label="Painting and glazing" isic="4334"
+ 5 label="Other building completion and finishing" isic="4335"
+ 4 label="Specialised construction activities in construction of buildings" isic="434"
+ 1 label="Roofing activities" isic="4341"
+ 2 label="Other specialised construction activities in construction of buildings" isic="4342"
+ 5 label="Specialised construction activities in civil engineering" isic="435"
+ 0 label="Specialised construction activities in civil engineering" isic="4350"
+ 6 label="Intermediation service activities for specialised construction services" isic="436"
+ 0 label="Intermediation service activities for specialised construction services" isic="4360"
+ 9 label="Other specialised construction activities" isic="439"
+ 1 label="Masonry and bricklaying activities" isic="4391"
+ 9 label="Other specialised construction activities n.e.c." isic="4399"
+G label="WHOLESALE AND RETAIL TRADE" isic="G"
+46 section="G" label="Wholesale trade" isic="46"
+ 1 label="Wholesale on a fee or contract basis" isic="461"
+ 1 label="Activities of agents involved in the wholesale of agricultural raw materials, live animals, textile raw materials and semi-finished goods" isic="4611"
+ 2 label="Activities of agents involved in the wholesale of fuels, ores, metals and industrial chemicals" isic="4612"
+ 3 label="Activities of agents involved in the wholesale of timber and building materials" isic="4613"
+ 4 label="Activities of agents involved in the wholesale of machinery, industrial equipment, ships and aircraft" isic="4614"
+ 5 label="Activities of agents involved in the wholesale of furniture, household goods, hardware and ironmongery" isic="4615"
+ 6 label="Activities of agents involved in the wholesale of textiles, clothing, fur, footwear and leather goods" isic="4616"
+ 7 label="Activities of agents involved in the wholesale of food, beverages and tobacco" isic="4617"
+ 8 label="Activities of agents involved in the wholesale of other particular products" isic="4618"
+ 9 label="Activities of agents involved in non-specialised wholesale" isic="4619"
+ 2 label="Wholesale of agricultural raw materials and live animals" isic="462"
+ 1 label="Wholesale of grain, unmanufactured tobacco, seeds and animal feeds" isic="4621"
+ 2 label="Wholesale of flowers and plants" isic="4622"
+ 3 label="Wholesale of live animals" isic="4623"
+ 4 label="Wholesale of hides, skins and leather" isic="4624"
+ 3 label="Wholesale of food, beverages and tobacco" isic="463"
+ 1 label="Wholesale of fruit and vegetables" isic="4631"
+ 2 label="Wholesale of meat, meat products, fish and fish products" isic="4632"
+ 3 label="Wholesale of dairy products, eggs and edible oils and fats" isic="4633"
+ 4 label="Wholesale of beverages" isic="4634"
+ 5 label="Wholesale of tobacco products" isic="4635"
+ 6 label="Wholesale of sugar, chocolate and sugar confectionery" isic="4636"
+ 7 label="Wholesale of coffee, tea, cocoa and spices" isic="4637"
+ 8 label="Wholesale of other food" isic="4638"
+ 9 label="Non-specialised wholesale of food, beverages and tobacco" isic="4639"
+ 4 label="Wholesale of household goods" isic="464"
+ 1 label="Wholesale of textiles" isic="4641"
+ 2 label="Wholesale of clothing and footwear" isic="4642"
+ 3 label="Wholesale of electrical household appliances" isic="4643"
+ 4 label="Wholesale of china and glassware and cleaning materials" isic="4644"
+ 5 label="Wholesale of perfume and cosmetics" isic="4645"
+ 6 label="Wholesale of pharmaceutical and medical goods" isic="4646"
+ 7 label="Wholesale of household, office and shop furniture, carpets and lighting equipment" isic="4647"
+ 8 label="Wholesale of watches and jewellery" isic="4648"
+ 9 label="Wholesale of other household goods" isic="4649"
+ 5 label="Wholesale of information and communication equipment" isic="465"
+ 0 label="Wholesale of information and communication equipment" isic="4650"
+ 6 label="Wholesale of other machinery, equipment and supplies" isic="466"
+ 1 label="Wholesale of agricultural machinery, equipment and supplies" isic="4661"
+ 2 label="Wholesale of machine tools" isic="4662"
+ 3 label="Wholesale of mining, construction and civil engineering machinery" isic="4663"
+ 4 label="Wholesale of other machinery and equipment" isic="4664"
+ 7 label="Wholesale of motor vehicles, motorcycles and related parts and accessories" isic="467"
+ 1 label="Wholesale of motor vehicles" isic="4671"
+ 2 label="Wholesale of motor vehicle parts and accessories" isic="4672"
+ 3 label="Wholesale of motorcycles, motorcycle parts and accessories" isic="4673"
+ 8 label="Other specialised wholesale" isic="468"
+ 1 label="Wholesale of solid, liquid and gaseous fuels and related products" isic="4681"
+ 2 label="Wholesale of metals and metal ores" isic="4682"
+ 3 label="Wholesale of wood, construction materials and sanitary equipment" isic="4683"
+ 4 label="Wholesale of hardware, plumbing and heating equipment and supplies" isic="4684"
+ 5 label="Wholesale of chemical products" isic="4685"
+ 6 label="Wholesale of other intermediate products" isic="4686"
+ 7 label="Wholesale of waste and scrap" isic="4687"
+ 9 label="Other specialised wholesale n.e.c." isic="4689"
+ 9 label="Non-specialised wholesale trade" isic="469"
+ 0 label="Non-specialised wholesale trade" isic="4690"
+47 section="G" label="Retail trade" isic="47"
+ 1 label="Non-specialised retail sale" isic="471"
+ 1 label="Non-specialised retail sale of predominately food, beverages or tobacco" isic="4711"
+ 2 label="Other non-specialised retail sale" isic="4712"
+ 2 label="Retail sale of food, beverages and tobacco" isic="472"
+ 1 label="Retail sale of fruit and vegetables" isic="4721"
+ 2 label="Retail sale of meat and meat products" isic="4722"
+ 3 label="Retail sale of fish, crustaceans and molluscs" isic="4723"
+ 4 label="Retail sale of bread, cake and confectionery" isic="4724"
+ 5 label="Retail sale of beverages" isic="4725"
+ 6 label="Retail sale of tobacco products" isic="4726"
+ 7 label="Retail sale of other food" isic="4727"
+ 3 label="Retail sale of automotive fuel" isic="473"
+ 0 label="Retail sale of automotive fuel" isic="4730"
+ 4 label="Retail sale of information and communication equipment" isic="474"
+ 0 label="Retail sale of information and communication equipment" isic="4740"
+ 5 label="Retail sale of other household equipment" isic="475"
+ 1 label="Retail sale of textiles" isic="4751"
+ 2 label="Retail sale of hardware, building materials, paints and glass" isic="4752"
+ 3 label="Retail sale of carpets, rugs, wall and floor coverings" isic="4753"
+ 4 label="Retail sale of electrical household appliances" isic="4754"
+ 5 label="Retail sale of furniture, lighting equipment, tableware and other household goods" isic="4755"
+ 6 label="Retail sale of cultural and recreational goods" isic="476"
+ 1 label="Retail sale of books" isic="4761"
+ 2 label="Retail sale of newspapers, and other periodical publications and stationery" isic="4762"
+ 3 label="Retail sale of sporting equipment" isic="4763"
+ 4 label="Retail sale of games and toys" isic="4764"
+ 9 label="Retail sale of cultural and recreational goods n.e.c." isic="4769"
+ 7 label="Retail sale of other goods, except motor vehicles and motorcycles" isic="477"
+ 1 label="Retail sale of clothing" isic="4771"
+ 2 label="Retail sale of footwear and leather goods" isic="4772"
+ 3 label="Retail sale of pharmaceutical products" isic="4773"
+ 4 label="Retail sale of medical and orthopaedic goods" isic="4774"
+ 5 label="Retail sale of cosmetic and toilet articles" isic="4775"
+ 6 label="Retail sale of flowers, plants, fertilisers, pets and pet food" isic="4776"
+ 7 label="Retail sale of watches and jewellery" isic="4777"
+ 8 label="Retail sale of other new goods" isic="4778"
+ 9 label="Retail sale of second-hand goods" isic="4779"
+ 8 label="Retail sale of motor vehicles, motorcycles and related parts and accessories" isic="478"
+ 1 label="Retail sale of motor vehicles" isic="4781"
+ 2 label="Retail sale of motor vehicle parts and accessories" isic="4782"
+ 3 label="Retail sale of motorcycles, motorcycle parts and accessories" isic="4783"
+ 9 label="Intermediation service activities for retail sale" isic="479"
+ 1 label="Intermediation service activities for non-specialised retail sale" isic="4791"
+ 2 label="Intermediation service activities for specialised retail sale" isic="4792"
+H label="TRANSPORTATION AND STORAGE" isic="H"
+49 section="H" label="Land transport and transport via pipelines" isic="49"
+ 1 label="Passenger rail transport" isic="491"
+ 1 label="Passenger heavy rail transport" isic="4911"
+ 2 label="Other passenger rail transport" isic="4912"
+ 2 label="Freight rail transport" isic="492"
+ 0 label="Freight rail transport" isic="4920"
+ 3 label="Other passenger land transport" isic="493"
+ 1 label="Scheduled passenger transport by road" isic="4931"
+ 2 label="Non-scheduled passenger transport by road" isic="4932"
+ 3 label="On-demand passenger transport service activities by vehicle with driver" isic="4933"
+ 4 label="Passenger transport by cableways and ski lifts" isic="4934"
+ 9 label="Other passenger land transport n.e.c." isic="4939"
+ 4 label="Freight transport by road and removal services" isic="494"
+ 1 label="Freight transport by road" isic="4941"
+ 2 label="Removal services" isic="4942"
+ 5 label="Transport via pipeline" isic="495"
+ 0 label="Transport via pipeline" isic="4950"
+50 section="H" label="Water transport" isic="50"
+ 1 label="Sea and coastal passenger water transport" isic="501"
+ 0 label="Sea and coastal passenger water transport" isic="5010"
+ 2 label="Sea and coastal freight water transport" isic="502"
+ 0 label="Sea and coastal freight water transport" isic="5020"
+ 3 label="Inland passenger water transport" isic="503"
+ 0 label="Inland passenger water transport" isic="5030"
+ 4 label="Inland freight water transport" isic="504"
+ 0 label="Inland freight water transport" isic="5040"
+51 section="H" label="Air transport" isic="51"
+ 1 label="Passenger air transport" isic="511"
+ 0 label="Passenger air transport" isic="5110"
+ 2 label="Freight air transport and space transport" isic="512"
+ 1 label="Freight air transport" isic="5121"
+ 2 label="Space transport" isic="5122"
+52 section="H" label="Warehousing, storage and support activities for transportation" isic="52"
+ 1 label="Warehousing and storage" isic="521"
+ 0 label="Warehousing and storage" isic="5210"
+ 2 label="Support activities for transportation" isic="522"
+ 1 label="Service activities incidental to land transportation" isic="5221"
+ 2 label="Service activities incidental to water transportation" isic="5222"
+ 3 label="Service activities incidental to air transportation" isic="5223"
+ 4 label="Cargo handling" isic="5224"
+ 5 label="Logistics service activities" isic="5225"
+ 6 label="Other support activities for transportation" isic="5226"
+ 3 label="Intermediation service activities for transportation" isic="523"
+ 1 label="Intermediation service activities for freight transportation" isic="5231"
+ 2 label="Intermediation service activities for passenger transportation" isic="5232"
+53 section="H" label="Postal and courier activities" isic="53"
+ 1 label="Postal activities under universal service obligation" isic="531"
+ 0 label="Postal activities under universal service obligation" isic="5310"
+ 2 label="Other postal and courier activities" isic="532"
+ 0 label="Other postal and courier activities" isic="5320"
+ 3 label="Intermediation service activities for postal and courier activities" isic="533"
+ 0 label="Intermediation service activities for postal and courier activities" isic="5330"
+I label="ACCOMMODATION AND FOOD SERVICE ACTIVITIES" isic="I"
+55 section="I" label="Accommodation" isic="55"
+ 1 label="Hotels and similar accommodation" isic="551"
+ 0 label="Hotels and similar accommodation" isic="5510"
+ 2 label="Holiday and other short-stay accommodation" isic="552"
+ 0 label="Holiday and other short-stay accommodation" isic="5520"
+ 3 label="Camping grounds and recreational vehicle parks" isic="553"
+ 0 label="Camping grounds and recreational vehicle parks" isic="5530"
+ 4 label="Intermediation service activities for accommodation" isic="554"
+ 0 label="Intermediation service activities for accommodation" isic="5540"
+ 9 label="Other accommodation" isic="559"
+ 0 label="Other accommodation" isic="5590"
+56 section="I" label="Food and beverage service activities" isic="56"
+ 1 label="Restaurants and mobile food service activities" isic="561"
+ 1 label="Restaurant activities" isic="5611"
+ 2 label="Mobile food service activities" isic="5612"
+ 2 label="Event catering, contract catering service activities and other food service activities" isic="562"
+ 1 label="Event catering activities" isic="5621"
+ 2 label="Contract catering service activities and other food service activities" isic="5622"
+ 3 label="Beverage serving activities" isic="563"
+ 0 label="Beverage serving activities" isic="5630"
+ 4 label="Intermediation service activities for food and beverage services activities" isic="564"
+ 0 label="Intermediation service activities for food and beverage services activities" isic="5640"
+J label="PUBLISHING, BROADCASTING, AND CONTENT PRODUCTION AND DISTRIBUTION ACTIVITIES" isic="J"
+58 section="J" label="Publishing activities" isic="58"
+ 1 label="Publishing of books, newspapers and other publishing activities, except software publishing" isic="581"
+ 1 label="Publishing of books" isic="5811"
+ 2 label="Publishing of newspapers" isic="5812"
+ 3 label="Publishing of journals and periodicals" isic="5813"
+ 9 label="Other publishing activities, except software publishing" isic="5819"
+ 2 label="Software publishing" isic="582"
+ 1 label="Publishing of video games" isic="5821"
+ 9 label="Other software publishing" isic="5829"
+59 section="J" label="Motion picture, video and television programme production, sound recording and music publishing activities" isic="59"
+ 1 label="Motion picture, video and television programme activities" isic="591"
+ 1 label="Motion picture, video and television programme production activities" isic="5911"
+ 2 label="Motion picture, video and television programme post-production activities" isic="5912"
+ 3 label="Motion picture and video distribution activities" isic="5913"
+ 4 label="Motion picture projection activities" isic="5914"
+ 2 label="Sound recording and music publishing activities" isic="592"
+ 0 label="Sound recording and music publishing activities" isic="5920"
+60 section="J" label="Programming, broadcasting, news agency and other content distribution activities" isic="60"
+ 1 label="Radio broadcasting and audio distribution activities" isic="601"
+ 0 label="Radio broadcasting and audio distribution activities" isic="6010"
+ 2 label="Television programming, broadcasting and video distribution activities" isic="602"
+ 0 label="Television programming, broadcasting and video distribution activities" isic="6020"
+ 3 label="News agency and other content distribution activities" isic="603"
+ 1 label="News agency activities" isic="6031"
+ 9 label="Other content distribution activities" isic="6039"
+K label="TELECOMMUNICATION, COMPUTER PROGRAMMING, CONSULTING, COMPUTING INFRASTRUCTURE AND OTHER INFORMATION SERVICE ACTIVITIES" isic="K"
+61 section="K" label="Telecommunication" isic="61"
+ 1 label="Wired, wireless, and satellite telecommunication activities" isic="611"
+ 0 label="Wired, wireless, and satellite telecommunication activities" isic="6110"
+ 2 label="Telecommunication reselling activities and intermediation service activities for telecommunication" isic="612"
+ 0 label="Telecommunication reselling activities and intermediation service activities for telecommunication" isic="6120"
+ 9 label="Other telecommunication activities" isic="619"
+ 0 label="Other telecommunication activities" isic="6190"
+62 section="K" label="Computer programming, consultancy and related activities" isic="62"
+ 1 label="Computer programming activities" isic="621"
+ 0 label="Computer programming activities" isic="6210"
+ 2 label="Computer consultancy and computer facilities management activities" isic="622"
+ 0 label="Computer consultancy and computer facilities management activities" isic="6220"
+ 9 label="Other information technology and computer service activities" isic="629"
+ 0 label="Other information technology and computer service activities" isic="6290"
+63 section="K" label="Computing infrastructure, data processing, hosting and other information service activities" isic="63"
+ 1 label="Computing infrastructure, data processing, hosting and related activities" isic="631"
+ 0 label="Computing infrastructure, data processing, hosting and related activities" isic="6310"
+ 9 label="Web search portal activities and other information service activities" isic="639"
+ 1 label="Web search portal activities" isic="6391"
+ 2 label="Other information service activities" isic="6392"
+L label="FINANCIAL AND INSURANCE ACTIVITIES" isic="L"
+64 section="L" label="Financial service activities, except insurance and pension funding" isic="64"
+ 1 label="Monetary intermediation" isic="641"
+ 1 label="Central banking" isic="6411"
+ 9 label="Other monetary intermediation" isic="6419"
+ 2 label="Activities of holding companies and financing conduits" isic="642"
+ 1 label="Activities of holding companies" isic="6421"
+ 2 label="Activities of financing conduits" isic="6422"
+ 3 label="Activities of trusts, funds and similar financial entities" isic="643"
+ 1 label="Activities of money market and non-money market investments funds" isic="6431"
+ 2 label="Activities of trust, estate and agency accounts" isic="6432"
+ 9 label="Other financial service activities, except insurance and pension funding" isic="649"
+ 1 label="Financial leasing" isic="6491"
+ 2 label="Other credit granting" isic="6492"
+ 9 label="Other financial service activities, except insurance and pension funding n.e.c." isic="6499"
+65 section="L" label="Insurance, reinsurance and pension funding, except compulsory social security" isic="65"
+ 1 label="Insurance" isic="651"
+ 1 label="Life insurance" isic="6511"
+ 2 label="Non-life insurance" isic="6512"
+ 2 label="Reinsurance" isic="652"
+ 0 label="Reinsurance" isic="6520"
+ 3 label="Pension funding" isic="653"
+ 0 label="Pension funding" isic="6530"
+66 section="L" label="Activities auxiliary to financial services and insurance activities" isic="66"
+ 1 label="Activities auxiliary to financial services, except insurance and pension funding" isic="661"
+ 1 label="Administration of financial markets" isic="6611"
+ 2 label="Security and commodity contracts brokerage" isic="6612"
+ 9 label="Other activities auxiliary to financial services, except insurance and pension funding" isic="6619"
+ 2 label="Activities auxiliary to insurance and pension funding" isic="662"
+ 1 label="Risk and damage evaluation" isic="6621"
+ 2 label="Activities of insurance agents and brokers" isic="6622"
+ 9 label="Activities auxiliary to insurance and pension funding n.e.c." isic="6629"
+ 3 label="Fund management activities" isic="663"
+ 0 label="Fund management activities" isic="6630"
+M label="REAL ESTATE ACTIVITIES" isic="M"
+68 section="M" label="Real estate activities" isic="68"
+ 1 label="Real estate activities with own property and development of building projects" isic="681"
+ 1 label="Buying and selling of own real estate" isic="6811"
+ 2 label="Development of building projects" isic="6812"
+ 2 label="Rental and operating of own or leased real estate" isic="682"
+ 0 label="Rental and operating of own or leased real estate" isic="6820"
+ 3 label="Real estate activities on a fee or contract basis" isic="683"
+ 1 label="Intermediation service activities for real estate activities" isic="6831"
+ 2 label="Other real estate activities on a fee or contract basis" isic="6832"
+N label="PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES" isic="N"
+69 section="N" label="Legal and accounting activities" isic="69"
+ 1 label="Legal activities" isic="691"
+ 0 label="Legal activities" isic="6910"
+ 2 label="Accounting, bookkeeping and auditing activities; tax consultancy" isic="692"
+ 0 label="Accounting, bookkeeping and auditing activities; tax consultancy" isic="6920"
+70 section="N" label="Activities of head offices and management consultancy" isic="70"
+ 1 label="Activities of head offices" isic="701"
+ 0 label="Activities of head offices" isic="7010"
+ 2 label="Business and other management consultancy activities" isic="702"
+ 0 label="Business and other management consultancy activities" isic="7020"
+71 section="N" label="Architectural and engineering activities; technical testing and analysis" isic="71"
+ 1 label="Architectural and engineering activities and related technical consultancy" isic="711"
+ 1 label="Architectural activities" isic="7111"
+ 2 label="Engineering activities and related technical consultancy" isic="7112"
+ 2 label="Technical testing and analysis" isic="712"
+ 0 label="Technical testing and analysis" isic="7120"
+72 section="N" label="Scientific research and development" isic="72"
+ 1 label="Research and experimental development on natural sciences and engineering" isic="721"
+ 0 label="Research and experimental development on natural sciences and engineering" isic="7210"
+ 2 label="Research and experimental development on social sciences and humanities" isic="722"
+ 0 label="Research and experimental development on social sciences and humanities" isic="7220"
+73 section="N" label="Activities of advertising, market research and public relations" isic="73"
+ 1 label="Advertising" isic="731"
+ 1 label="Activities of advertising agencies" isic="7311"
+ 2 label="Media representation" isic="7312"
+ 2 label="Market research and public opinion polling" isic="732"
+ 0 label="Market research and public opinion polling" isic="7320"
+ 3 label="Public relations and communication activities" isic="733"
+ 0 label="Public relations and communication activities" isic="7330"
+74 section="N" label="Other professional, scientific and technical activities" isic="74"
+ 1 label="Specialised design activities" isic="741"
+ 1 label="Industrial product and fashion design activities" isic="7411"
+ 2 label="Graphic design and visual communication activities" isic="7412"
+ 3 label="Interior design activities" isic="7413"
+ 4 label="Other specialised design activities" isic="7414"
+ 2 label="Photographic activities" isic="742"
+ 0 label="Photographic activities" isic="7420"
+ 3 label="Translation and interpretation activities" isic="743"
+ 0 label="Translation and interpretation activities" isic="7430"
+ 9 label="Other professional, scientific and technical activities n.e.c." isic="749"
+ 1 label="Patent brokering and marketing service activities" isic="7491"
+ 9 label="All other professional, scientific and technical activities n.e.c." isic="7499"
+75 section="N" label="Veterinary activities" isic="75"
+ 0 label="Veterinary activities" isic="750"
+ 0 label="Veterinary activities" isic="7500"
+O label="ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES" isic="O"
+77 section="O" label="Rental and leasing activities" isic="77"
+ 1 label="Rental and leasing of motor vehicles" isic="771"
+ 1 label="Rental and leasing of cars and light motor vehicles" isic="7711"
+ 2 label="Rental and leasing of trucks" isic="7712"
+ 2 label="Rental and leasing of personal and household goods" isic="772"
+ 1 label="Rental and leasing of recreational and sports goods" isic="7721"
+ 2 label="Rental and leasing of other personal and household goods" isic="7722"
+ 3 label="Rental and leasing of other machinery, equipment and tangible goods" isic="773"
+ 1 label="Rental and leasing of agricultural machinery and equipment" isic="7731"
+ 2 label="Rental and leasing of construction and civil engineering machinery and equipment" isic="7732"
+ 3 label="Rental and leasing of office machinery, equipment and computers" isic="7733"
+ 4 label="Rental and leasing of water transport equipment" isic="7734"
+ 5 label="Rental and leasing of air transport equipment" isic="7735"
+ 9 label="Rental and leasing of other machinery, equipment and tangible goods n.e.c." isic="7739"
+ 4 label="Leasing of intellectual property and similar products, except copyrighted works" isic="774"
+ 0 label="Leasing of intellectual property and similar products, except copyrighted works" isic="7740"
+ 5 label="Intermediation service activities for rental and leasing of tangible goods and non-financial intangible assets" isic="775"
+ 1 label="Intermediation service activities for rental and leasing of cars, motorhomes and trailers" isic="7751"
+ 2 label="Intermediation service activities for rental and leasing of other tangible goods and non-financial intangible assets" isic="7752"
+78 section="O" label="Employment activities" isic="78"
+ 1 label="Activities of employment placement agencies" isic="781"
+ 0 label="Activities of employment placement agencies" isic="7810"
+ 2 label="Temporary employment agency activities and other human resource provisions" isic="782"
+ 0 label="Temporary employment agency activities and other human resource provisions" isic="7820"
+79 section="O" label="Travel agency, tour operator and other reservation service and related activities" isic="79"
+ 1 label="Travel agency and tour operator activities" isic="791"
+ 1 label="Travel agency activities" isic="7911"
+ 2 label="Tour operator activities" isic="7912"
+ 9 label="Other reservation service and related activities" isic="799"
+ 0 label="Other reservation service and related activities" isic="7990"
+80 section="O" label="Investigation and security activities" isic="80"
+ 0 label="Investigation and security activities" isic="800"
+ 1 label="Investigation and private security activities" isic="8001"
+ 9 label="Security activities n.e.c." isic="8009"
+81 section="O" label="Services to buildings and landscape activities" isic="81"
+ 1 label="Combined facilities support activities" isic="811"
+ 0 label="Combined facilities support activities" isic="8110"
+ 2 label="Cleaning activities" isic="812"
+ 1 label="General cleaning of buildings" isic="8121"
+ 2 label="Other building and industrial cleaning activities" isic="8122"
+ 3 label="Other cleaning activities" isic="8123"
+ 3 label="Landscape service activities" isic="813"
+ 0 label="Landscape service activities" isic="8130"
+82 section="O" label="Office administrative, office support and other business support activities" isic="82"
+ 1 label="Office administrative and support activities" isic="821"
+ 0 label="Office administrative and support activities" isic="8210"
+ 2 label="Activities of call centres" isic="822"
+ 0 label="Activities of call centres" isic="8220"
+ 3 label="Organisation of conventions and trade shows" isic="823"
+ 0 label="Organisation of conventions and trade shows" isic="8230"
+ 4 label="Intermediation service activities for business support service activities n.e.c." isic="824"
+ 0 label="Intermediation service activities for business support service activities n.e.c." isic="8240"
+ 9 label="Business support service activities n.e.c." isic="829"
+ 1 label="Activities of collection agencies and credit bureaus" isic="8291"
+ 2 label="Packaging activities" isic="8292"
+ 9 label="Other business support service activities n.e.c." isic="8299"
+P label="PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY" isic="P"
+84 section="P" label="Public administration and defence; compulsory social security" isic="84"
+ 1 label="Administration of the State and the economic, social and environmental policies of the community" isic="841"
+ 1 label="General public administration activities" isic="8411"
+ 2 label="Regulation of health care, education, cultural services and other social services" isic="8412"
+ 3 label="Regulation of and contribution to more efficient operation of businesses" isic="8413"
+ 2 label="Provision of services to the community as a whole" isic="842"
+ 1 label="Foreign affairs" isic="8421"
+ 2 label="Defence activities" isic="8422"
+ 3 label="Justice and judicial activities" isic="8423"
+ 4 label="Public order and safety activities" isic="8424"
+ 5 label="Fire service activities" isic="8425"
+ 3 label="Compulsory social security activities" isic="843"
+ 0 label="Compulsory social security activities" isic="8430"
+Q label="EDUCATION" isic="Q"
+85 section="Q" label="Education" isic="85"
+ 1 label="Pre-primary education" isic="851"
+ 0 label="Pre-primary education" isic="8510"
+ 2 label="Primary education" isic="852"
+ 0 label="Primary education" isic="8520"
+ 3 label="Secondary and post-secondary non-tertiary education" isic="853"
+ 1 label="General secondary education" isic="8531"
+ 2 label="Vocational secondary education" isic="8532"
+ 3 label="Post-secondary non-tertiary education" isic="8533"
+ 4 label="Tertiary education" isic="854"
+ 0 label="Tertiary education" isic="8540"
+ 5 label="Other education" isic="855"
+ 1 label="Sports and recreation education" isic="8551"
+ 2 label="Cultural education" isic="8552"
+ 3 label="Driving school activities" isic="8553"
+ 9 label="Other education n.e.c." isic="8559"
+ 6 label="Educational support activities" isic="856"
+ 1 label="Intermediation service activities for courses and tutors" isic="8561"
+ 9 label="Educational support activities n.e.c." isic="8569"
+R label="HUMAN HEALTH AND SOCIAL WORK ACTIVITIES" isic="R"
+86 section="R" label="Human health activities" isic="86"
+ 1 label="Hospital activities" isic="861"
+ 0 label="Hospital activities" isic="8610"
+ 2 label="Medical and dental practice activities" isic="862"
+ 1 label="General medical practice activities" isic="8621"
+ 2 label="Medical specialists activities" isic="8622"
+ 3 label="Dental practice care activities" isic="8623"
+ 9 label="Other human health activities" isic="869"
+ 1 label="Diagnostic imaging services and medical laboratory activities" isic="8691"
+ 2 label="Patient transportation by ambulance" isic="8692"
+ 3 label="Activities of psychologists and psychotherapists, except medical doctors" isic="8693"
+ 4 label="Nursing and midwifery activities" isic="8694"
+ 5 label="Physiotherapy activities" isic="8695"
+ 6 label="Traditional, complementary and alternative medicine activities" isic="8696"
+ 7 label="Intermediation service activities for medical, dental and other human health services" isic="8697"
+ 9 label="Other human health activities n.e.c." isic="8699"
+87 section="R" label="Residential care activities" isic="87"
+ 1 label="Residential nursing care activities" isic="871"
+ 0 label="Residential nursing care activities" isic="8710"
+ 2 label="Residential care activities for persons living with or having a diagnosis of a mental illness or substance abuse" isic="872"
+ 0 label="Residential care activities for persons living with or having a diagnosis of a mental illness or substance abuse" isic="8720"
+ 3 label="Residential care activities for older persons or persons with physical disabilities" isic="873"
+ 0 label="Residential care activities for older persons or persons with physical disabilities" isic="8730"
+ 9 label="Other residential care activities" isic="879"
+ 1 label="Intermediation service activities for residential care activities" isic="8791"
+ 9 label="Other residential care activities n.e.c." isic="8799"
+88 section="R" label="Social work activities without accommodation" isic="88"
+ 1 label="Social work activities without accommodation for older persons or persons with disabilities" isic="881"
+ 0 label="Social work activities without accommodation for older persons or persons with disabilities" isic="8810"
+ 9 label="Other social work activities without accommodation" isic="889"
+ 1 label="Child day-care activities" isic="8891"
+ 9 label="Other social work activities without accommodation n.e.c." isic="8899"
+S label="ARTS, SPORTS AND RECREATION" isic="S"
+90 section="S" label="Arts creation and performing arts activities" isic="90"
+ 1 label="Arts creation activities" isic="901"
+ 1 label="Literary creation and musical composition activities" isic="9011"
+ 2 label="Visual arts creation activities" isic="9012"
+ 3 label="Other arts creation activities" isic="9013"
+ 2 label="Activities of performing arts" isic="902"
+ 0 label="Activities of performing arts" isic="9020"
+ 3 label="Support activities to arts creation and performing arts" isic="903"
+ 1 label="Operation of arts facilities and sites" isic="9031"
+ 9 label="Other support activities to arts and performing arts" isic="9039"
+91 section="S" label="Libraries, archives, museums and other cultural activities" isic="91"
+ 1 label="Library and archive activities" isic="911"
+ 1 label="Library activities" isic="9111"
+ 2 label="Archive activities" isic="9112"
+ 2 label="Museum, collection, historical site and monument activities" isic="912"
+ 1 label="Museum and collection activities" isic="9121"
+ 2 label="Historical site and monument activities" isic="9122"
+ 3 label="Conservation, restoration and other support activities for cultural heritage" isic="913"
+ 0 label="Conservation, restoration and other support activities for cultural heritage" isic="9130"
+ 4 label="Botanical and zoological garden and nature reserve activities" isic="914"
+ 1 label="Botanical and zoological garden activities" isic="9141"
+ 2 label="Nature reserve activities" isic="9142"
+92 section="S" label="Gambling and betting activities" isic="92"
+ 0 label="Gambling and betting activities" isic="920"
+ 0 label="Gambling and betting activities" isic="9200"
+93 section="S" label="Sports activities and amusement and recreation activities" isic="93"
+ 1 label="Sports activities" isic="931"
+ 1 label="Operation of sports facilities" isic="9311"
+ 2 label="Activities of sports clubs" isic="9312"
+ 3 label="Activities of fitness centres" isic="9313"
+ 9 label="Sports activities n.e.c." isic="9319"
+ 2 label="Amusement and recreation activities" isic="932"
+ 1 label="Activities of amusement parks and theme parks" isic="9321"
+ 9 label="Amusement and recreation activities n.e.c." isic="9329"
+T label="OTHER SERVICE ACTIVITIES" isic="T"
+94 section="T" label="Activities of membership organisations" isic="94"
+ 1 label="Activities of business, employers and professional membership organisations" isic="941"
+ 1 label="Activities of business and employers membership organisations" isic="9411"
+ 2 label="Activities of professional membership organisations" isic="9412"
+ 2 label="Activities of trade unions" isic="942"
+ 0 label="Activities of trade unions" isic="9420"
+ 9 label="Activities of other membership organisations" isic="949"
+ 1 label="Activities of religious organisations" isic="9491"
+ 2 label="Activities of political organisations" isic="9492"
+ 9 label="Activities of other membership organisations n.e.c." isic="9499"
+95 section="T" label="Repair and maintenance of computers, personal and household goods, and motor vehicles and motorcycles" isic="95"
+ 1 label="Repair and maintenance of computers and communication equipment" isic="951"
+ 0 label="Repair and maintenance of computers and communication equipment" isic="9510"
+ 2 label="Repair and maintenance of personal and household goods" isic="952"
+ 1 label="Repair and maintenance of consumer electronics" isic="9521"
+ 2 label="Repair and maintenance of household appliances and home and garden equipment" isic="9522"
+ 3 label="Repair and maintenance of footwear and leather goods" isic="9523"
+ 4 label="Repair and maintenance of furniture and home furnishings" isic="9524"
+ 5 label="Repair and maintenance of watches, clocks and jewellery" isic="9525"
+ 9 label="Repair and maintenance of personal and household goods n.e.c." isic="9529"
+ 3 label="Repair and maintenance of motor vehicles and motorcycles" isic="953"
+ 1 label="Repair and maintenance of motor vehicles" isic="9531"
+ 2 label="Repair and maintenance of motorcycles" isic="9532"
+ 4 label="Intermediation service activities for repair and maintenance of computers, personal and household goods, and motor vehicles and motorcycles" isic="954"
+ 0 label="Intermediation service activities for repair and maintenance of computers, personal and household goods, and motor vehicles and motorcycles" isic="9540"
+96 section="T" label="Personal service activities" isic="96"
+ 1 label="Washing and cleaning of textile and fur products" isic="961"
+ 0 label="Washing and cleaning of textile and fur products" isic="9610"
+ 2 label="Hairdressing, beauty treatment, day spa and similar activities" isic="962"
+ 1 label="Hairdressing and barber activities" isic="9621"
+ 2 label="Beauty care and other beauty treatment activities" isic="9622"
+ 3 label="Day spa, sauna and steam bath activities" isic="9623"
+ 3 label="Funeral and related activities" isic="963"
+ 0 label="Funeral and related activities" isic="9630"
+ 4 label="Intermediation service activities for personal services" isic="964"
+ 0 label="Intermediation service activities for personal services" isic="9640"
+ 9 label="Other personal service activities" isic="969"
+ 1 label="Provision of domestic personal service activities" isic="9691"
+ 9 label="Other personal service activities n.e.c." isic="9699"
+U label="ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS AND UNDIFFERENTIATED GOODS - AND SERVICE-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE" isic="U"
+97 section="U" label="Activities of households as employers of domestic personnel" isic="97"
+ 0 label="Activities of households as employers of domestic personnel" isic="970"
+ 0 label="Activities of households as employers of domestic personnel" isic="9700"
+98 section="U" label="Undifferentiated goods- and service-producing activities of private households for own use" isic="98"
+ 1 label="Undifferentiated goods-producing activities of private households for own use" isic="981"
+ 0 label="Undifferentiated goods-producing activities of private households for own use" isic="9810"
+ 2 label="Undifferentiated service-producing activities of private households for own use" isic="982"
+ 0 label="Undifferentiated service-producing activities of private households for own use" isic="9820"
+V label="ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES" isic="V"
+99 section="V" label="Activities of extraterritorial organisations and bodies" isic="99"
+ 0 label="Activities of extraterritorial organisations and bodies" isic="990"
+ 0 label="Activities of extraterritorial organisations and bodies" isic="9900"
diff --git a/stdnum/eu/oss.py b/stdnum/eu/oss.py
new file mode 100644
index 00000000..40524f50
--- /dev/null
+++ b/stdnum/eu/oss.py
@@ -0,0 +1,119 @@
+# oss.py - functions for handling European VAT numbers
+# coding: utf-8
+#
+# Copyright (C) 2023 Arthur de Jong
+# Copyright (C) 2023 Sergi Almacellas Abellana
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see .
+
+"""OSS (European VAT on e-Commerce - One Stop Shop).
+
+This covers number that have been issued under the non-union scheme and the
+import scheme of the European VAT on e-Commerce one stop shop. Numbers under
+the non-union scheme are assigned to foreign companies providing digital
+services to European Union consumers. Numbers under the import scheme are
+assigned for importing goods from a third country (through an intermediary).
+
+This is also called MOSS (mini One Stop Shop) and VoeS (VAT on e-Services).
+The number under the import scheme is also called IOSS (Import One Stop Shop)
+number.
+
+Numbers under the non-union scheme are in the format EUxxxyyyyyz. For the
+import scheme the format is IMxxxyyyyyyz. An intermediary will also get an
+number in the format INxxxyyyyyyz but that may not be used as VAT
+identification number.
+
+There appears to be a check digit algorithm but the FITSDEV2-SC12-TS-Mini1SS
+(Mini-1SS – Technical Specifications) document that describes the algorithm
+appears to not be publicly available.
+
+More information:
+
+* https://vat-one-stop-shop.ec.europa.eu/one-stop-shop/register-oss_en
+* https://europa.eu/youreurope/business/taxation/vat/vat-digital-services-moss-scheme/index_en.htm
+* https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32002L0038
+
+>>> validate('EU 372022452')
+'EU372022452'
+"""
+
+from __future__ import annotations
+
+from stdnum.exceptions import *
+from stdnum.util import clean, isdigits
+
+
+ISO_3166_1_MEMBER_STATES = (
+ '040', # Austria
+ '056', # Belgium
+ '100', # Bulgaria
+ '191', # Croatia
+ '196', # Cyprus
+ '203', # Czechia
+ '208', # Denmark
+ '233', # Estonia
+ '246', # Finland
+ '250', # France
+ '276', # Germany
+ '300', # Greece
+ '348', # Hungary
+ '372', # Ireland
+ '380', # Italy
+ '428', # Latvia
+ '440', # Lithuania
+ '442', # Luxembourg
+ '470', # Malta
+ '528', # Netherland
+ '616', # Poland
+ '620', # Portugal
+ '642', # Romania
+ '703', # Slovakia
+ '705', # Slovenia
+ '724', # Spain
+ '752', # Sweden
+ '900', # N. Ireland
+)
+"""The collection of member state codes (for MSI) that may make up a VAT number."""
+
+
+def compact(number: str) -> str:
+ """Compact European VAT Number"""
+ return clean(number, ' -').upper().strip()
+
+
+def validate(number: str) -> str:
+ """Validate European VAT Number"""
+ number = compact(number)
+ if number.startswith('EU'):
+ if len(number) != 11:
+ raise InvalidLength()
+ elif number.startswith('IM'):
+ if len(number) != 12:
+ raise InvalidLength()
+ else:
+ raise InvalidComponent()
+ if not isdigits(number[2:]):
+ raise InvalidFormat()
+ if number[2:5] not in ISO_3166_1_MEMBER_STATES:
+ raise InvalidComponent()
+ return number
+
+
+def is_valid(number: str) -> bool:
+ """Check if the number is a valid VAT number. This performs the
+ country-specific check for the number."""
+ try:
+ return bool(validate(number))
+ except ValidationError:
+ return False
diff --git a/stdnum/eu/vat.py b/stdnum/eu/vat.py
index 987d8fcc..6c2e5a26 100644
--- a/stdnum/eu/vat.py
+++ b/stdnum/eu/vat.py
@@ -1,7 +1,7 @@
# vat.py - functions for handling European VAT numbers
# coding: utf-8
#
-# Copyright (C) 2012-2020 Arthur de Jong
+# Copyright (C) 2012-2024 Arthur de Jong
# Copyright (C) 2015 Lionel Elie Mamane
#
# This library is free software; you can redistribute it and/or
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""VAT (European Union VAT number).
@@ -39,17 +37,24 @@
['nl']
"""
+from __future__ import annotations
+
+import datetime
+
+from stdnum.eu import oss
from stdnum.exceptions import *
-from stdnum.util import clean, get_cc_module, get_soap_client
+from stdnum.util import (
+ NumberValidationModule, clean, get_cc_module, get_soap_client)
MEMBER_STATES = set([
- 'at', 'be', 'bg', 'cy', 'cz', 'de', 'dk', 'ee', 'es', 'fi', 'fr', 'gb',
- 'gr', 'hr', 'hu', 'ie', 'it', 'lt', 'lu', 'lv', 'mt', 'nl', 'pl', 'pt',
- 'ro', 'se', 'si', 'sk',
+ 'at', 'be', 'bg', 'cy', 'cz', 'de', 'dk', 'ee', 'es', 'fi', 'fr', 'gr',
+ 'hr', 'hu', 'ie', 'it', 'lt', 'lu', 'lv', 'mt', 'nl', 'pl', 'pt', 'ro',
+ 'se', 'si', 'sk', 'xi',
])
-"""The collection of country codes that are queried. Greece is listed with
-a country code of gr while for VAT purposes el is used instead."""
+"""The collection of country codes that are queried. Greece is listed with a
+country code of gr while for VAT purposes el is used instead. For Northern
+Ireland numbers are prefixed with xi of United Kingdom numbers."""
_country_modules = dict()
@@ -57,40 +62,52 @@
"""The WSDL URL of the VAT Information Exchange System (VIES)."""
-def _get_cc_module(cc):
+def _get_cc_module(cc: str) -> NumberValidationModule | None:
"""Get the VAT number module based on the country code."""
# Greece uses a "wrong" country code
cc = cc.lower()
+ if cc in ('eu', 'im'):
+ return oss
if cc == 'el':
cc = 'gr'
if cc not in MEMBER_STATES:
- return
+ return None
+ if cc == 'xi':
+ cc = 'gb'
if cc not in _country_modules:
_country_modules[cc] = get_cc_module(cc, 'vat')
return _country_modules[cc]
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, '').upper().strip()
- module = _get_cc_module(number[:2])
+ cc = number[:2]
+ module = _get_cc_module(cc)
if not module:
raise InvalidComponent()
- return number[:2] + module.compact(number[2:])
+ number = module.compact(number)
+ if not number.startswith(cc):
+ number = cc + number
+ return number
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This performs the
country-specific check for the number."""
number = clean(number, '').upper().strip()
- module = _get_cc_module(number[:2])
+ cc = number[:2]
+ module = _get_cc_module(cc)
if not module:
raise InvalidComponent()
- return number[:2] + module.validate(number[2:])
+ number = module.validate(number)
+ if not number.startswith(cc):
+ number = cc + number
+ return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number. This performs the
country-specific check for the number."""
try:
@@ -99,40 +116,69 @@ def is_valid(number):
return False
-def guess_country(number):
+def guess_country(number: str) -> list[str]:
"""Guess the country code based on the number. This checks the number
against each of the validation routines and returns the list of countries
for which it is valid. This returns lower case codes and returns gr (not
el) for Greece."""
return [cc
for cc in MEMBER_STATES
- if _get_cc_module(cc).is_valid(number)]
+ if _get_cc_module(cc).is_valid(number)] # type: ignore[union-attr]
+
+def check_vies(
+ number: str,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> dict[str, str | bool | datetime.date]: # pragma: no cover (not part of normal test suite)
+ """Use the EU VIES service to validate the provided number.
-def check_vies(number, timeout=30): # pragma: no cover (not part of normal test suite)
- """Query the online European Commission VAT Information Exchange System
+ Query the online European Commission VAT Information Exchange System
(VIES) for validity of the provided number. Note that the service has
- usage limitations (see the VIES website for details). The timeout is in
- seconds. This returns a dict-like object."""
+ usage limitations (see the VIES website for details).
+
+ The `timeout` argument specifies the network timeout in seconds.
+
+ The `verify` argument is either a boolean that determines whether the
+ server's certificate is validate or a string which must be a path the CA
+ certificate bundle to use for verification.
+
+ Returns a dict-like object.
+ """
# this function isn't automatically tested because it would require
# network access for the tests and unnecessarily load the VIES website
number = compact(number)
- client = get_soap_client(vies_wsdl, timeout)
- return client.checkVat(number[:2], number[2:])
+ client = get_soap_client(vies_wsdl, timeout=timeout, verify=verify)
+ return client.checkVat(number[:2], number[2:]) # type: ignore[no-any-return]
+
+def check_vies_approx(
+ number: str,
+ requester: str,
+ timeout: float = 30,
+ verify: bool | str = True,
+) -> dict[str, str | bool | datetime.date]: # pragma: no cover
+ """Use the EU VIES service to validate the provided number.
-def check_vies_approx(number, requester, timeout=30): # pragma: no cover
- """Query the online European Commission VAT Information Exchange System
+ Query the online European Commission VAT Information Exchange System
(VIES) for validity of the provided number, providing a validity
certificate as proof. You will need to give your own VAT number for this
to work. Note that the service has usage limitations (see the VIES
- website for details). The timeout is in seconds. This returns a dict-like
- object."""
+ website for details).
+
+ The `timeout` argument specifies the network timeout in seconds.
+
+ The `verify` argument is either a boolean that determines whether the
+ server's certificate is validate or a string which must be a path the CA
+ certificate bundle to use for verification.
+
+ Returns a dict-like object.
+ """
# this function isn't automatically tested because it would require
# network access for the tests and unnecessarily load the VIES website
number = compact(number)
requester = compact(requester)
- client = get_soap_client(vies_wsdl, timeout)
- return client.checkVatApprox(
+ client = get_soap_client(vies_wsdl, timeout=timeout, verify=verify)
+ return client.checkVatApprox( # type: ignore[no-any-return]
countryCode=number[:2], vatNumber=number[2:],
requesterCountryCode=requester[:2], requesterVatNumber=requester[2:])
diff --git a/stdnum/exceptions.py b/stdnum/exceptions.py
index dd2a695a..20c8ef0c 100644
--- a/stdnum/exceptions.py
+++ b/stdnum/exceptions.py
@@ -1,7 +1,7 @@
# exceptions.py - collection of stdnum exceptions
# coding: utf-8
#
-# Copyright (C) 2013 Arthur de Jong
+# Copyright (C) 2013-2022 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of exceptions.
@@ -24,19 +22,25 @@
when validation of the number fails.
"""
+from __future__ import annotations
-class ValidationError(Exception):
+
+__all__ = ['ValidationError', 'InvalidFormat', 'InvalidChecksum',
+ 'InvalidLength', 'InvalidComponent']
+
+
+class ValidationError(ValueError):
"""Top-level error for validating numbers.
This exception should normally not be raised, only subclasses of this
exception."""
- def __str__(self):
+ def __str__(self) -> str:
"""Return the exception message."""
return ''.join(self.args[:1]) or getattr(self, 'message', '')
-class InvalidFormat(ValidationError):
+class InvalidFormat(ValidationError): # noqa N818
"""Something is wrong with the format of the number.
This generally means characters or delimiters that are not allowed are
@@ -45,19 +49,19 @@ class InvalidFormat(ValidationError):
message = 'The number has an invalid format.'
-class InvalidChecksum(ValidationError):
+class InvalidChecksum(ValidationError): # noqa N818
"""The number's internal checksum or check digit does not match."""
message = "The number's checksum or check digit is invalid."
-class InvalidLength(InvalidFormat):
+class InvalidLength(InvalidFormat): # noqa N818
"""The length of the number is wrong."""
message = 'The number has an invalid length.'
-class InvalidComponent(ValidationError):
+class InvalidComponent(ValidationError): # noqa N818
"""One of the parts of the number has an invalid reference.
Some part of the number refers to some external entity like a country
diff --git a/stdnum/fi/__init__.py b/stdnum/fi/__init__.py
index 80129fc8..aa25af5a 100644
--- a/stdnum/fi/__init__.py
+++ b/stdnum/fi/__init__.py
@@ -14,12 +14,12 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Collection of Finnish numbers."""
+from __future__ import annotations
+
# provide vat as an alias
from stdnum.fi import alv as vat # noqa: F401
from stdnum.fi import hetu as personalid # noqa: F401
diff --git a/stdnum/fi/alv.py b/stdnum/fi/alv.py
index 6e3515c0..07cbfb89 100644
--- a/stdnum/fi/alv.py
+++ b/stdnum/fi/alv.py
@@ -1,4 +1,4 @@
-# vat.py - functions for handling Finnish VAT numbers
+# alv.py - functions for handling Finnish VAT numbers
# coding: utf-8
#
# Copyright (C) 2012-2015 Arthur de Jong
@@ -14,9 +14,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""ALV nro (Arvonlisäveronumero, Finnish VAT number).
@@ -30,11 +28,13 @@
InvalidChecksum: ...
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
number = clean(number, ' -').upper().strip()
@@ -43,13 +43,13 @@ def compact(number):
return number
-def checksum(number):
+def checksum(number: str) -> int:
"""Calculate the checksum."""
weights = (7, 9, 10, 5, 8, 4, 2, 1)
return sum(w * int(n) for w, n in zip(weights, number)) % 11
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid VAT number. This checks the length,
formatting and check digit."""
number = compact(number)
@@ -62,7 +62,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid VAT number."""
try:
return bool(validate(number))
diff --git a/stdnum/fi/associationid.py b/stdnum/fi/associationid.py
index 4374671b..b7b9cc5c 100644
--- a/stdnum/fi/associationid.py
+++ b/stdnum/fi/associationid.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""Finnish Association Identifier.
@@ -42,6 +40,8 @@
'1.234'
"""
+from __future__ import annotations
+
from stdnum.exceptions import *
from stdnum.util import clean, isdigits
@@ -53,13 +53,13 @@
83, 84, 85, 89, 92))
-def compact(number):
+def compact(number: str) -> str:
"""Convert the number to the minimal representation. This strips the
number of any valid separators and removes surrounding whitespace."""
return clean(number, ' -._+').strip()
-def validate(number):
+def validate(number: str) -> str:
"""Check if the number is a valid Finnish association register number.
This checks the length and format."""
number = compact(number)
@@ -72,7 +72,7 @@ def validate(number):
return number
-def is_valid(number):
+def is_valid(number: str) -> bool:
"""Check if the number is a valid association register number."""
try:
return bool(validate(number))
@@ -80,7 +80,7 @@ def is_valid(number):
return False
-def format(number):
+def format(number: str) -> str:
"""Reformat the number to the standard presentation format."""
number = compact(number)
if len(number) <= 3:
diff --git a/stdnum/fi/hetu.py b/stdnum/fi/hetu.py
index 26c538f1..d3772933 100644
--- a/stdnum/fi/hetu.py
+++ b/stdnum/fi/hetu.py
@@ -16,9 +16,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see .
"""HETU (Henkilötunnus, Finnish personal identity code).
@@ -41,6 +39,8 @@
'131052A308T'
"""
+from __future__ import annotations
+
import datetime
import re
@@ -50,29 +50,29 @@
_century_codes = {
'+': 1800,
- '-': 1900,
- 'A': 2000,
}
+_century_codes.update(dict.fromkeys(('-', 'Y', 'X', 'W', 'V', 'U'), 1900))
+_century_codes.update(dict.fromkeys(('A', 'B', 'C', 'D', 'E', 'F'), 2000))
# Finnish personal identity codes are composed of date part, century
# indicating sign, individual number and control character.
# ddmmyyciiiC
_hetu_re = re.compile(r'^(?P[0123]\d)(?P[01]\d)(?P\d\d)'
- r'(?P[-+A])(?P\d\d\d)'
+ r'(?P[-+ABCDEFYXWVU])(?P\d\d\d)'
r'(?P[0-9ABCDEFHJKLMNPRSTUVWXY])$')
-def compact(number):
+def compact(number: str) -> str:
"""Convert the HETU to the minimal representation. This strips
surrounding whitespace and converts it to upper case."""
return clean(number, '').upper().strip()
-def _calc_checksum(number):
+def _calc_checksum(number: str) -> str:
return '0123456789ABCDEFHJKLMNPRSTUVWXY'[int(number) % 31]
-def validate(number, allow_temporary=False):
+def validate(number: str, allow_temporary: bool = False) -> str:
"""Check if the number is a valid HETU. It checks the format, whether a
valid date is given and whether the check digit is correct. Allows
temporary identifier range for individuals (900-999) if allow_temporary
@@ -104,7 +104,7 @@ def validate(number, allow_temporary=False):
return number
-def is_valid(number, allow_temporary=False):
+def is_valid(number: str, allow_temporary: bool = False) -> bool:
"""Check if the number is a valid HETU."""
try:
return bool(validate(number, allow_temporary))
diff --git a/stdnum/fi/veronumero.py b/stdnum/fi/veronumero.py
index 4513df9b..ca0e92c2 100644
--- a/stdnum/fi/veronumero.py
+++ b/stdnum/fi/veronumero.py
@@ -15,9 +15,7 @@
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA
+# License along with this library; if not, see