Property talk:P2171

From Wikidata
Jump to navigation Jump to search

Documentation

TheyWorkForYou ID
identifier in the 'TheyWorkForYou' database of British MPs
DescriptionIdentifer in the 'TheyWorkForYou' database of British MPs
Applicable "stated in" valueTheyWorkForYou (Q7783633)
Data typeExternal identifier
Template parameter|theywork= in en:Template:UK MP links
DomainHumans (note: this should be moved to the property statements)
Allowed values[1-9][0-9]*
ExampleTom Watson (Q263802)11309
Boris Johnson (Q180589)10999
Sourceen.Wikipedia (note: this information should be moved to a property statement; use property source website for the property (P1896))
Formatter URLhttps://www.theyworkforyou.com/mp/$1
Tracking: usageCategory:Pages using Wikidata property P2171 (Q55097229)
Related to country United Kingdom (Q145) (See 329 others)
Lists
Proposal discussionProposal discussion
Current uses
Total14,324
Main statement14,322 out of 14,007 (102% complete)>99.9% of uses
Qualifier2<0.1% of uses
Search for values
[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).
List of violations of this constraint: Database reports/Constraint violations/P2171#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).
List of violations of this constraint: Database reports/Constraint violations/P2171#Single value, SPARQL
Item “instance of (P31): human (Q5): Items with this property should also have “instance of (P31): human (Q5)”. (Help)
List of violations of this constraint: Database reports/Constraint violations/P2171#Item P31, hourly updated report, search, SPARQL
Item “occupation (P106): Items with this property should also have “occupation (P106)”. (Help)
List of violations of this constraint: Database reports/Constraint violations/P2171#Item P106, hourly updated report, search, SPARQL
Format “[1-9][0-9]{4}: value must be formatted using this pattern (PCRE syntax). (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/P2171#Format, 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/P2171#Entity types
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/P2171#Scope, SPARQL

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

Use for non-MPs

[edit]

@pigsonthewing: This property currently has a hard-coded "/mp/" in its formatter URL, which means it can only be set for people who are members of the Commons, and not anyone who is a member of the Lords (e.g https://www.theyworkforyou.com/peer/25000/lord_shipley), an MSP (e.g https://www.theyworkforyou.com/msp/14000/christine_grahame), on an MLA (https://www.theyworkforyou.com/mla/13769/annie_courtney). Assuming that it's sensible to also include all of those under this property (rather than creating new properties for each), perhaps the best thing to do might be to set the formatter URL to "https://www.theyworkforyou.com/", and prefix the existing entries with "mp/"? --Oravrattas (talk) 07:13, 6 March 2017 (UTC)[reply]

Your proposal would break usage in the en.Wikipedia template. New properties for the other types may be better. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 10:55, 6 March 2017 (UTC)[reply]
@Oravrattas, Pigsonthewing: I'm a few months late, but I assume you were referring to en:Template:UK MP links? Although tagging suggests otherwise, it doesn't (yet) use any Wikidata properties. This may soon change, so now would be a good time to consider any changes to this property.
If you try an ambiguous TheyWorkForYou URL such as https://www.theyworkforyou.com/peer/archbishop_of_canterbury it suggests 3 alternatives, including https://www.theyworkforyou.com/mp/?pid=25177 for the incumbent. Note that the offered URLs contain "/mp/" even when the subject is in the Lords. Given that a subject's name and title can change during their lifetime but their 5-digit numerical id remains constant, I think the Wikidata property should either be made numerical or deprecated in favour of a new numerical property. The formatter URL could be https://www.theyworkforyou.com/mp/?pid=$1 although the existing one also works with a numerical id for any MP, Peer, MSP, MLA, etc. I expect someone clever could automate the process of fetching URLs suggested by the current property and reading back the redirected URLs to extract the numerical id. AJP (talk) 11:58, 26 August 2017 (UTC)[reply]
How about a fork of the existing property gets made but altered for peers Back ache (talk) 09:12, 2 October 2020 (UTC)[reply]
It looks like the site itself doesn't care whether the url you go in via contains peer or mp, it just goes by number and then redirects you to the correct URL Back ache (talk) 11:07, 21 March 2023 (UTC)[reply]

2019 ID corrections

[edit]

@Pigsonthewing, Oravrattas, AJP: Picking up on a very old discussion...

I've spoken to the designers and it seems that their preferred identifier is the number - this is reliably unique, whereas (potentially) the text name might be ambiguous and have trouble resolving to the correct item; see eg john_smith. In those cases, we would need to add the numeric ID anyway to disambiguate.

It seems that the current URL formatter can cope with either 11309 or tom_watson; both will be redirected to the final URL (mp/11309/tom_watson/west_bromwich_east). Because the URL will work whatever formatting is used, switching from the text to the number should not require any change to the formatter URL, and should not affect anything for downstream users - the only one listed here is the enwiki template, and that already seems just fine with only the number (see eg w:Diana Johnson).

Given this, would anyone object to my switching these over to the relevant numeric values, and changing the format constraints accordingly? Andrew Gray (talk) 23:26, 28 January 2019 (UTC)[reply]

@Andrew Gray: that sounds good to me. It's more effective for MPs, and also lets us use the same property for Lords, MLAs, MSPs, etc too. Do you already have all the required data, or can I help out in any way with that? --Oravrattas (talk) 06:36, 29 January 2019 (UTC)[reply]
  • Yes, this is my interpretation as well - it doesn't seem to be repurposing as this has the same scope and the same target pages, it just corrects the identifier used. Anyone already using this property in a query or on WP (if anyone is?) will still get something that works as a result, without having to change anything. (At the moment we already have quite a mishmash of IDs and some are already using alternative formats...) Andrew Gray (talk) 22:27, 30 January 2019 (UTC)[reply]
    • It's a different scheme. It's a general approach of Wikidata to provide stable identifier for concepts. If you think this scheme should no longer include in Wikidata, the right thing to do is to list it for deletion. If a new scheme should be added, a new property should be proposed. It's fairly straightforward processes. --- Jura 14:01, 3 February 2019 (UTC)[reply]
  • I think you have misunderstood what's being proposed here. We are trying to fix this property to do just that, point to the correct stable identifier. If there is explicit policy saying we can't do it this way, please point it out and I will be happy to go through the deletion/recreation process, but otherwise it seems that it would just be a waste of time without making any practical difference. Andrew Gray (talk) 15:54, 3 February 2019 (UTC)[reply]
  • The identifier that was proposed isn't that one you are trying to "fix" this to. I understand that some organizations attempt to "fix" Wikidata for their own purposes, but this a meant to be a stable public resource. --- Jura 08:36, 10 February 2019 (UTC)[reply]
  • The identifier that was proposed is "a person in this database". We simply got the format of the preferred ID wrong, as the text strings are not reliably unique or stable. (I note that the original proposer of the property, is in support of the change.) Anyone using the text-only format will not be inconvenienced by this change, and any URL structures expecting the text-only format will work seamlessly if they use the numbers instead. I think you are making a great problem out of nothing here. Andrew Gray (talk) 12:40, 10 February 2019 (UTC)[reply]
@Andrew Gray: Fine by me too. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 10:39, 29 January 2019 (UTC)[reply]
 Support, as this will make it significantly easier to integrate Wikidata data with existing information in ParlParse (which uses the static numerical identifier, as opposed to the potentially changeable slug). --jacksonj04 (talk) 12:21, 31 January 2019 (UTC)[reply]
@Andrew Gray: Is there any motion on this? The format violations report has a fair few items on it where people are including constituencies etc, and a slug is mutable and as mentioned is not always a 1-1 match with a person. --jacksonj04 (talk) 14:54, 28 November 2019 (UTC)[reply]
@Jacksonj04: Sorry, I think I dropped the ball on this one! We should be okay to switch, I think I got sidetracked into trying to do lookups for text slugs > numeric IDs and never quite got back to it when that stalled. Andrew Gray (talk) 20:24, 29 November 2019 (UTC)[reply]

List of people with the ID

[edit]

I have setup an automated list of who has the ID but the list is too long for the system to cope (1200 entries atm) so have restricted it to just 100 as a proof of concept (it makes it easy to see who os missing ID's)

Property talk:P2171/who Back ache (talk) 08:52, 22 March 2023 (UTC)[reply]