Property talk:P429
Documentation
identifier for administrative division in 6-digit format assigned by the interior ministry of Japan
List of violations of this constraint: Database reports/Constraint violations/P429#Item P1566, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P429#Entity types
List of violations of this constraint: Database reports/Constraint violations/P429#Scope, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P429#Description in 'ja' language, search, SPARQL
Dantai Number that have wrong checksum (see [1]) (Help)
Violations query:
SELECT ?item ?value { { ?item wdt:P429 ?value } UNION { ?statement pq:P429 ?value . ?item ?p ?statement . ?prop wikibase:claim ?p } UNION { ?ref pr:P429 ?value . ?statement prov:wasDerivedFrom ?ref . ?item ?p ?statement . ?prop wikibase:claim ?p } . FILTER( STRLEN(?value) = 6 ) . BIND( xsd:integer(SUBSTR(?value, 1, 1)) * 6 + xsd:integer(SUBSTR(?value, 2, 1)) * 5 + xsd:integer(SUBSTR(?value, 3, 1)) * 4 + xsd:integer(SUBSTR(?value, 4, 1)) * 3 + xsd:integer(SUBSTR(?value, 5, 1)) * 2 AS ?checksum) . BIND( xsd:string(11 - (?checksum - FLOOR(?checksum / 11) * 11)) AS ?checknum ) . FILTER( SUBSTR(?value, 6, 1) != SUBSTR(?checknum, STRLEN(?checknum), 1) ) } ORDER BY ?value
List of this constraint violations: Database reports/Complex constraint violations/P429#Invalid Dantai Number
This property is being used by:
Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.) |
|
|
Description of the code
[edit]As of April, 2013, there are 47 prefectures, 1,742 municipalities (789 cities, 746 towns, 184 villages, and 23 special wards), and 175 wards in Japan. All prefectures are subdivided into municipalities. Some cities (designated cities) are subdivided into wards.
Each prefecture is assigned a 2-digit JIS X 0401 code (same as the last 2 digits of ISO 3166-2:JP), which is unique nationwide. Each municipality is assigned a 3-digit JIS X 0402 code, which is unique within a prefecture to which the municipality belongs, and the same applies to wards. Cities or wards in different prefectures may have the same 3-digit code.
6-digit zenkoku chihō kōkyō dantai kōdo, literally "nationwide local public entity code", hereinafter "dantai code" for short, is the combination of 2-digit prefecture code and 3-digit municipality code, postfixed by a check digit. It uniquely identifies a municipality or ward in Japan. Prefectures are also assigned dantai codes, and this is (part of) why the code is not "municipality code" but "local public entity code." Dantai codes for prefectures begin with the 2-digit prefecture code, which is followed by 3 zeros and a check digit.
Sapporo is a city in Hokkaidō (a prefecture). Sapporo is subdivided into 10 wards, one of which is Shiroishi Ward. Kyoto City is a city in Kyoto Prefecture. The city has 11 wards, including Nakagyō Ward. Several codes for those are shown in the table.
Dantai code | ISO 3166-2 code | JIS X 0401 prefecture code | JIS X 0402 municipality code | |
---|---|---|---|---|
Number of digits | 6 | 2 except country code | 2 | 3 |
Code for Hokkaidō | 010006 | JP-01 | 01 | N/A |
Code for Sapporo City | 011002 | N/A | N/A | 100 |
Code for Shiroishi Ward | 011045 | N/A | N/A | 104 |
Code for Kyoto Prefecture | 260002 | JP-26 | 26 | N/A |
Code for Kyoto City | 261009 | N/A | N/A | 100 |
Code for Nakagyō Ward | 261041 | N/A | N/A | 104 |
As seen from the table above, Sapporo and Kyoto have the same municipality code 100. In dantai code, 100 is prefixed by a 2-digit prefecture code (01 or 26) and postfixed by a check digit, so that each code unambiguously points to a city in Japan. Since Sapporo is in Hokkaidō (01), its dantai code begins with 01. --F705i (talk) 13:55, 1 May 2013 (UTC)
- According to the statistics as of 6 May 2013, 1,964 Wikidata items use dantai code property. This number is equal to the sum of the numbers of prefectures (47), municipalities (1,742), and wards (175) as of April 2013. However, the number of items using this property may exceed the sum because:
- dantai codes are also assigned to some public corporations (Again, this is why the code is not "municipality code" but "local public entity code."); and because
- Wikidata items for dissolved municipalities may use this property.
- --F705i (talk) 13:49, 7 May 2013 (UTC)
- Japan-related properties
- All Properties
- Properties with external-id-datatype
- Properties used on 1000+ items
- Properties with constraints on type
- Properties with constraints on items using them
- Properties with format constraints
- Properties with unique value constraints
- Properties with single value constraints
- Properties with entity type constraints
- Properties with scope constraints
- Properties with description language constraints
- Properties with complex constraints