Wikidata:Property proposal/Check Digit

Check Digit edit

Originally proposed at Wikidata:Property proposal/Generic

   Not done
Representscheck digit (Q1337960)
Data typeString
Allowed values[0-9]
Allowed unitsnumbers
Example 1Oss railway station (Q801301)https://m.ter.sncf.com/occitanie/se-deplacer/gares/oss-84844950
Example 2Luxembourg railway station (Q801140)https://www.ter.sncf.com/grand-est/se-deplacer/gares/luxembourg-82001000
Example 3Stockholm Central Station (Q54315)https://m.ter.sncf.com/occitanie/se-deplacer/gares/stockholms-central-74037510
Planned useFor documenting (incorrect) UIC station code (P722) 8 numbers
Number of IDs in source+10000
Expected completenesseventually complete (Q21873974) (eventually complete)
Formatter URLhttps://m.ter.sncf.com/occitanie/se-deplacer/gares/(value of P722)$1 (Not sure if can combine multiple values 😅)
See alsoEarlier discussions on the https://www.wikidata.org/wiki/Property_talk:P722 page
Single-value constraintyes

Motivation edit

UIC station codes (UIC station code (P722)) normally exist out of 7 numbers, the first 2 are the country code, the last 5 are location specific. As far as my knowledge the Société nationale des chemins de fer français (Q13646) system is the only system that uses an eight number, a luhn check digit calculated with the 5 numbers.

Unfortunately I noticed a couple of cases where the check digit inside the SNCF system is incorrect with the expected value, it would be neat if I could document those inconsistencies.

E.g. take this station in the SNCF system https://www.ter.sncf.com/grand-est/se-deplacer/gares/luxembourg-82001000

The UIC code is: 8200100 The (luhn) check digit should be: 8 (2*0+0+2*1+0+2*0=2 -> 10-2=8) But, as seen in the last digit of the url, the SNCF system uses a 0 instead.

This inconsistencies also exist for:

As such I would like to document these values as:

UIC station code (P722) with qualifier "check digit" x

(I can imagine this property could be used as qualifier of more properties, I am just not aware for which properties it would be useful for...)

 – The preceding unsigned comment was added by LisaOmbos (talk • contribs).

Discussion edit

  Not done @LisaOmbos, ChristianKl, Infrastruktur, Push-f: sitting idle for months. re apply if you can respond to the given concern. BrokenSegue (talk) 05:19, 29 June 2023 (UTC)[reply]