Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

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
DescriptionSystematic 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).
RepresentsPhilippine Standard Geographic Code (Q106248283)
Associated itemPhilippine Statistics Authority (Q17067223)
Data typeExternal identifier
Template parameteren:template:infobox settlement
Domain
According to this template: Place
According to statements in the property:
administrative territorial entity of the Philippines (Q1350310) or statistical territorial entity (Q15042037)
When possible, data should only be stored as statements
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)
ExampleCordillera Administrative Region (Q13606) → 140000000
Pampanga (Q13870) → 035400000
Cotabato City (Q726993) → 129804000
Busuanga (Q111393) → 175307000
Humayhumay (Q5939706) → 071246023
Sourcehttps://psa.gov.ph/classification/psgc/
http://nap.psa.gov.ph/activestats/psgc/
Related to country  Philippines (Q928) (See 3 others)
Lists
Proposal discussionProposal discussion
Current uses
Total7,044
Main statement7,039>99.9% of uses
Qualifier5<0.1% of 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, SPARQL
Distinct 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)
Format “(0[1-9]|1[0-79])\d{7,8}: value must be formatted using this pattern (PCRE syntax). (Help)
List of violations of this constraint: Database reports/Constraint violations/P988#Format, hourly updated report, 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, 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/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
 
This property is being used by:

Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.)


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)Reply

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)Reply
I added one to check the non-zeros for non-regions. --- Jura 15:55, 30 October 2015 (UTC)Reply

Output is wrong

edit

The 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)Reply

The definition of the property seems ok. What text do you see on which page?
--- Jura 14:46, 17 April 2016 (UTC)Reply
Return to "P988" page.