Wikidata:Property proposal/ft.dk politician identifier

ft.dk politician identifier edit

Originally proposed at Wikidata:Property proposal/Organization

Descriptionft.dk (the official site of the Danish parliament) has an identifier string in the URL's of biographies of politicians. Politician's items can use this property and e.g. Wikipedia can automatically link the official biography on ft.dk.
Data typeExternal identifier
Domainmember of the Folketing (Q12311817)
Allowed values[\w\-]+
Example 1Carolina Magdalene Maier (Q20197678)carolina-magdalene-maier
Example 2Per Stig Møller (Q697184)per-stig-møller
Example 3Sjúrður Skaale (Q845278)sjúrður-skaale
Sourcehttps://www.google.com/search?q=site%3Ahttps%3A%2F%2Fwww.ft.dk%2Fmedlemmer%2Fmf
External linksUse in sister projects: [ar][de][en][es][fr][he][it][ja][ko][nl][pl][pt][ru][sv][vi][zh][commons][species][wd][en.wikt][fr.wikt].
Planned useautomatically generate links from English and Danish Wikipedia articles of politicians
Number of IDs in sourceat least 179 current members of Folketing, probably double for all former members of the last decade
Expected completenessalways incomplete (Q21873886)
Robot and gadget jobsYes, should validate that the implied URL is not a 404.
See alsoProperty:P6849

Motivation edit

Currently, Danish and English (and presumably other) Wikipedias manually link the politicians official biography. All recent politicians have profile pages like this, the Parliament management writes the biography. By having a property, it would be easier to change the URL prefix, it would be easier to update values across Wikipedias, the value could be automatically used from e.g. da:Template:Infoboks MF. That infobox already shows official URL's, but they are freeform and some politicians have the official bio in there, some do not (for arbitrary reasons). By using this property, information would be organized in a stricter schema. Note that politicians that retired long ago do not have current biographies (their bio's have different URL schemes). This proposal does not concern those politicians.

The different classes of biographies on ft.dk are (as far as I can see):

newish
https://www.ft.dk/medlemmer/folketingetsmedlemmer/altcmma (note that she also has a bio with the current schema https://www.ft.dk/medlemmer/mf/m/merete-dea-larsen . Her item would have this property with value "merete-dea-larsen")
old
http://webarkiv.ft.dk/BAGGRUND/Biografier/Ritt_Bjerregaard.htm (note that she does not have a bio with the current schema or the other old schema. Her item would not use this property, manual linking would continue)
new
https://www.ft.dk/medlemmer/mf/a/aki-matilda-hoeegh-dam (note that she ONLY has a biography with the newest schema. This search with the foreign URL scheme yields no results: [1]. Her item would have this property with value "aki-matilda-hoeegh-dam")

There are also PDF versions, sometimes in English, but I don't think we should link those, they offer no inherent advantage over HTML.

If any biography page on ft.dk loads with no text, set the language to Danish by prepending "/da" to the path portion of the URL.

Note that the part before the last / in the URL is just the first letter of the name. For example, Carolina has a "c" in the URL as seen above. This character can be extracted from the property value by Mediawiki string manipulation functions using Scribunto.

I would set the "formatter URL" to https://www.ft.dk/medlemmer/mf/{{Module:String|sub|s=$1|j=2}}/$1 but the proposal template doesn't accept my syntax with template invocations and nowiki tags.

To see examples of pages that currently have manually inserted external links, and which would be able to use a template extracting data from this property see:

Ysangkok (talk) 18:32, 6 July 2019 (UTC)[reply]

Discussion edit

Is there any way to combine the two versions in the same property? The identifiers can be extracted from each other, but the rules for that cannot be expressed in the formatters as far as I know. --Dipsacus fullonum (talk) 21:26, 7 July 2019 (UTC)[reply]
Oh, didn't realize it was so simple. I propose we just only save the part after the slash, e.g. "carolina-magdalene-maier". Templates can use Lua to take the first character, and generate the Danish bio link programmatically. It can easily be done using e.g. w:Module:String. I am not sure why you are doubting this, since you know about how templates work. As previously mentioned, it would be Wikipedia templates actually generating the links, Wikidata just needs the property so that we'd be able handle the eventual case of a politician where the ID on ft.dk doesn't match the name we store. Actually, we'd probably be able to generate 99% of the links by just taking all names, concatenate them with "-" in between, and prepend the prefix (with the Danish link having the extra duplicated first character). But I would prefer to have this property, since it would be fragile without it. --Ysangkok (talk) 17:48, 8 July 2019 (UTC)[reply]
@Pintoch: Agreed, I changed the proposal. --Ysangkok (talk) 04:59, 19 November 2019 (UTC)[reply]

@ديفيد عادل وهبة خليل 2, Dipsacus fullonum, DannyS712, Trade, Ysangkok:   Done: ft.dk politician ID (P7882). − Pintoch (talk) 16:39, 29 January 2020 (UTC)[reply]