Politics Template‑class | |||||||
|
United Kingdom Template‑class | |||||||
|
At present the current session is hard coded to 2013-14. The actual current session is 2015-16. However fixing this would mean breaking the template for former MPs. A more permanent fix is needed.
There also exists a gap between the end of the hansard.millbanksystems.com records in 2005 and the current session on parliament.uk. Parliament.uk contains a Hansard indexed by MP from 2006-07. I suggest hansardcurr should link to each session from 2006 to date. The MP's identifier seems to be a constant - using the doc example, Nick Clegg is 2631 in both the 2013-14 and 2015-16 sessions. This could be done without any alteration to the current set of parameters.
Later an mp_start and mp_end could be added to restrict the range of session links generated to those years where the subject was actually an MP. Bazj ( talk) 10:22, 2 June 2015 (UTC)
Perhaps we could link to TheyWorkForYou search instead, e.g. [1], which would obviate the need for additional parameters. Alakzi ( talk) 13:10, 12 July 2015 (UTC)
The Guardian links are all diverting to www.theguardian.com/politics and no longer have any material relating to the politicians in question. I propose removing the Guardian links from the template. Bazj ( talk) 13:18, 2 June 2015 (UTC)
I've written a blog post, about an issue which may affect this template: United Kingdom parliamentary URL structure: change needed. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:23, 23 July 2015 (UTC)
Are all the properties used in this template available in Wikidata now?
We should give some thought to making this template call values from Wikidata. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:26, 23 July 2015 (UTC)
|hansardcurr=
, |publicwhip=
, |theywork=
|record=
and |bbc=
, all at
d:Wikidata:Property proposal/Authority control. We should be able to proceed with the rest immediately.
Andy Mabbett (Pigsonthewing);
Talk to Andy;
Andy's edits
21:25, 13 September 2015 (UTC)
|hansardcurr=
will resolve the problem... The formatter URL you cite in the request hardcodes the 2013-14 session, will that be (become) a problem? Thanks,
Bazj (
talk)
12:04, 14 September 2015 (UTC)
| parliament = P1996 | hansard = P2015 | hansardcurr = P2170 (faulty, hardcodes the 2013-14 session) | publicwhip = P2169 | theywork = P2171 | record = P2172 | bbc = P2173 | journalisted = P1714
What happened with this? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:28, 20 June 2017 (UTC)
|hansard=
parameter.
|hansard=
parameter. I've modified
Template:UK MP links/Wikidata accordingly, but please check.
AJP (
talk)
09:46, 29 July 2017 (UTC)Anyway, compare:
{{UK MP links | parliament = nick-clegg/1563 | hansardcurr = 2631 | hansard = mr-nick-clegg | publicwhip = Nicholas_Clegg | theywork = nicholas_clegg | record = Nick-Clegg/Sheffield-Hallam/1086 | journalisted = nick-clegg}}
→
with:
{{UK MP links/Wikidata |qid=Q189947}}
→
or with links for Commons and Lords, sometimes suppressed:
Obviously, you don't give the qid when using the template in an article (that's just included so we can see what it looks like from here). Let me know if you manage to sort out the urls, or if you run into any other problems. -- RexxS ( talk) 18:43, 28 July 2017 (UTC)
|firstyear=
and |finalyear=
parameters to allow suppression of displayed links where necessary, without requiring any changes in Wikidata? If |firstyear=
2005 or later (e.g.
Nick Clegg) then the Hansard 1803–2005 link would not be displayed; if 2010 or later (e.g.
Stella Creasy) then the 2006–07 to 2009–10 links needn't be displayed either. Similarly, if |finalyear=
before 2010 (e.g.
Tony Blair) then Hansard 2010–present would not be displayed, but the Parliament Profile still could be if
(P1996) or |parliament=
is given. These parameters could perhaps also change the displayed 2010–present to 2010–2015 or similar if so desired. In many cases omitting these formatting parameters would still yield acceptable results.
AJP (
talk)
21:35, 30 July 2017 (UTC)|house=
that can be set to |house=lords
instead of relying on
member of the House of Lords (Q18952564). I briefly thought TheyWorkForYou would be a problem for non-MPs because the URL includes "/mp/", but see
d:Property_talk:P2171 where that issue and numerical ids are discussed. I've removed the Westminster Parliamentary Record link because the website is dead.|house=lords
by default. My main concern is that the Wikidata-enabled template over-complicates matters by being too prescriptive.
AJP (
talk)
11:34, 2 September 2017 (UTC)Recap:
So that for Stella Creasy, d:Q291502,
In a case of "be careful what you wish for", Pigsonthewing's wish above for a purely numerical key to the data seems to have been half answered with a new all-years entry point to an MP's Hansard at https://hansard.digiminster.com/search/MemberContributions?memberId=4088&type=Spoken which is keyed on the numerical part of P1966.
The access via P2170 still works, but I don't see any way to locate the ID for any MP for whom we don't already have it. The access to the profile works using a variant of P1966... http://www.parliament.uk/biographies/Commons/member/4088
The sandbox version is a Wikidata-based version of the template which would be ready to go once this issue is resolved.
So,... any ideas/preferences/wishlists on where we go from here, Wikidata-wise, template-wise...?
Thanks to Andrew Gray and RexxS on helping me fathom Wikidata to try & code a session-by-session access to Hansard. It was nearly there when I found the goalposts had changed. Pinging BrownHairedGirl & Izkala from previous discussion.
TIA, Bazj ( talk) 18:05, 29 April 2016 (UTC)
The BBC links recently started redirecting to
http://www.bbc.co.uk/news/politics/parliaments rather than the profile of the specified politician. I asked the BBC if this was just a temporary phenomenon and was told they have "permanently removed the profiles for operational reasons." I suggest the |bbc=
parameter should be removed from this template and its documentation, but thought I should seek a second opinion before breaking anything.
AJP (
talk)
19:56, 5 October 2016 (UTC)
|bbc=
parameter (as was done for
#Guardian above) if nobody objects?
AJP (
talk)
11:15, 9 October 2016 (UTC)Links to a particular session of Hansard under
http://www.publications.parliament.uk are not supported beyond the 2015-16 session, as
[2] says it is now an archive. However, Hansard is now available for current and previous sessions back to 2010 under
https://hansard.parliament.uk instead, indexed by the numerical part of our existing |parliament
parameter. I have a few suggestions, illustrated using
Michael Fallon as an example:
|parliament = sir-michael-fallon/88 |hansard = mr-michael-fallon |hansardcurr = 3183
Although he was only knighted in 2016, the |parliament
parameter suggested at
[3] has already changed accordingly. I'd be keen to ignore and ultimately deprecate the somewhat arbitrary name prefixes in |parliament
parameters, with only the numerical part required in future. Something like the following code could help isolate just the numerical part for backward compatibility, whether a name prefix has been included or not:
{{#invoke:String|replace|source={{{parliament}}}|pattern=.*/|replace=|plain=false}}
Contributions from the 2010 session onward can then be found using the numerical part of the |parliament
parameter:
There is a link from the above page to the corresponding Parliament Profile that doesn't bother with a name prefix but uses "member" instead, followed by the numerical part:
Hansard for 1803–2005 still works using the existing |hansard
parameter:
The |hansardcurr
parameter can fill in some gaps between 2005 and 2010 (sadly not the 2005–06 session) to produce something like:
I note earlier discussions (in no particular order: Pigsonthewing, Cabayi, BrownHairedGirl, et al.) and would welcome any comments. AJP ( talk) 20:03, 19 December 2016 (UTC)
It seems that more current MPs than not are on Twitter. Shall we add a parameter for that to this template? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:14, 11 June 2017 (UTC)
See Wikipedia_talk:WikiProject_Politics_of_the_United_Kingdom#Does_a_summary_of_an_MP's_parliamentary_voting_record_belong_on_Wikipedia? for a relevant discussion. Pam D 08:44, 23 July 2021 (UTC)
Politics Template‑class | |||||||
|
United Kingdom Template‑class | |||||||
|
At present the current session is hard coded to 2013-14. The actual current session is 2015-16. However fixing this would mean breaking the template for former MPs. A more permanent fix is needed.
There also exists a gap between the end of the hansard.millbanksystems.com records in 2005 and the current session on parliament.uk. Parliament.uk contains a Hansard indexed by MP from 2006-07. I suggest hansardcurr should link to each session from 2006 to date. The MP's identifier seems to be a constant - using the doc example, Nick Clegg is 2631 in both the 2013-14 and 2015-16 sessions. This could be done without any alteration to the current set of parameters.
Later an mp_start and mp_end could be added to restrict the range of session links generated to those years where the subject was actually an MP. Bazj ( talk) 10:22, 2 June 2015 (UTC)
Perhaps we could link to TheyWorkForYou search instead, e.g. [1], which would obviate the need for additional parameters. Alakzi ( talk) 13:10, 12 July 2015 (UTC)
The Guardian links are all diverting to www.theguardian.com/politics and no longer have any material relating to the politicians in question. I propose removing the Guardian links from the template. Bazj ( talk) 13:18, 2 June 2015 (UTC)
I've written a blog post, about an issue which may affect this template: United Kingdom parliamentary URL structure: change needed. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:23, 23 July 2015 (UTC)
Are all the properties used in this template available in Wikidata now?
We should give some thought to making this template call values from Wikidata. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:26, 23 July 2015 (UTC)
|hansardcurr=
, |publicwhip=
, |theywork=
|record=
and |bbc=
, all at
d:Wikidata:Property proposal/Authority control. We should be able to proceed with the rest immediately.
Andy Mabbett (Pigsonthewing);
Talk to Andy;
Andy's edits
21:25, 13 September 2015 (UTC)
|hansardcurr=
will resolve the problem... The formatter URL you cite in the request hardcodes the 2013-14 session, will that be (become) a problem? Thanks,
Bazj (
talk)
12:04, 14 September 2015 (UTC)
| parliament = P1996 | hansard = P2015 | hansardcurr = P2170 (faulty, hardcodes the 2013-14 session) | publicwhip = P2169 | theywork = P2171 | record = P2172 | bbc = P2173 | journalisted = P1714
What happened with this? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:28, 20 June 2017 (UTC)
|hansard=
parameter.
|hansard=
parameter. I've modified
Template:UK MP links/Wikidata accordingly, but please check.
AJP (
talk)
09:46, 29 July 2017 (UTC)Anyway, compare:
{{UK MP links | parliament = nick-clegg/1563 | hansardcurr = 2631 | hansard = mr-nick-clegg | publicwhip = Nicholas_Clegg | theywork = nicholas_clegg | record = Nick-Clegg/Sheffield-Hallam/1086 | journalisted = nick-clegg}}
→
with:
{{UK MP links/Wikidata |qid=Q189947}}
→
or with links for Commons and Lords, sometimes suppressed:
Obviously, you don't give the qid when using the template in an article (that's just included so we can see what it looks like from here). Let me know if you manage to sort out the urls, or if you run into any other problems. -- RexxS ( talk) 18:43, 28 July 2017 (UTC)
|firstyear=
and |finalyear=
parameters to allow suppression of displayed links where necessary, without requiring any changes in Wikidata? If |firstyear=
2005 or later (e.g.
Nick Clegg) then the Hansard 1803–2005 link would not be displayed; if 2010 or later (e.g.
Stella Creasy) then the 2006–07 to 2009–10 links needn't be displayed either. Similarly, if |finalyear=
before 2010 (e.g.
Tony Blair) then Hansard 2010–present would not be displayed, but the Parliament Profile still could be if
(P1996) or |parliament=
is given. These parameters could perhaps also change the displayed 2010–present to 2010–2015 or similar if so desired. In many cases omitting these formatting parameters would still yield acceptable results.
AJP (
talk)
21:35, 30 July 2017 (UTC)|house=
that can be set to |house=lords
instead of relying on
member of the House of Lords (Q18952564). I briefly thought TheyWorkForYou would be a problem for non-MPs because the URL includes "/mp/", but see
d:Property_talk:P2171 where that issue and numerical ids are discussed. I've removed the Westminster Parliamentary Record link because the website is dead.|house=lords
by default. My main concern is that the Wikidata-enabled template over-complicates matters by being too prescriptive.
AJP (
talk)
11:34, 2 September 2017 (UTC)Recap:
So that for Stella Creasy, d:Q291502,
In a case of "be careful what you wish for", Pigsonthewing's wish above for a purely numerical key to the data seems to have been half answered with a new all-years entry point to an MP's Hansard at https://hansard.digiminster.com/search/MemberContributions?memberId=4088&type=Spoken which is keyed on the numerical part of P1966.
The access via P2170 still works, but I don't see any way to locate the ID for any MP for whom we don't already have it. The access to the profile works using a variant of P1966... http://www.parliament.uk/biographies/Commons/member/4088
The sandbox version is a Wikidata-based version of the template which would be ready to go once this issue is resolved.
So,... any ideas/preferences/wishlists on where we go from here, Wikidata-wise, template-wise...?
Thanks to Andrew Gray and RexxS on helping me fathom Wikidata to try & code a session-by-session access to Hansard. It was nearly there when I found the goalposts had changed. Pinging BrownHairedGirl & Izkala from previous discussion.
TIA, Bazj ( talk) 18:05, 29 April 2016 (UTC)
The BBC links recently started redirecting to
http://www.bbc.co.uk/news/politics/parliaments rather than the profile of the specified politician. I asked the BBC if this was just a temporary phenomenon and was told they have "permanently removed the profiles for operational reasons." I suggest the |bbc=
parameter should be removed from this template and its documentation, but thought I should seek a second opinion before breaking anything.
AJP (
talk)
19:56, 5 October 2016 (UTC)
|bbc=
parameter (as was done for
#Guardian above) if nobody objects?
AJP (
talk)
11:15, 9 October 2016 (UTC)Links to a particular session of Hansard under
http://www.publications.parliament.uk are not supported beyond the 2015-16 session, as
[2] says it is now an archive. However, Hansard is now available for current and previous sessions back to 2010 under
https://hansard.parliament.uk instead, indexed by the numerical part of our existing |parliament
parameter. I have a few suggestions, illustrated using
Michael Fallon as an example:
|parliament = sir-michael-fallon/88 |hansard = mr-michael-fallon |hansardcurr = 3183
Although he was only knighted in 2016, the |parliament
parameter suggested at
[3] has already changed accordingly. I'd be keen to ignore and ultimately deprecate the somewhat arbitrary name prefixes in |parliament
parameters, with only the numerical part required in future. Something like the following code could help isolate just the numerical part for backward compatibility, whether a name prefix has been included or not:
{{#invoke:String|replace|source={{{parliament}}}|pattern=.*/|replace=|plain=false}}
Contributions from the 2010 session onward can then be found using the numerical part of the |parliament
parameter:
There is a link from the above page to the corresponding Parliament Profile that doesn't bother with a name prefix but uses "member" instead, followed by the numerical part:
Hansard for 1803–2005 still works using the existing |hansard
parameter:
The |hansardcurr
parameter can fill in some gaps between 2005 and 2010 (sadly not the 2005–06 session) to produce something like:
I note earlier discussions (in no particular order: Pigsonthewing, Cabayi, BrownHairedGirl, et al.) and would welcome any comments. AJP ( talk) 20:03, 19 December 2016 (UTC)
It seems that more current MPs than not are on Twitter. Shall we add a parameter for that to this template? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:14, 11 June 2017 (UTC)
See Wikipedia_talk:WikiProject_Politics_of_the_United_Kingdom#Does_a_summary_of_an_MP's_parliamentary_voting_record_belong_on_Wikipedia? for a relevant discussion. Pam D 08:44, 23 July 2021 (UTC)