Wikidata talk:WikiProject British Politicians

Latest comment: 12 days ago by Andrew Gray in topic 2024 GE candidate data import

Constituencies

edit

I've been playing a bit with constituencies and located in the administrative territorial entity (P131) this week, trying to see if we can answer questions like "how many MPs for Scottish seats did XYZ". At the moment, it's a bit complicated. There are a few different approaches possible:

  1. Use a standardised high-level P131. We do this for most contemporary seats - places are in "Scotland", "Wales", "Northern Ireland", or one of the ITL 1 statistical regions of England (Q6955655). (And some historic -a ll 1801-1922 Irish seats (including pre-1922 NI) are in Ireland (Q57695350).)
  2. Use a very granular approach - so West Suffolk (Q874416) would be in Suffolk (Q23111), not East of England (Q48006) - and go down as low as is practical (to town level)
  3. A hybrid approach - use a standardised hierarchy but more granular than NUTS regions - probably at county level. This seems universally the best solution for pre-1832 seats.

Approach #1 is straightforward, and allows for efficient searching. However, it does not convey all the information we might want (we can get "all MPs from London" but not "...from Birmingham"). Approach #2 is much more precise, but queries involving P131* have a habit of timing out so might not be a practical solution. Approach #3 should be more efficient, and hopefully adaptable, but could end up being a maintenance headache to keep things consistent.

In all cases, we have issues of anachronism - eg English regions didn't meaningfully exist before the 1990s, and all the counties changed in 1974, so potentially somewhere like Penrith and The Border (Q1050693) could be classed three different ways (North-West, Cumbria, Cumberland). Start and end dates are probably the only way forward here.

Is there a fourth approach that I'm missing? Andrew Gray (talk) 09:57, 18 August 2019 (UTC)Reply

Handily, the Commons Library has just put out a related dataset covering 1918-2017 elections; they assign English seats to both contemporary counties and to modern regions - there is a caveat that pre-1974 counties don't map very cleanly onto regions in all cases, but they've helpfully made some determinations about edge cases. If we do want to use modern regions, this could be a way to map them even further back.
For non-English seats, these are only recorded at country level. Andrew Gray (talk) 10:35, 20 August 2019 (UTC)Reply

Mismatched election dates vs start times

edit

In my slow tidy-up of historic by-elections, I noticed this morning that Denis MacShane (Q695061) was mistakenly first elected in the 1963 Rotherham by-election (Q16999906), rather than 1994 Rotherham by-election (Q17020044), so thought I'd check for anyone else who was elected in a different year than their start date:

SELECT ?item ?itemLabel ?start_time ?election_date WHERE {
  ?item p:P39 ?ps .
  ?ps ps:P39/wdt:P279 wd:Q16707842 .
  ?ps pq:P2715 ?election .
  ?ps pq:P580 ?start_time .
  ?election wdt:P585 ?election_date .
  FILTER (YEAR(?start_time) != YEAR (?election_date))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Not much to tidy up, thankfully, but this is potentially a useful query to keep an eye on from time to time. --Oravrattas (talk) 09:25, 13 May 2020 (UTC)Reply

2024 GE candidate data import

edit

Hi folks, I spent a bunch of time last week reconciling Democracy Club data for the 2024 general election against Wikidata using OpenRefine, and I have an open RfP for a bot account to import that data. So far it has only attracted one comment (thankfully in support). If people could take a look at the request and leave a comment it'd be much appreciated. M2Ys4U (talk) 15:58, 19 June 2024 (UTC)Reply

@M2Ys4U just had a look at the uploads - all looks great, and thanks for doing it! This will make setting up the winners on the morning of the 5th much easier.
I've just (separately) finished tidying up the new constituencies for this cycle which means there are new items for some seats - this affected about 10% of the candidates. I've just completed a batch to update the constituency items. The results look good - every seat is a live one with a correct new GSS ID, and all have what looks like the right # of candidates (5 to 13) Andrew Gray (talk) 22:19, 23 June 2024 (UTC)Reply
Ah, great stuff. I tried to match constituencies that didn't auto-match in OR based on what was in enwiki which had some peculiarities in how they treated constituencies that had names matching ones previously abolished so thanks for straightening those out. Apparently naming things is hard, who would have guessed it? M2Ys4U (talk) 23:14, 23 June 2024 (UTC)Reply
@M2Ys4U Having a look at Niko Omilana (Q104432807) - any idea what to do here? Wikipedia suggests that only one is actually him, the other ten are people standing under assumed names, but not sure how to represent that. Andrew Gray (talk) 20:47, 1 July 2024 (UTC)Reply
I thought about that and couldn't come to a conclusion, so just kept the one item. I don't think at the time it had been revealed that the other candidates had (or at least had purported to have) changed their names in order to stand. I'm happy to dis-aggregate them, but I'm also unsure how to represent the other Omillanas M2Ys4U (talk) 17:34, 2 July 2024 (UTC)Reply
I think in an ideal world we'd need to have eleven items (the data model for elections assumes the data is modelled on the candidate items), but as we don't really know who the other ten are it would seem difficult to create items for them. A bit weird! Andrew Gray (talk) 21:15, 2 July 2024 (UTC)Reply
Return to the project page "WikiProject British Politicians".