imported from Wikimedia project: DOI query endpointEdit

Hey Andrew Gray, with your bot account you have created quite a lot of references with reference qualifiers imported from Wikimedia project (P143): query endpoint (Q28946522), see for instance in the item William Henry Bragg. 1862-1942 (Q47476886). This does not make sense, as the property imported from Wikimedia project (P143) is not supposed to be used like that; there is currently a repair job running in which I am involved, in order to clean up wrong uses of imported from Wikimedia project (P143) in references.

I reckon you wanted to express that you somehow used the DOI query endpoint for your data retrieval, and you wanted to express that in the reference. Since query endpoint (Q28946522) is just an interface and not a work by itself, this information is not crucial for those references. I thus suggest to remove imported from Wikimedia project (P143): query endpoint (Q28946522) from all references where this reference qualifier + value pair shows up—unless you come up with an alternative approach here. The reference URL (P854) reference qualifiers with links to which are found in the same references should be kept, of course. Help:Sources provide available source models.

In order to avoid confusion: I do not expect you to make any edits; I am prepared to do them as part of the imported from Wikimedia project (P143) clean up. I just want to talk about the matter before I start, in order to figure out whether there are alternatives to the "fix by removal" approach I have suggested. —MisterSynergy (talk) 18:39, 10 May 2019 (UTC)

MisterSynergy Thanks for checking on this (and thanks for doing all the cleanup!). I don't recall exactly why I set the references up this way but I think it was copied from another recent scholarly-publications import and I presumed it was the correct way to do it :-)
I've gone back and checked the script I used to create them and can confirm that they all came from querying the crossref DOI endpoint. Your proposal sounds fine and makes sense to me. Andrew Gray (talk) 18:59, 10 May 2019 (UTC)
Okay, thanks for the answer. My bot account is busy right now, but as soon as it is available for a new job—tomorrow, likely—I will remove the imported from Wikimedia project (P143): query endpoint (Q28946522) reference qualifiers from all references where they show up, and keep the bare reference URL (P854) URLs in the same references. —MisterSynergy (talk) 19:14, 10 May 2019 (UTC)
Special:Diff/938607984 is a sample diff. There are ~2000 items to be modified. —MisterSynergy (talk) 19:22, 10 May 2019 (UTC)

I have to bother you with another comment. While I played with the related queries a bit, I thought I should just have a look whether there are reference qualifiers of the style stated in (P248): query endpoint (Q28946522) out there, and it turns out that there are a lot of them: ~342k statements in ~37k items are referenced like that (complemented with reference URL (P854) and retrieved (P813), sample item Judicial Interaction on the Latham Court: A Quantitative Study of Voting Patterns on the High Court 1935-1950 (Q29027915)). Looks like User:Harej has added them a while ago. I am now reconsidering the plan, and think a move from imported from Wikimedia project (P143): query endpoint (Q28946522) to stated in (P248): query endpoint (Q28946522) could be more appropriate than a removal, in order to have a uniform situation. Such a use of stated in (P248) is a bit different than what we usually do, but if someone wants to clean it up, they could start from a cleaner situation. What do you think? (User:Harej may also comment, of course.) —MisterSynergy (talk) 19:37, 10 May 2019 (UTC)

MisterSynergy I think that might have been the batch I copied it from!
I've only ever uploaded these ~2k articles so I don't really know what the best approach is, and it's very hard to figure out from Wikidata:WikiProject Source MetaData what we should do. A lot of the existing article items don't really seem to have much sourcing. Your stated in (P248) idea sounds quite reasonable and we can always change it later. Andrew Gray (talk) 20:49, 10 May 2019 (UTC)
Now done, with the "move-to-P248" solution. Thanks for your input! —MisterSynergy (talk) 05:22, 11 May 2019 (UTC)

Blisse issueEdit

Stephen Bisse (Q28065015) seems to be Stephen Bisse (Q64577142) but under a slightly different name. ... left for you to merge, lest Edward has some significance. --Tagishsimon (talk) 11:42, 12 June 2019 (UTC)


  • Edward Lee (Q25927448) again has P39=House of Lords when my reading of History of Parliament says he's an MP. Your bot's fingerprints. Not amended by me. --Tagishsimon (talk) 13:44, 12 June 2019 (UTC)
Beats me where these two came from! Fixed. Thanks for spotting them. Andrew Gray (talk) 21:46, 13 June 2019 (UTC)

Constituency snafu?Edit

Sorry to keep trying to drag you to wherever my whimsy takes me, but...

Today, I think we have a constituency snafu to consider.

We have 2,222 constituencies which are instances of constituency of the House of Commons (Q27971968), listed in Wikidata:WikiProject British Politicians/MP terms by constituency.

We also have 278 constituencies which are instances of Constituency of the Parliament of England (Q27990982) listed at and these are employed in a shedload of P39s listed in User:Tagishsimon/junk.

There seems to be an overlap between the two sets. 215 of the Constituency of the Parliament of England (Q27990982) constituencies have an end date of 1707, but have exactly the same name as constituency of the House of Commons (Q27971968) constituencies which have start dates before 1707 and end dates after 1707 - they all listed here -

So that seems to me to be an indication that these are duplicate items. By way of example, we have an HoC Aldborough (Q4713453) with a date range of 1558 to 1832 and a PoE Aldborough (Q60576259) with no start date and an end date of 1707.

I'm thinking we should be merging the PoE constituencies which match by name, into their HoC counterparts; and if there are any that don't match by name, we should be changing their P31s to constituency of the House of Commons (Q27971968). What think you? --Tagishsimon (talk) 01:36, 14 June 2019 (UTC)

@Tagishsimon: So, long story here, but short answer is "this is something I had been meaning to tidy up".
When I started doing the Historic Hansard import I found we had a lumping vs splitting question for constituencies - do we need just one item for all iterations of a constituency with a given name (as enwiki does), or so we want to split them out by dates/characteristics? (eg boundary changes, number of seats). There's also the question of whether we ought to distinguish between "UK", "GB", and "English" constituencies in much the same way that we distinguish between classes of P39 memberships. (Similarly pre-Union Scottish & Irish seats).
My current feeling is that, in the long run, splitting will make things a lot easier, especially given the way that since 1832 seats have often been recreated then abolished, or had dramatic boundary changes while keeping the name. Otherwise we'll end up having to do a lot of heavy lifting with qualifiers once we start including things like shapefiles, or a decent model for relating constituencies to places.
Most old constituencies will then have an English instance (to 1707), a British instance (1707-1801), and one or more UK instances (1801 onwards). This is what I started setting up when I did the initial batch of English importing.
The problem is that the dates for the "UK" constituency pages were imported ages ago and I just hadn't got around to fixing them to be consistent yet! I'll set up a batch for this shortly to trim all these to 1801 which should remove the obvious misalignments. (I can add dummy entries for 1707-1801 GB constituencies as well, but that may as well wait until we start importing that term data). Andrew Gray (talk) 18:46, 14 June 2019 (UTC)
That seems a perfectly cromulent direction of travel; it's the mess which distresses me, rather than a predisposition towards a particular solution. Right now it's unclear which constituency should be selected. Let me know your preference; I can have a fiddle, or keep my fingers off this area ... don't mind which. Clearly, the start dates pre 1801 & pre 1707 in UK constituencies will need to be moved to the EN constituencies. --Tagishsimon (talk) 20:41, 14 June 2019 (UTC)
TBH some of the start dates on UK constituencies are a bit dubious - I'm happy to move them but I don't know quite how robust they are. I guess we'll find out when we compare them to known memberships! I'll have a go at setting up an edit batch this weekend. Andrew Gray (talk) 21:05, 14 June 2019 (UTC)
Interesting question as to what you link the article for a constituency spanning EN, GB & UK. A fourth P31=group of constituencies item? --Tagishsimon (talk) 22:32, 14 June 2019 (UTC)
I've been keeping the link on the current (or failing that, most recent) one, and using said-to-be-the-same-as on the others - which is a bit of a hack but works well enough for now. See eg w:User:Andrew Gray/Missing MPs since 1832 where it's detecting said-to-be-the-same-as to generate WP links. Andrew Gray (talk) 23:05, 14 June 2019 (UTC)
Okay, morning update: I think I've fixed up the start/end dates for all English seats. and I'm just about to do a batch to bring all the UK ones with pre-1801 dates up to 1801. I'll then do a second batch to update descriptions w/ correct dates and standard terms. Andrew Gray (talk) 10:54, 15 June 2019 (UTC)
Morning back. Consider this my (EC) - you cover much of this in your update :)
Helpfully, we also seem to have items like ... no P31 ... I'd have a word with its creator ;)
Per your tweets, I was trying to work out where you'd got up to, for which read, do we now have 3 items for constituencies that span the <1707 to the >1801. I know you spoke about delaying dummy constituencies for GB ... fwiw, I'd advise against & suggest a single job to sort constituencies.
Looking at as an example of a post-1801 constituency, let me raise two concerns: that its P31 "constituency of the House of Commons" might as easily apply to a GB or an England constituency and suggest that we should be implementing P31s on the pattern of the English constituencies - "Constituency of the Parliament of England", "Constituency of the Parliament of Great Britain" & "Constituency of the Parliament of the United Kingdom", each of which is a P279 of "constituency of the House of Commons"; and that we sort out the descriptions of the constituencies so it's clear to users which is which - again, the desc for gives no helpful guidance.
Sorry to be hyper-pedantic. --Tagishsimon (talk) 11:04, 15 June 2019 (UTC)
"Constituency of the House of Commons" - I originally had this explicitly stating UK, and am ambivalent about whether it should be in there or not. Note thought that we do use Member of Parliament (Q16707842) for current MPs without also stating UK and that seems to work. All of the constituency types are subclasses of constituency in the United Kingdom (Q2064521).
I'm running a batch just now to add dates to all the descriptions, which should hopefully help with the potential for confusion on an individual basis. Will look into setting something up for the 1707-1801 seats. Andrew Gray (talk) 11:19, 15 June 2019 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────Okay! Every post-1801 constituency should now have a start date no earlier than 1801, and a standardised description along the lines of "Parliamentary constituency in the United Kingdom, 1832-1885" (or "to present"). All the English ones ditto, though there I've given the end date only (it seems simpler given there's a bit of ambiguity with some of them). Andrew Gray (talk) 11:57, 15 June 2019 (UTC)

Good progress. I'll haggle with you later as to whether a <1707 or a 1707-1801 constituency should be a subclass of C~ of the UK. Clearly they were not at the time they were around & I'm unconvinced they should be today. But I mainly popped in to give you some more of the Hertfordshire-like waifs & strays: --Tagishsimon (talk) 13:55, 15 June 2019 (UTC)
Ontological tree discussion... although I sense you're loath to change the structure, I'm fairly convinced that the first predicate (pre-1707 England is not in the UK) is true; I'm less certain about the other suggestions, having argued with myself for the last hour before pressing the Publish button in favour of a cup of tea and a walk outside. --Tagishsimon (talk) 17:06, 15 June 2019 (UTC)
This discussion predicated on the assertion that this mapping, currently in use, is wrong for the reason that the UK was not a thing way back when.
A worked opening suggestion is all constituencies should be
English constituencies should be
⟨ Hertfordshire (Q60578263)      ⟩ instance of (P31)   ⟨ <constituency in England> ⟩
Scottish constituencies should be
⟨ Hertfordshire (Q60578263)      ⟩ instance of (P31)   ⟨ <constituency in Scotland> ⟩
and so on for Wales, Ireland, Northern Ireland, (France).
That we have three P279 statements in constituency of the House of Commons (Q27971968) as follows (1066 is a dummy date, other dates are illustrative):
⟨ constituency of the House of Commons (Q27971968)      ⟩ subclass of (P279)   ⟨ <constituency of the Parliament of England> ⟩
start time (P580)   ⟨ 1066-00-00 ⟩
end time (P582)   ⟨ 1706-12-31 ⟩
⟨ constituency of the House of Commons (Q27971968)      ⟩ subclass of (P279)   ⟨ <constituency of the Parliament of Great Britain> ⟩
start time (P580)   ⟨ 1707-00-00 ⟩
end time (P582)   ⟨ 1800-12-31 ⟩
⟨ constituency of the House of Commons (Q27971968)      ⟩ subclass of (P279)   ⟨ <constituency of the Parliament of the United Kingdom> ⟩
start time (P580)   ⟨ 1801-00-00 ⟩
And, next level up:
⟨ <constituency of the Parliament of England> ⟩ subclass of (P279)   ⟨ <constituency in Engand> ⟩
⟨ <constituency of the Parliament of Great Britain> ⟩ subclass of (P279)   ⟨ <constituency in Great Britain> ⟩
⟨ <constituency of the Parliament of the United Kingdom> ⟩ subclass of (P279)   ⟨ <constituency in the United Kingdom> ⟩
⟨ <constituency in England> ⟩ subclass of (P279)   ⟨ administrative territorial entity of England (Q171634)      ⟩
⟨ <constituency in Great Britain> ⟩ subclass of (P279)   ⟨ <administrative territorial entity of Great Britain> ⟩
⟨ <constituency in the United Kingdom> ⟩ subclass of (P279)   ⟨ administrative territorial entity of the United Kingdom (Q717478)      ⟩
⟨ <constituency in England> ⟩ subclass of (P279)   ⟨ constituency (Q192611)      ⟩
⟨ <constituency in Great Britain> ⟩ subclass of (P279)   ⟨ constituency (Q192611)      ⟩
⟨ <constituency in the United Kingdom> ⟩ subclass of (P279)   ⟨ constituency (Q192611)      ⟩
Sigh. and even then, we have to go further up the tree.
⟨ administrative territorial entity of England (Q171634)      ⟩ subclass of (P279)   ⟨ <administrative territorial entity of Great Britain> ⟩
start time (P580)   ⟨ 1707-00-00 ⟩
⟨ <administrative territorial entity of Great Britain> ⟩ subclass of (P279)   ⟨ administrative territorial entity of the United Kingdom (Q717478)      ⟩
start time (P580)   ⟨ 1801-00-00 ⟩
Tea. Walk. Bye. --Tagishsimon (talk) 17:06, 15 June 2019 (UTC)
  • Seen this on Wikidata:Request a query. When going through Canadian constituencies (mostly based on Wikipedia articles), I came to the conclusion that within Wikidata it should be easier to use separate items when a constituency with the same name is recreated later (Wikipedia uses just one article). Seems you came to similar conclusions for UK/Brit/etc ones. --- Jura 10:40, 7 February 2020 (UTC)
  • @Jura1: Thanks for the pointer. I agree this is definitely the best way to do it for our purposes, but it's a bit of a mess trying to link all the ones with the same name back to the Wikipedia item (which should probably always be on the current/most recent version of the constituency). Is there a better way than using said to be the same as (P460)? Perhaps we need some kind of "described on Wikipedia as part of XX item" property... Andrew Gray (talk) 11:00, 7 February 2020 (UTC)
    • There seem to be many more involved for the UK (compared to Canada). I'm not much worried about P460, but it can be useful to add a qualifier to indicate why one adds "same as" or "different from". For name items, this considerably reduced questions/incorrect deletions and merges. Sample at Q4925477#P1889. I agree that the item about the most recent constituency is probably the one that should link to Wikipedia, as they keep re-writing to match the present. --- Jura 11:08, 7 February 2020 (UTC)


We have just in the last few days added references derived from Wikidata references into infoboxes im no.wikipedia. Not without some resistance though. But that makes lack of refs here visible. That is why I'm now adding some more, and actually today could use the same source as reference to the resent death-date of a parliament member as I used as source when I started the article about him in 2006. We are making progress. Haros (talk) 13:07, 30 August 2019 (UTC)

@Haros: Awesome! Really glad to see another country being added to the sets of politicians. Let me know if you need any help with the data model or anything like that. Andrew Gray (talk) 12:03, 31 August 2019 (UTC)

Community Insights SurveyEdit

RMaung (WMF) 17:37, 10 September 2019 (UTC)

Reminder: Community Insights SurveyEdit

RMaung (WMF) 19:53, 20 September 2019 (UTC)


Can you explain why 15th United Kingdom Parliament (Q21084432) and 15th Parliament of Great Britain (Q21095070) shouldn't be merged?--Avilena (talk) 16:33, 28 September 2019 (UTC)

@Avilena: Sure - 15th Parliament of Great Britain (Q21095070) was a term of the Parliament of Great Britain (GB = Scotland + England + Wales), from 1780-1784. In 1801, the Parliament was renamed as the Parliament of the United Kingdom (UK = Scotland + England + Wales + Ireland), and the numbering started again; 15th United Kingdom Parliament (Q21084432) was from 1847 to 1852. It seems the "Great Britain" ones don't have dates - I'll try and sort that out to make it clearer. Andrew Gray (talk) 16:49, 28 September 2019 (UTC)


I found three different birth dates about this person. Can you look into this?--GZWDer (talk) 21:33, 22 January 2020 (UTC)

@GZWDer: Interesting - I am pretty sure they're all the same person, it's not a very common name. The 1887 date is almost certainly a typo - the same source says he was promoted to Lieutenant in 1899, which definitely wouldn't happen to someone aged twelve! 1877 and 1879 are both supported by primary sources (service record index) so it's possible the date got fudged at some point. I'll see if I can find something authoritative. Andrew Gray (talk) 20:51, 24 January 2020 (UTC)
@GZWDer: Sorted - found a photograph of his gravestone, and his entry in the 1939 National Register, which both confirm the birthdate as 1st July 1877. 1879 is probably just a clerical error in a record. Andrew Gray (talk) 13:14, 26 January 2020 (UTC)



did you receive my email regarding the Wikipedia template? Thanks! Adam Harangozó (talk) 13:36, 14 March 2020 (UTC)

Datasheets and chip documentationEdit

Thanks a lot for the advise on that (Reference).

I've not been able to reply because it has been archived.

I've already started implementing the second proposal with one SOC datasheet.

More will follow when I stumble upon other SOCs datasheets or add new hardware which uses SOC that have public datasheets that I know about.

GNUtoo (talk) 16:39, 19 June 2020 (UTC)

@GNUtoo: Looks good! I've tweaked Exynos 4 Quad User Manual Public (Q96463975) so that the item itself is a little more informative - hope that's OK. Andrew Gray (talk) 17:09, 19 June 2020 (UTC)

High AGBot login rateEdit


Your bot is logging into Wikimedia projects over 13K times in a 48H period, which is excessive, and shouldn't be necessary.


Can you do anything about this?

>If you are sending a request that should be made by a logged-in user, add assert=user parameter to the request you are sending in order to check whether the user is logged in. If the user is not logged-in, an assertuserfailed error code will be returned.

Reedy (talk) 22:27, 2 July 2020 (UTC)

Wow! Thanks for spotting it. It definitely shouldn't be doing that so I've switched it off. I'll look into it in more detail tomorrow. Apologies! Andrew Gray (talk) 23:48, 2 July 2020 (UTC)

@Reedy: Thanks again for letting me know about this. Looking at phab, it seems this is because wikidata-cli logs back in each time it runs a command - I hadn't realised this was the way it worked. I'll switch any future large runs to use the batch mode, which should avoid the problem. Andrew Gray (talk) 11:27, 3 July 2020 (UTC) and label filteringEdit

A couple of days ago I wrote a query not dissimilar to your [1] and got frustrated that the filter didn't achieve my intended removal of matches. I ended up grabbing a CSV and identifying the mismatches in a spreadsheet - and putting myself in a black mood about my inadequate skill with Wikidata, not for the first time. I notice lines such as Ayr appear on your list too, though I would have expected the filter (?sco_label != ?en_label) to lose them - is there some subtlety about labels that I am missing? AllyD (talk) 06:20, 2 September 2020 (UTC)

@AllyD: Thanks for picking up on this - somehow I'd only looked at the mismatches and not realised half of the results were still the same!
After asking around, it turns out there was a subtlety I was missing too - the ?sco_label value renders as just "Ayr" on the website & in the CSV, but internally in the query service, it still embeds the language code (hence why we can do things like lang(?sco_label). If we strip it down to just a plain string using str(), then it works smoothly. I'll update the other queries to use this form. Andrew Gray (talk) 16:53, 2 September 2020 (UTC)
  • Thanks - applying a str wrapping makes sense when I think about it. That's something new I've learned for future queries. AllyD (talk) 18:29, 2 September 2020 (UTC)