Property talk:P442

From Wikidata
Jump to navigation Jump to search

Documentation

China administrative division code
identifier for administrative divisions of People's Republic of China (with spaces)
DescriptionAdministrative division codes of the People's Republic of China used by National Bureau of Statistics of the People's Republic of China
Representsadministrative division codes of the People's Republic of China (Q4683503)
Has qualitydescriptive identifier (Q22975498)
Data typeExternal identifier
Template parametere.g. zh:Infobox China County
Domain
According to this template: administrative divisions in China
According to statements in the property:
administrative territorial entity of the People's Republic of China (Q50231)
When possible, data should only be stored as statements
Allowed values(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|71|8[1-2])( (0[1-9]|[1-6]\d|70|90)( (0[1-9]|[1-9]\d)( (00[1-9]|0[1-9]\d|[1-5]\d\d)( (00[1-9]|0[1-9]\d|[1-5]\d\d)( (11[1-2]|12[1-3]|2[1-2]0))?)?)?)?)?
ExampleYangpu District (Q661533) → 31 01 10
Beijing (Q956) → 11
Tracking: sameno label (Q55283229)
Tracking: differencesno label (Q55283230)
Tracking: usageCategory:Pages using Wikidata property P442 (Q55283228)
Tracking: local yes, WD nono label (Q55283232)
Related to country People's Republic of China (Q148) (See 127 others)
Lists
Proposal discussionProposal discussion
Current uses
Total745,490
Main statement745,487>99.9% of uses
Qualifier2<0.1% of uses
Reference1<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Format “(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|71|8[1-2])( (0[1-9]|[1-6]\d|70|90)( \d\d( (00[1-9]|0[1-9]\d|[1-5]\d\d)( (00[1-9]|0[1-9]\d|[1-5]\d\d)( (11[1-2]|12[1-3]|2[1-2]0))?)?)?)?)?: value must be formatted using this pattern (PCRE syntax). (Help)
List of violations of this constraint: Database reports/Constraint violations/P442#Format, hourly updated report, SPARQL
Item “country (P17): People's Republic of China (Q148): Items with this property should also have “country (P17): People's Republic of China (Q148)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Spratly Islands (Q215664)
List of violations of this constraint: Database reports/Constraint violations/P442#Item P17, search, SPARQL
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Spratly Islands (Q215664)
List of violations of this constraint: Database reports/Constraint violations/P442#Item P131, search, SPARQL
Single value: this property generally contains a single value. (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/P442#Single value, SPARQL
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/P442#Type Q50231, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (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/P442#Unique value, SPARQL (every item), SPARQL (by value)
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/P442#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/P442#Scope, SPARQL
Label required in languages: zh: Entities using this property should have labels in one of the following languages: zh (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/P442#Label in 'zh' language, search, SPARQL
Label required in languages: zh-cn: Entities using this property should have labels in one of the following languages: zh-cn (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/P442#Label in 'zh-cn' language, search, SPARQL
Qualifiers “start time (P580), end time (P582): this property should be used only with the listed qualifiers. (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/P442#allowed qualifiers, SPARQL

Format[edit]

the full code format is actually "xx xx xx xxx xxx xxx". See [1]

xx 00 00 000 000 000 for Province level division

xx xx 00 000 000 000 for prefecture level division

xx xx xx 000 000 000 for county level division

... ...

I support ignoring the trailing zeros. So does User:Stevenliuyi --凡其Fanchy 14:31, 4 May 2013 (UTC)[reply]

I changed the pattern above .. feel free to tweak it further. --  Docu  at 14:33, 4 May 2013 (UTC)[reply]
\d\d\(\d\d\(\d\d\(\d\d\d\(\d\d\d\d\d\d\)\?\)\?\)\?\)\?(vim regex format).
I tried this format. In this way, no space will be toleranted. Also I noticed that there is no code like xx xx xx xxx xxx 000.
xx xx xx xxx 000 000 for townships
xx xx xx xxx xxx xxx for the villages. the last 3 digits are for classification.--凡其Fanchy 15:14, 4 May 2013 (UTC)[reply]

Format#1:xx[ xx[ xx[ xxx[ xxx xxx]]]][edit]

I changed the pattern above according to 国家统计局设管司解读《统计用区划代码》和《统计用城乡划分代码》统计用区划代码和城乡划分代码编制规则GB/T2260-2007.

((1[1-5])|(2[1-3])|(3[1-7])|(4[1-6])|(5[0-4])|(6[1-5])|(71)|(8[1-2]))( ((0[1-9])|([1-6]\d)|(70))( ((0[1-9])|([1-9]\d))( ((00[1-9])|(0[1-9]\d)|([1-5]\d\d))( ((00[1-9])|(0[1-9]\d)|([1-5]\d\d)) ((11[1-2])|(12[1-3])|(2[1-2]0)))?)?)?)?

Spaces are used, because it is very easy for computer to eliminate spaces, but with spaces it will be more readable for human.--凡其Fanchy 10:02, 7 May 2013 (UTC)[reply]

Last 3 digits[edit]

I changed the pattern a bit to make the last three digits optional. It's not available from all sources (specifically, current data on Wikipedia). Also, as seen on pages like [2], they're actually another code, and maybe feasible for a new property. Liangent (talk) 08:13, 13 June 2013 (UTC)[reply]

This property's P625 constraint...[edit]

...has the largest set of items under a single combination of property--this property--and constraint type--"item with this should have that" (it's very clearly not the ones for P17 and P131 that are populating this set). I don't think anyone came to a consensus on whether the information in this GitHub repo could be imported; should this not be the case, is there any other plan to add coordinates (as well as, at the bare minimum, Pinyin names) for every Chinese village? (Or should we shudders remove that constraint entirely?)

@GZWDer, Liangent, Liuxinyu970226, Hat600, Fantasticfears: @Jimmy Xu, ValterVB: from the previous discussion last year. Mahir256 (talk) 05:09, 11 September 2018 (UTC)[reply]

I don't maintain P442 values, maybe editors who edited templates that use this property can join here: @Isnow, 长夜无风, Zanhsieh, Lindasc, Xhtongyin:@Dingar, Nthgd, Alberth2, Tommylung, User3204:@Fxqf, Symplectopedia, WhitePhosphorus, Chk2011, Great Brightstar:@Πrate, Wcam, Cncs wikipedia, Alancrh, Isakoshekso:@Shizhao, Miffy bunny, Marcushsu, 辻畠, Zzptslk:@Myheimu, Patvoiiage, A0110110010, JC1, Mankuen:@Siyuwj, Qin5824, 白布飘扬, Iflwlou, Liflon:@Ginbayashi, Huhaoyu321, 忠国人, Li3939108, Tjl1128:@Jack No1, Nexus217, Makecat:. --Liuxinyu970226 (talk) 10:16, 11 September 2018 (UTC)[reply]
@Mahir256: Nobody has the time at this moment. But it will be an interesting task as a simple project in a month. But why you bring up P625 here?--89.160.24.163 18:10, 31 October 2018 (UTC)[reply]
If you look at this property, you will notice that there is a requirement that items with a P442 statement also have a P625 statement (one of the 'item requires statement constraint' statements on this property). Importing the coordinates from the dataset I mentioned above would immediately (wholly?) rectify this problem. Mahir256 (talk) 18:14, 31 October 2018 (UTC)[reply]
  • Maybe it should be added with a (new) property for the local coordinate system. It does seem odd that we have plenty of items for these without any coordinates and fairly uninformative descriptions such as "village in China". --- Jura 18:15, 31 October 2018 (UTC)[reply]
The IP address was me. I get your question now. It doesn't make sense for P442 having constraints P625 to me. One is coordination. The other is zip code designed by people. It should be purely orthogonal.--Fantasticfears (talk) 22:59, 1 November 2018 (UTC)[reply]
@Fantasticfears: So you don't think that items that clearly represent geographical places, if they have identifiers in a catalogue of geographic places provided by the Chinese government, should have at least coordinate locations as a way to identify these geographical places on a map? Mahir256 (talk) 21:54, 30 January 2019 (UTC)[reply]
@Mahir256: Of course it does. But the properties are not on top of each other. If we only have a geo point, it makes sense to put them together as properties of a location. If we have a region coordinates like Sweden, we might design something else.--Fantasticfears (talk) 13:57, 31 January 2019 (UTC)[reply]

Show warning when updating statement[edit]

I have encountered various instances recently that users directly replaced out-of-date IDs with new IDs, instead of adding new statements and setting qualifier end time (P582) to old IDs. So I think probably we can warn users when they are trying to update exisiting IDs with an filter like:

'/* wbsetclaim-update:2||1 */ [[Property:P442]]' in summary

Also we can display a warning message like:

Warning: If you are trying to replace out-of-date value of China administrative division code (P442), you should create a new statement for the new value with qualifier start time (P580) and preferred rank, and then add qualifier end time (P582) to the old value.

Any thoughts? --Stevenliuyi (talk) 00:50, 2 September 2020 (UTC)[reply]

 Support Kethyga (talk) 07:37, 20 January 2022 (UTC)[reply]