Property talk:P442
Documentation
identifier for administrative divisions of People's Republic of China (with spaces)
(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#Item P17, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P442#Item P131, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P442#Single value, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P442#Type Q50231, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P442#Unique value, SPARQL (every item), SPARQL (by value)
List of violations of this constraint: Database reports/Constraint violations/P442#Entity types
List of violations of this constraint: Database reports/Constraint violations/P442#Scope, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P442#Label in 'zh' language, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P442#Label in 'zh-cn' language, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P442#allowed qualifiers, SPARQL
This property is being used by:
Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.) |
|
|
Format
editthe 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)
- I changed the pattern above .. feel free to tweak it further. -- Docu at 14:33, 4 May 2013 (UTC)
\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)
Format#1:xx[ xx[ xx[ xxx[ xxx xxx]]]]
editI 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)
Last 3 digits
editI 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)
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)
- 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)
- @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)
- 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)
- 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)
- 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)
- @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)
- @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)
- @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)
- 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)
Show warning when updating statement
editI 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)
- Support Kethyga (talk) 07:37, 20 January 2022 (UTC)