Property talk:P429

From Wikidata
Jump to navigation Jump to search

Documentation

dantai code
identifier for administrative division in 6-digit format assigned by the interior ministry of Japan
Representsadministrative territorial entity of Japan (Q1850442)
Has qualitydescriptive identifier (Q22975498), check digit (Q1337960)
Data typeExternal identifier
Template parameter
Domainlocal public entity (Q27116296) or ward of Japan (Q137773)
Allowed values\d{6}
ExampleSapporo (Q37951) → 011002
Kyoto (Q34600) → 261009
Sourcehttps://www.soumu.go.jp/denshijiti/code.html
Related to country Japan (Q17) (See 145 others)
See alsopostal code (P281)
Lists
  • Items with the most statements of this property
  • Count of items by number of statements (chart)
  • Count of items by number of sitelinks (chart)
  • Items with the most identifier properties
  • Items with no other external identifier
  • Items with no other statements
  • Most recently created items
  • Items with novalue claims
  • Items with unknown value claims
  • Usage history (total)
  • Chart by item creation date
  • Database reports/Complex constraint violations/P429
  • Database reports/Constraint violations/P429
  • Map
  • Random list
  • Proposal discussionProposal discussion
    Current uses
    Total1,985
    Main statement1,983 out of 3,380 (59% complete)99.9% of uses
    Qualifier20.1% of uses
    Search for values
    [create Create a translatable help page (preferably in English) for this property to be included here]
    Item “country (P17): Japan (Q17): Items with this property should also have “country (P17): Japan (Q17)”. (Help)
    List of violations of this constraint: Database reports/Constraint violations/P429#Item P17, hourly updated report, search, SPARQL
    Format “\d{6}: value must be formatted using this pattern (PCRE syntax). (Help)
    List of violations of this constraint: Database reports/Constraint violations/P429#Format, hourly updated report, SPARQL
    Distinct values: this property likely contains a value that is different from all other items. (Help)
    List of violations of this constraint: Database reports/Constraint violations/P429#Unique value, hourly updated report, SPARQL (every item), SPARQL (by value)
    Single value: this property generally contains a single value. (Help)
    List of violations of this constraint: Database reports/Constraint violations/P429#Single value, hourly updated report, SPARQL
    Item “coordinate location (P625): Items with this property should also have “coordinate location (P625)”. (Help)
    List of violations of this constraint: Database reports/Constraint violations/P429#Item P625, hourly updated report, SPARQL
    Item “GeoNames ID (P1566): Items with this property should also have “GeoNames ID (P1566)”. (Help)
    Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
    List of violations of this constraint: Database reports/Constraint violations/P429#Item P1566, search, SPARQL
    Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
    Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
    List of violations of this constraint: Database reports/Constraint violations/P429#Entity types
    Scope is as main value (Q54828448): the property must be used by specified way only (Help)
    Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
    List of violations of this constraint: Database reports/Constraint violations/P429#Scope, SPARQL
    Description required in languages: ja: Entities using this property should have descriptions in one of the following languages: ja (Help)
    Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
    List of violations of this constraint: Database reports/Constraint violations/P429#Description in 'ja' language, search, SPARQL
    Invalid Dantai Number
    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

    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)[reply]

    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)[reply]