Property talk:P1937

From Wikidata
Jump to navigation Jump to search

Documentation

UN/LOCODE
geographic location code mantained by UNECE
[create Create a translatable help page (preferably in English) for this property to be included here]
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). Known exceptions: Leonardo da Vinci–Fiumicino Airport (Q19101), Fiumicino (Q19326)
List of violations of this constraint: Database reports/Constraint violations/P1937#Unique value, SPARQL (every item), SPARQL (by value)
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). Known exceptions: Benevento (Q13437), Casarza Ligure (Q267157), Voltri (Q1516072), Brunswick (Q755813), DuPont (Q128112)
List of violations of this constraint: Database reports/Constraint violations/P1937#Single value, SPARQL
Format “(A[D-GILMOQ-UWXZ]|B[ABIE-HDJLM-OQR-TWYZ]|C[ACDF-IK-ORU-Z]|D[EJKMOZ]|E[CEGHRST]|F[I-KMOR]|JE|G[ABD-IL-UWY]|H[KMNRTU]|I[DELMNOQRST]|J[MOP]|K[EGHIMNPRWY]|K[YZ]|L[ABCIKR-VY]|M[AC-HKL-Z]|N[ACE-ILO-PRUZ]|OM|[P-Z][A-Z]+)[A-Z0-9]{3}: value must be formatted using this pattern (PCRE syntax). (Help)
"exceptions" is incompatible with "mandatory" parameter List of violations of this constraint: Database reports/Constraint violations/P1937#Format, hourly updated report, SPARQL
Item “coordinate location (P625): Items with this property should also have “coordinate location (P625)”. (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/P1937#Item P625, 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/P1937#Entity types
Item “instance of (P31): Items with this property should also have “instance of (P31)”. (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/P1937#Item P31, search, SPARQL
Scope is as main value (Q54828448), as reference (Q54828450): 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/P1937#Scope, SPARQL

Codelist mantained by an UN agency for economic and transportation business activity. It's related to the IATA code in case of a city with an airport. It's a standard in trade, for example in the logistic sector. UNECE releases two editions per year.

The code is made by two parts: first two letters come from ISO Alpha 2 code, the others identify the location. A "formal" description is in this datapackage. The extracted latest data is in code-list csv

Exceptions for single value ?[edit]

Now, these 3 items have only one value.
In fact, all ports, cities, railways stations… have only one UNLOCODE.
Pyrog (talk) 19:21, 20 November 2019 (UTC)[reply]

for the constraint violation I see
* DEBNK: Brinker Hafen (Q917482),
* Ports de Hanovre (Q24283378).

But that's due to a wrong request: Ports de Hanovre lists the harbors around Hanover and Brinker Hafen is one of them. --OuiQui (talk) 11:49, 21 November 2019 (UTC)[reply]

Distinct values ?[edit]

The UN/LOCODE is attributed to one city and it's infrastructures.
So each UN/LOCODE could be duplicated 9 times (The city plus it's 8 functions).

Example:

  • Port Hueneme (USNTD) have the function 1234-6-- : port, rail, road, airport, depot
  • Berlin (DEBER) have the function 12345--- : port, rail, road, airport, postal

So does this rule is good ?
Or should we add exceptions ?

Currently, there is more than 60 Unique value violations.

Pyrog (talk) 19:55, 20 November 2019 (UTC)[reply]

Adding the function to allow (false) duplicates would make sense. As qualifier or changing the syntax to UN/LOCODE-Function for infrastructure. --OuiQui (talk) 21:28, 20 November 2019 (UTC)[reply]
"Distinct values" means that UN/LOCODE designate unique places. The place is unique, not the infrastructure. Like for IATA code: airports around Paris have the common PAR code but each airport has another one (CDG for Charles de Gaulle airport). Same for instance for Washington DC: WAS is the shared IATA code but Dulles airport has IAD. So if you ask for a Paris-Washington DC flight, PAR-WAS is fine. And direct flights will be CDG-IAD, but you may see CDG-BWI flights too. Here we don't seem to have a secondary and unique ID. PAR means "Paris airports", not a specific airport in Paris. and 2 means you can come to Paris by the air. --OuiQui (talk) 11:45, 21 November 2019 (UTC)[reply]

What Items should this property be used on?[edit]

This item is being used on cities like Oslo (Q585) and non cities like Port of Houston (Q1921365). Can the intent of this property be clarified so that it is clearer which uses are correct and which are wrong? Iwan.Aucamp (talk) 15:45, 3 March 2020 (UTC)[reply]

WikiProject Properties has more than 50 participants and couldn't be pinged. Please post on the WikiProject's talk page instead.

@Iwan.Aucamp: This should only be added to the actual item to which the UN/LOCODE is assigned. In your example Oslo (Q585), it appears to be correct, but for Port of Houston (Q1921365), the UN/LOCODE "USHOU" is for the entire city of Houston, not the Port of Houston specifically, so that is an incorrect use of the property. Not everything in Houston should have "USHOU", just 1983 Austrian Grand Prix (Q15566). The property constraint exists and flags multiple uses of the same value. Josh Baumgartner (talk) 19:07, 3 March 2020 (UTC)[reply]