Talk:List of MPs elected in the 2024 United Kingdom general election

Latest comment: 3 hours ago by PamD in topic Sorting

"Notional"? etc

edit

The table has a heading "party of notional incumbent" but gives no explanation of this term, nor any source for the data. There is also nothing to indicate whether a constituency has the same boundaries as previously. For example, Westmorland and Lonsdale's boundaries changed so that the BBC describes it as a Lib Dem gain from Conservative, although Tim Farron held a seat of that name previously. PamD 05:54, 6 July 2024 (UTC)Reply

And the previous MP for Leeds North West was Alex Sobel, Labour, although Stewart Andrew, Conservative, described here as the incumbent, was MP for Pudsey. Yes, the boundary changes make things confusing, but this table oversimplifies the situation. PamD 07:02, 6 July 2024 (UTC)Reply

Sorting

edit

This table should be made sortable on MP surname, as List of MPs elected in the 2019 United Kingdom general election is. (I had hoped to find a list I could compare with Category:UK MPs 2024–present, to see which articles needed to be added to that category, but sorting on forename isn't helpful.) PamD 07:57, 6 July 2024 (UTC)Reply

This gets strange: the code looks identical, with "data-sort-value" provided, but it just doesn't sort on that key. Presumably there is some subtle difference to the table code ... can someone please find the problem and fix it? When I sort on member name I consistently see Abena Oppong-Asare at the top and Zubir Ahmed at the bottom, while the 2019 list, sorted, runs from Diane Abbott to Daniel Zeichner as expected. @Roc0ast3r and Moondragon21: as creator and recent editor of the list. PamD 08:09, 6 July 2024 (UTC)Reply
Looking at the code, it looks like data-sort-value is provided in some MPs, but just doesn't exist in most of them. Heidi Alexander, Rushanara Ali, and Tahir Ali—for example—are between Alex Sobel and Alice MacDonald; both Sobel and MacDonald don't have the data-sort-value attribute added, while Alexander and both Alis do. Basically: the table is working as intended, it's just that the majority of MPs don't have a sorting value attached to their respective row. Also doing a CTRL+F search for "data-sort-value" brings 128 results, and there are 650 total MPs. Clearly, the data-sort-value attribute is lacking.  RONIN  TALK  08:29, 6 July 2024 (UTC)Reply
@Roc0ast3r Ah, thanks. I only looked at the top one or two, saw that they had the data-sort-value, and assumed consistency (why?!). So there's some tidying-up needed.
Just for info, for election enthusiasts, I've just found United Kingdom general election records which is an amazing compilation of useless but fascinating information about GEs, updated with a lot of 2024 content. Splendid stuff. PamD 11:03, 6 July 2024 (UTC)Reply
  • I'm working through this adding the data-sort-key, but it's pretty tedious: any more help would be welcomed.PamD 11:06, 7 July 2024 (UTC)Reply
    All now done, thanks to input from @Roc0ast3r PamD 15:37, 7 July 2024 (UTC)Reply
    But another time, people, please remember if contributing to a sortable table you need to consider sort values - there are a couple of ways to do it but it's much easier to do it when adding data than retrofitting. The first few entries were added with data-sort-value, and I suppose later editors were just keen to get the "me, me, I added them first" buzz, rather than continuing to create a well-crafted list. (Yes, one reason I stayed up till 5:30am was because I had a nice little draft prepared for the person I hoped would get elected locally, and I wanted to create that article myself, so I recognise the feeling). This is an encyclopedia not a news outlet, the results were available elsewhere, so it would have been better to slow down a little and continue to create a good table, following the model of those first few entries. PamD 15:45, 7 July 2024 (UTC)Reply

Regional articles created

edit

I have created redirects for the regional lists at

No Swan So Fine (talk) 13:51, 6 July 2024 (UTC)Reply