Property talk:P988
Latest comment: 8 years ago by Jura1 in topic Output is wrong
Documentation
Philippine Standard Geographic Code
systematic classification and coding of geographic areas of the Philippines
systematic classification and coding of geographic areas of the Philippines
Description | Systematic classification and coding of geographic areas of the Philippines. It is based on the four well-established hierarchical levels of geographical-political subdivisions of the country such as the administrative region, the province, the municipality/city and the barangay (administrative subdivision). | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Represents | Philippine Standard Geographic Code (Q106248283) | |||||||||
Associated item | Philippine Statistics Authority (Q17067223) | |||||||||
Data type | External identifier | |||||||||
Template parameter | en:template:infobox settlement | |||||||||
Domain | According to this template:
Place
According to statements in the property:
When possible, data should only be stored as statementsadministrative territorial entity of the Philippines (Q1350310) or statistical territorial entity (Q15042037) | |||||||||
Allowed values | (0[1-9]|1[0-7])\d{7} (9-digit numeric string with format RRPPMMBBB, where RR = 2-digit code for region, PP = 2-digit code for province or Metro Manila district, MM = 2-digit code for municipality, city, or Manila district, and BBB = 3-digit code for barangay) | |||||||||
Example | Cordillera Administrative Region (Q13606) → 140000000 Pampanga (Q13870) → 035400000 Cotabato City (Q726993) → 129804000 Busuanga (Q111393) → 175307000 Humayhumay (Q5939706) → 071246023 | |||||||||
Source | https://psa.gov.ph/classification/psgc/ http://nap.psa.gov.ph/activestats/psgc/ | |||||||||
Related to country | Philippines (Q928) (See 3 others) | |||||||||
Lists |
| |||||||||
Proposal discussion | Proposal discussion | |||||||||
Current uses |
| |||||||||
Search for values |
[create Create a translatable help page (preferably in English) for this property to be included here]
Single best value: this property generally contains a single value. If there are several, one would have preferred rank (Help)
List of violations of this constraint: Database reports/Constraint violations/P988#single best value, hourly updated report, SPARQLDistinct values: this property likely contains a value that is different from all other items. (Help)
"exceptions" is incompatible with "mandatory" parameter List of violations of this constraint: Database reports/Constraint violations/P988#Unique value, hourly updated report, SPARQL (every item), SPARQL (by value)Type “administrative territorial entity of the Philippines (Q1350310), statistical territorial entity (Q15042037)”: item must contain property “instance of (P31)” with classes “administrative territorial entity of the Philippines (Q1350310), statistical territorial entity (Q15042037)” or their subclasses (defined using subclass of (P279)). (Help)
List of violations of this constraint: Database reports/Constraint violations/P988#Type Q1350310, Q15042037, hourly updated report, SPARQL List of violations of this constraint: Database reports/Constraint violations/P988#Format, hourly updated report, SPARQL
Format “
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Ilocos Region (Q12933), Metro Manila (Q13580), Cordillera Administrative Region (Q13606), Cagayan Valley (Q13615), Central Luzon (Q13617), Calabarzon (Q13650), Mimaropa (Q13658), Bicol Region (Q13662), Western Visayas (Q13665), Central Visayas (Q13669), Eastern Visayas (Q13675), Zamboanga Peninsula (Q13682), Northern Mindanao (Q13690), Davao Region (Q13694), Soccsksargen (Q13701), Caraga (Q13704), Autonomous Region in Muslim Mindanao (Q13708), Negros Island Region (Q17081785), Bangsamoro (Q806550)^(?!.*(0[1-9]|1[0-79])000?00000).*$
”: value must be formatted using this pattern (PCRE syntax). (Help)List of violations of this constraint: Database reports/Constraint violations/P988#Format, SPARQL
Format “
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Q1126752, Q12741, Q13711, Q13714, Q13721, Q13723, Q13726, Q13727, Q13728, Q13730, Q13737, Q13739, Q13740, Q13744, Q13750, Q13751, Q13752, Q13753, Q13755, Q13759, Q13763, Q13767, Q13769, Q13772, Q13778, Q13785, Q13786, Q13789, Q13791, Q13792, Q13794, Q13806, Q13807, Q13809, Q13810, Q13812, Q13813, Q13825, Q13826, Q13827, Q13829, Q13840, Q13841, Q13843, Q13844, Q13845, Q13846, Q13847, Q13857, Q13860, Q13861, Q13862, Q13863, Q13864, Q13865, Q13866, Q13867, Q13868, Q13869, Q13870, Q13871, Q13872, Q13873, Q13874, Q13875, Q13876, Q13877, Q13879, Q13881, Q13882, Q13884, Q13885, Q13887, Q13889, Q13891, Q13892, Q13893, Q13895, Q13899, Q13900, Q13902, Q15095071, Q1548354, Q3656379, Q1461, Q12933, Q13615, Q13606, Q13617, Q13580, Q13650, Q13658, Q13662, Q13665, Q13669, Q17081785, Q13675, Q13682, Q13690, Q13704, Q13694, Q13701, Q13708, Q92159379, Q92159412, Q92161826, Q92164464, Q806550, Q114019739, Q114019748^(?!.*(0[1-9]|1[0-79])\d\d00000).*$
”: value must be formatted using this pattern (PCRE syntax). (Help)List of violations of this constraint: Database reports/Constraint violations/P988#Format, SPARQL
Item “country (P17): Philippines (Q928)”: Items with this property should also have “country (P17): Philippines (Q928)”. (Help)
List of violations of this constraint: Database reports/Constraint violations/P988#Item P17, hourly updated report, search, SPARQLAllowed 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/P988#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/P988#Scope, SPARQL
|
better validation
edit- Done must always be exactly nine digits (including one leading zero when region code in range 01 - 09).
- Done should be unique
- digits 7,8,9 can only be non-zero when instance of barangay
- digits 5,6 can only be non-zero when instance of city, municipality or barangay
- digits 3,4 can only be non-zero when instance of province, city, municipality or barangay
- Done digits 1,2 cannot be zero
-- Unbuttered Parsnip (talk) 10:49, 29 March 2015 (UTC)
- I have added
{{Constraint:Single value}}
and{{Constraint:Unique value}}
and also improved validation according to digits 1,2 cannot be zero. I am not sure how to validate the rest when there are more conditions. Matěj Suchánek (talk) 11:01, 29 March 2015 (UTC)- I added one to check the non-zeros for non-regions. --- Jura 15:55, 30 October 2015 (UTC)
Output is wrong
editThe code should be a string, with numeric characters. It is not a number, and should not be output with added commas. Mary McAllen (talk) 14:39, 17 April 2016 (UTC)
- The definition of the property seems ok. What text do you see on which page?
--- Jura 14:46, 17 April 2016 (UTC)