Wikidata:Bot requests/Archive/2017/09

Replace P794 "as" with P2868 "subject has role" when used as a qualifier on the identifiers P3120 and P1566

Request date: 5 September 2017, by: Jheald

Link to discussions justifying the request
Task description

Please replace all instances of P794 (P794) with subject has role (P2868) when it is used as a qualifier on statements involving the identifiers TOID (P3120) (19536 uses) and GeoNames ID (P1566) (12470 uses), preserving all other qualifiers, references, rankings, qualifier values etc on the statements.

Example item: Haslingfield (Q2041191) -- there are two different TOIDs and two different GeoNames links, each appropriate for a different role for the subject.

Licence of data to import (if relevant)
Discussion
@Pasleim: Shall we add this to DeltaBot? Matěj Suchánek (talk) 08:54, 6 September 2017 (UTC)
Shouldn't there be separate items if there are seperate identifiers? Sjoerd de Bruin (talk) 08:56, 6 September 2017 (UTC)
@Sjoerddebruin: See current discussion at Wikidata:Project_chat#Dealing_with_our_second_planet, including a long comment for me towards the end.
At some point in the future there may be a case to split the two uses, and at the same time make the same split on Commons. But for the moment there are other priorities, in working out and documenting the items we already have, and trying to understand what is missing / duplicated / unlinked; all that is hard enough already -- adding a further 10,000 more under-populated items is the last thing that is needed. For the moment, the current items work well enough, and their combined nature matches a lot of external sources. What is requested here is a quick one-off cosmetic tidying-up of the data as it is now, rather than radical change which should be left until we are much more solid with the present items. Jheald (talk) 10:03, 6 September 2017 (UTC)
I also think those items should be split but likely this will not happen during the next months. Moreover, moving P794->P2868 does not hinder anybody from splitting the items. --Pasleim (talk) 12:01, 15 September 2017 (UTC)
Request process
added to DeltaBot --Pasleim (talk) 12:01, 15 September 2017 (UTC)
This section was archived on a request by: --Pasleim (talk) 12:32, 18 September 2017 (UTC)

Move Q2806720 and Q11086396 from P1435 to P166

Request date: 14 September 2017, by: Fralambert

Link to discussions justifying the request
Task description

Hi, I would like that a bot move the claims 100 Landscapes of Heisei (Q2806720) and New Eight Views of Japan (Q11086396) with the qualifiers and sources from heritage designation (P1435) to award received (P166). Since it was given at a gived date by newpaper, it's more the result of a price that a heritage distinction. --Fralambert (talk) 23:26, 14 September 2017 (UTC)

Discussion


Request process
  Done --Pasleim (talk) 12:31, 18 September 2017 (UTC)
@Pasleim: Thanks --Fralambert (talk) 01:17, 19 September 2017 (UTC)
This section was archived on a request by: Pasleim (talk) 12:31, 18 September 2017 (UTC)

Request date: 18 September 2017, by: Thierry Caro

Link to discussions justifying the request
Task description

For all items that have a Diamond League athlete ID (P3923) but no All-Athletics.com ID (archived) (P3765), extract the missing ID from the upper right part of the target page. It is part of the URL pointed to by the link on “Full profile on All-Athletics.com”.

Discussion


Request process
  Done those 75 items which still don't have All-Athletics.com ID (archived) (P3765) [1] have wrong imported Diamond League athlete ID (P3923) claims. --Pasleim (talk) 09:08, 19 September 2017 (UTC)
This section was archived on a request by: --Pasleim (talk) 09:08, 19 September 2017 (UTC)

Arabic Descriptions

Request date: 21 September 2017, by: FutoohBot

Link to discussions justifying the request
  • Reference to multiple discussions on my talk page regarding my edits using QuickStatement through regular user account, and suggesting creating a bot account as here.
Task description
  • Adding thousands of Arabic descriptions as I've been doing using my user account.
Discussion
  Comment You have to request approval at Wikidata:Requests for permissions/Bot. Matěj Suchánek (talk) 20:20, 21 September 2017 (UTC)
Request process
This section was archived on a request by: Matěj Suchánek (talk) 07:06, 22 September 2017 (UTC)

Commonswiki link and P373

Request date: 4 September 2017, by: Visite fortuitement prolongée

Link to discussions justifying the request
Task description

The items in

SELECT ?item ?sitelink {
  ?item ^schema:about [ schema:isPartOf <https://commons.wikimedia.org/>; schema:name ?sitelink ] .
  FILTER( STRSTARTS( ?sitelink, 'Category:' ) ) .
  MINUS { ?item wdt:P373 [] } .
} LIMIT 1000
Try it!

have 1 commonswiki link, with "Category:foo bar". Add to those items Commons category (P373) "foo bar". Visite fortuitement prolongée (talk) 20:22, 4 September 2017 (UTC)

Discussion

I think this should only be done for items which are not instance of Wikimedia category (Q4167836) --Pasleim (talk) 21:24, 4 September 2017 (UTC)

I support this request - it would be really useful - if approved this bot task should be executed on a regularly. Robby (talk) 12:02, 14 September 2017 (UTC)

I support this request with Pasleim modification. Commons category (P373) is very popular property, so a lot of wiki readers will benefit from this task. --Jklamo (talk) 09:16, 18 September 2017 (UTC)

I submitted a batch of first 5,000 commands for QuickStatements. I have modified the query to only add Commons category (P373) to non-categories and with unused values. Matěj Suchánek (talk) 07:15, 22 September 2017 (UTC)
Request process
Accepted by Matěj Suchánek (talk) 07:15, 22 September 2017 (UTC) and under process
@Matěj Suchánek: I started doing these slowly in blocks of 6000 with QuickStatements. I'm just doing the fourth block now, but I've just seen this. Should I leave the remaining ~72,000 to you? Jheald (talk) 07:40, 22 September 2017 (UTC)
Thanks for your notice. Do you have any evidence that our bots have run into conflicts? Anyway, I will let finish this batch and let you continue (there are currently multiple running batches in QS, which makes all of them slower, unlike batches run from personal accounts). Matěj Suchánek (talk) 07:53, 22 September 2017 (UTC)
Mine seems to be adding quite efficiently at the moment (Special:Contributions/JhealdBatch). Currently this block includes Q-numbers between Langangen (Q1772491) and Maria Quitéria (Q2618916) -- though I didn't sort them in the query, so later blocks might come back to this range again. Jheald (talk) 08:01, 22 September 2017 (UTC)
And just as I typed that, apparently QS has crashed. I will try to resume when it lets me. Jheald (talk) 08:10, 22 September 2017 (UTC)
Done - all items with such sitelinks as of 10 minutes ago that are not categories now have Commons category (P373).
... but: such sitelinks are being added at a rate of about 250 a day, so really we need a bot that will do this regularly (? at least daily).
So I'm leaving this task open. Jheald (talk) 21:49, 23 September 2017 (UTC)
@Pasleim: ^ DeltaBot? Matěj Suchánek (talk) 09:48, 24 September 2017 (UTC)
It's possible to extend DeltaBot to do this job. However, I'm not able to run the above query and exclude instances of categories. How did you do this? --Pasleim (talk) 17:55, 26 September 2017 (UTC)
I used a different one with limit. Assuming we are done at the moment we can let the bot work on a smaller set of items with:
SELECT ?item ?cat {
  ?item schema:dateModified ?date .
  FILTER( NOW() - ?date < 1 ) . # modified during last 24 hours
  ?item ^schema:about [ schema:isPartOf <https://commons.wikimedia.org/>; schema:name ?sitelink ] .
  MINUS { ?item wdt:P373 [] } .
  MINUS { ?item wdt:P31 wd:Q4167410 } .
  MINUS { ?item wdt:P31 wd:Q4167836 } .
  FILTER( STRSTARTS( ?sitelink, 'Category:' ) ) .
  BIND( STRAFTER( ?sitelink, 'Category:' ) AS ?cat ) .
  MINUS { ?cat ^wdt:P373 [] } .
}
Try it!
Matěj Suchánek (talk) 20:13, 26 September 2017 (UTC)
ok, DeltaBot does now the job regularly --Pasleim (talk) 22:42, 26 September 2017 (UTC)
This section was archived on a request by: Pasleim (talk) 22:42, 26 September 2017 (UTC)

Update sitelinks and P373 statements when Commons has a soft category redirect

Request date: 18 September 2017, by: Jheald

Link to discussions justifying the request
Task description

Standing advice at Commons is not to remove categories that are renamed, but instead to put in a soft redirect using c:Template:Category redirect (also 3 specialist redirect templates for taxons). I believe this allows the old names to be accepted from users by Commons tools like HotCat, and appropriately interpreted.

However, it would be good for our sitelinks and Commons category (P373) statements to be up-to-date -- (eg, as one application, to make it easier to reconcile the results from queries here with SQL queries on the Commons category structure). It may also reveal more multiple article-items here with P373s linking to the same Commons category. (Often candidates for merge/resolution/clarification).

(P373s might also point to categories that have since been subjected to hard redirects).

It's probably easy enough to do this on a one-off basis -- eg first harvest the template transclusions at Commons; then see what Commons sitelinks/P373s we have that match that list; then fix them.

But it would be nice to also carry this out on an ongoing basis -- ie monitoring new transclusions of c:Template:Category redirect, and updating sitelinkes & P373s here accordingly. (One might though perhaps need to allow a short 'grace period', in case the category redirect was reverted).

This would significantly help work on analyzing Commons categories compared to items here. Jheald (talk) 12:19, 18 September 2017 (UTC)

One thing to be cautious of is c:Template:Category redirect to categories that already have a primary link from somewhere else (eg as per the diff above for East Lindsey). I am not sure how best to make a criterion for this, because sometimes it is useful to have two P373s going to the same place, that can be found with a search or from a constraint failure. Sometimes may it make sense to leave a link, but qualify it "points to a redirect of <X>" ? Jheald (talk) 11:25, 19 September 2017 (UTC)
Licence of data to import (if relevant)
Discussion


Request process
This section was archived on a request by: Pasleim (talk) 17:55, 26 September 2017 (UTC)

Commonswiki link and P935

Request date: 18 September 2017, by: Jklamo

Link to discussions justifying the request
Task description

In situation of item, that is not category item, has sitelink to commons gallery but has not Commons gallery (P935):

SELECT ?item ?sitelink {
  ?item ^schema:about [ schema:isPartOf <https://commons.wikimedia.org/>; schema:name ?sitelink ] .
  MINUS { ?item wdt:P31 wd:4167836 } .
  MINUS { FILTER(CONTAINS(STR(?sitelink), "Category:")) } .
  MINUS { ?item wdt:P935 [] } .
} LIMIT 1000
Try it!

add sitelink to commons gallery as Commons gallery (P935). If approved this bot task should be executed on a regularly.--Jklamo (talk) 09:30, 18 September 2017 (UTC)

Licence of data to import (if relevant)
Discussion
I did the same thing as in #Commonswiki link and P373. Matěj Suchánek (talk) 11:16, 27 September 2017 (UTC)
Request process
Accepted by (Matěj Suchánek (talk)) and under process
Task completed (11:16, 27 September 2017 (UTC)) -->
This section was archived on a request by: Matěj Suchánek (talk) 11:16, 27 September 2017 (UTC)

IETF country-specific language codes

IETF language tag (P305) values like, for example, that for British English, are written en-GB, not en-gb. Can someone rationalise them, as in this edit? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:01, 14 September 2017 (UTC)

Seems to be very tricky. According to en:IETF language tag#Syntax of language tags one should write region subtags in uppercase, script subtags in titlecase, and all other subtags in lowercase. --Pasleim (talk) 12:06, 15 September 2017 (UTC)
It should be easy to compare against a list of countries. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:24, 9 October 2017 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:41, 9 October 2017 (UTC)

Language property in official website

Request date: 27 September 2017, by: Izno

Link to discussions justifying the request
  • PFD for language properties
Task description

There are a handful of official website (P856) using P2439 (P2439) as qualifiers. I think these could trivially be changed to language of work or name (P407) either automatically or semi-automatically.

(There may be other language sub-properties which should be reviewed for on the constraints violations page of P856, but I'm less interested in those.) --Izno (talk) 13:11, 27 September 2017 (UTC)

Discussion

@Jura1, EncycloPetey: Any opposition on that? --Pasleim (talk) 12:33, 9 October 2017 (UTC)

You might want to ask the person(s) who used them.
--- Jura 14:43, 9 October 2017 (UTC)
My concerns all lie with publications (books, films, journals, etc.). Website data is beyond the scope of what I work with or understand on Wikidata. --EncycloPetey (talk) 15:00, 9 October 2017 (UTC)
Request process

  Done --Pasleim (talk) 17:10, 9 October 2017 (UTC)

This section was archived on a request by: --Pasleim (talk) 17:10, 9 October 2017 (UTC)

Import birth and death dates from RKDartists ID (P650)

Request date: 27 July 2017, by: Jarekt

Link to discussions justifying the request
Task description

Netherlands Institute for Art History (Q758610) database seems to have many day-precision birth and death dates for many items which only have year precision dates. Those should be imported.

The logic could be as follows. For people items with RKDartists ID (P650) (RKD):

  • look up birth and death dates and compare to the current date
  • if current date does not have a reference to a source outside Wikimedia projects than delete it
  • if current date matches RKD date but there is not reference to RKD then add reference
  • if no current date than import RKD date and add reference
  • if current date is a year and RKD date is more precise than import RKD date and add reference, then set RKD date priority to "preferred" status
  • otherwise just import RKD date and add reference
Discussion
I'm not in favour of deleting dates of birth. Also, it's RKD, not KDR.
fixed --Jarekt (talk) 19:35, 27 July 2017 (UTC)
I'm already importing this data (date of birth/death, gender, occupation, etc.) from the RKD. Haven't really implemented the updating/improving of existing statements yet. Multichill (talk) 17:59, 27 July 2017 (UTC)
Multichill, I am mostly interested in improving existing statements in items with Commons Creator page (P1472). What is happening is that as I compare and merge creator template data with Wikidata items I found ~ 600 items where Commons had day-precision item while Wikidata had year-precission items. I was trying reconcile such cases by hand but that in 90% of cases meant adding the day-precision date to Wikidata, verifying it in RKD, adding a reference and either deleting the old year date (if no references for it) or bumping priority of new date to "preferred" status. All those steps take a lot of time when done manually and the whole process could be done more easily if a bot would improve existing statements. An example: dob in c:Creator:Camillo Innocenti is "1871-06-14" without a reference, dob in Q3651523 is "1871" with a solid reference, dob in RKD is "1871-06-14". If we import RKD date and set it's priority to "preferred" status than it will match Commons. --Jarekt (talk) 19:35, 27 July 2017 (UTC)
Did you already turn this into a query? It's items that have Commons Creator page (P1472), RKDartists ID (P650) and date of birth (P569) with precision year and no (decent) source and no other decent statement. Something like that? Multichill (talk) 20:16, 27 July 2017 (UTC)
SELECT ?item WHERE {
  ?item wdt:P1472 [] .
  ?item wdt:P650 ?rdkid .
  ?item p:P569 ?dobstatement .
  ?dobstatement psv:P569 [
                wikibase:timePrecision "9"^^xsd:integer ;
                wikibase:timeValue ?birth ;
              ]
  MINUS { ?dobstatement prov:wasDerivedFrom ?provenance .
         MINUS { ?provenance pr:P143 [] } .
        }
  }
Try it!
Nevermind, this is what I made. Just clicking around I find many cases like you describe. Multichill (talk) 20:35, 27 July 2017 (UTC)
It is not just dates of birth but also dates of death. I did not create a query but c:Category:Creator templates with Wikidata link: quick statements is mostly filled with creator templates that fit that pattern. --Jarekt (talk) 02:04, 28 July 2017 (UTC)
Ok, I modified the RKDartists bot to do two extra things:
  • Source date of birth/date of death (replacing imported from if it's the only reference)
  • Replace year of birth/death with a more precise date.
That should cover most of it. Multichill (talk) 20:43, 22 August 2017 (UTC)

Multichill, I was just looking at Taco Mesdag (Q2452500) your bot added reference to existing day-precision birth date, which is great. However death date had year precision on wikidata and day precision on RKD and it was not corrected (I corrected it now). Is your bot still running or did it miss it somehow? Same thing with Sano di Pietro (Q1379714), where both dates need to be imported from RKD and saved with "preferred" rank. --Jarekt (talk) 16:24, 6 September 2017 (UTC)

@Jarekt: The bot doesn't touch statements which are sourced. See the sparql query, only imported from Wikimedia project (P143) is replaced. Multichill (talk) 16:50, 6 September 2017 (UTC)
Multichill That makes sense. Can I propose a slightly different functionality where if there is a soured date than we leave it alone, but new statement with RKD date (if different). Also if we have multiple non-conflicting dates of different precision than we add "preferred" status to the highest precision date. That way we can add dates to items like Taco Mesdag (Q2452500) or Sano di Pietro (Q1379714) (and I and others do not have to do it by hand). Thanks again for adding all those references - that cleared a lot of items that needed to be fixed. --Jarekt (talk) 17:36, 6 September 2017 (UTC)
That would be possible I guess. Not sure when I might work on this. These are probably the interesting items:
SELECT ?item WHERE {
  ?item wdt:P1472 [] .
  ?item wdt:P650 ?rdkid .
  ?item wdt:P1472 [] .
  ?item p:P569 ?dobstatement .
  ?dobstatement psv:P569 [
                wikibase:timePrecision "9"^^xsd:integer ;
                wikibase:timeValue ?birth ;
              ] . 
  ?dobstatement prov:wasDerivedFrom ?provenance .
  ?provenance pr:P248 wd:Q36578  .
  MINUS { ?item p:P569 ?dobstatement2 . ?dobstatement2 prov:wasDerivedFrom ?provenance2 . ?provenance2 pr:P248 wd:Q17299517 } 
  }
Try it!
Multichill (talk) 18:31, 6 September 2017 (UTC)
That would definitely be a huge help! (And not only the ~1k items with only year precision and Integrated Authority File (Q36578) as source, also the ~2.5 with other sources would profit!) --Marsupium (talk) 22:40, 10 September 2017 (UTC)
PS: And in my eyes RKDartists (Q17299517) sourced day precision dates could by default be set to preferred rank indeed. For all the dates I've checked so far there were almost no cases where RKDartists (Q17299517) (with a day precision date) wasn't the best source I could find online (Allgemeines Künstlerlexikon (Q15791802) included).
Request process