Wikidata:Bot requests/Archive/2019/06

Request date: 4 May 2019, by: YanikB

Link to discussions justifying the request

https://www.wikidata.org/w/index.php?title=Topic:Uyj9e3fvccgttuyx&topic_showPostId=uz3cipe8ugzrnlku&fromnotif=1#flow-post-uz3cipe8ugzrnlku

Task description

For geographic township of Quebec (Q23019040) with multiple inception (P571) delete dates without month and day.(912 items).

Licence of data to import (if relevant)
Discussion

You need a script to perform actions like this: Delete P571? Edoderoo (talk) 13:16, 8 June 2019 (UTC) And this one: done by script: code

I got this confirmed (by email). Edoderoo (talk) 20:23, 8 June 2019 (UTC)


Request process

Accepted by (Edoderoo (talk) 20:23, 8 June 2019 (UTC)) and under process
Task completed (20:51, 8 June 2019 (UTC))

I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. Edgars2007 (talk) 14:30, 14 June 2019 (UTC)

Replace Art Institute of Chicago (Q239303) with something else

SELECT * { ?item ?p ?st . ?st prov:wasDerivedFrom/pr:P248 wd:Q239303 } LIMIT 1262

Try it!

When used in references, Art Institute of Chicago (Q239303) currently generates a constraint violation, as it's not a publication. Can this be replaced with something better? Above a query with the ca 1200 current uses. --- Jura 07:33, 20 June 2019 (UTC)

I suggest to create a new Q-item that will be of the right type (catalog/gallary/whatever) that will replace these occurences. I understand the constraint, as it is a museum, and indeed not a publication of that museum. Replacing the items will then be a matter of writing a small script. Edoderoo (talk) 07:38, 20 June 2019 (UTC)

Task completed --MisterSynergy (talk) 09:40, 20 June 2019 (UTC)

I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. MisterSynergy (talk) 09:40, 20 June 2019 (UTC)
# New wd:Q60909659
SELECT * { ?item p:P1871/prov:wasDerivedFrom/pr:P143 wd:Q1127581 } LIMIT 47347

Try it!

In the above, I think Q1127581 can be replaced with Q60909659. --- Jura 11:44, 20 June 2019 (UTC)

Finished --MisterSynergy (talk) 10:05, 21 June 2019 (UTC)

# New wd:Q60909659
SELECT * { ?item p:P1871/prov:wasDerivedFrom/pr:P248 wd:Q1127581 } LIMIT 1070

Try it!

Finished again --MisterSynergy (talk) 17:53, 21 June 2019 (UTC)

I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. MisterSynergy (talk) 17:53, 21 June 2019 (UTC)

Change pq:P31 to pq:P3831 (for P1684)

Qualifiers to fix:

#new pq:P3831
SELECT * { ?item p:P1684 / pq:P31 ?value }

Try it!

Overview of values:

SELECT ?value ?valueLabel (COUNT(?item) as ?count) (SAMPLE(?item) as ?sample)
WHERE
{
    ?item p:P1684 / pq:P31 ?value
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?value ?valueLabel
ORDER BY DESC(?count)
Try it!

As P31 shouldn't be used as a qualifier and we have P3831 in the meantime, please replace the qualifier in the above. --- Jura 13:50, 21 June 2019 (UTC)

  Done
I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. Matěj Suchánek (talk) 18:42, 13 July 2019 (UTC)

National economy indicators: set most recent value as preferred

Sample country
properties with more than one statement
SELECT ?p ?pLabel (COUNT(*) as ?count)
{
    wd:Q1025 ?wdt ?v .
    ?p wikibase:directClaim ?wdt .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?p ?pLabel
HAVING (?count > 1) 
ORDER BY DESC(?count)

Try it!

Properties to change
SELECT ?p ?pLabel (COUNT(*) as ?count) (COUNT(DISTINCT ?place) as ?ct_places)
{
    VALUES ?wdt { wdt:P2132 wdt:P2134  wdt:P2299 wdt:P4010 wdt:P1279 }
    ?place ?wdt ?v .
    ?p wikibase:directClaim ?wdt .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?p ?pLabel
ORDER BY DESC(?count)

Try it!

For the five properties above, please set the most recent one with preferred rank. I think it make it easier to use them in quries or an infobox, e.g. at c:Category:Economy of Mauritania, c:Category:Economy of Andorra,

I don't think any of these property values have multiple sources or multiple criteria that might justify having more than one preferred rank.

@813gan, WDBot: who added some of the data, FYI. @Laboramus: whose bot sometimes changes such rank. --- Jura 15:14, 29 June 2019 (UTC)

Good idea. I will add ability to set ranks to my code and correct these statments. Also, what data would you like to have in these infoboxes? --813gan (talk) 15:26, 30 June 2019 (UTC)

  • Currently, I just added there what's available here. This way it is showcased at least somewhere. Once the rank set, it will only show the preferred value.
Ideally, many from w:Template:Infobox economy would be available, though some might not be doable in Wikidata. --- Jura 20:39, 30 June 2019 (UTC)

@813gan, Jura1: Hi there. The PreferentialBot has the job to set the preferred rank for values with the most actual point in time qualifier. If you want this, please post the values on the discussion site of the bot. Then the operator of the Bot will take the properties to serve them. Cheers! Datawiki30 (talk) 18:59, 1 July 2019 (UTC)

  • It's Laboramus doing that in his spare time if he wants. I pinged him above, but other interested bot operators can do the same. --- Jura 19:01, 1 July 2019 (UTC)
Yep sorry has been a bit busy lately, but I will look into adding it asap. Laboramus (talk) 01:02, 19 July 2019 (UTC)
This section was archived on a request by: Thanks Laboramus. --- Jura 20:55, 19 July 2019 (UTC)

Request date: 4 May 2019, by: Kolja21

Link to discussions justifying the request
  • "Web of Science ResearcherID is now on Publons." [1]
Task description

The ResearcherID (52.358 items outdated) should be replaced by Publons author ID:

Discussion
Request process

Accepted by (Edoderoo (talk) 16:50, 10 June 2019 (UTC)) and under process
Can you confirm that this is what you need?

If so, then I can run this script for all remaining items.

@Edoderoo: Yes, both edits are correct. Thanks! --Kolja21 (talk) 22:54, 10 June 2019 (UTC)
It's running, I guess until somewhere next weekend. Edoderoo (talk) 14:18, 12 June 2019 (UTC)

Task completed (19:11, 14 June 2019 (UTC))

@Edoderoo: Thanks for your work! Two questions:
  • I already started a task to fix that. I believe it is caused by another issue on the server today, the lag for queries is pretty high today, and my script didn't expect to find entries already edited before. Edoderoo (talk) 20:26, 14 June 2019 (UTC)
Cheers --Kolja21 (talk) 20:18, 14 June 2019 (UTC)
I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. Kolja21 (talk) 02:51, 26 August 2019 (UTC)

HDI

set preferred rank

When looking at the data for the previous request, it occurred to me that maybe the same as above should be done for Human Development Index (P1081) (most recent value should have preferred rank, all others normal rank). However, I don't use it myself and it's a different type of data. @IvanP: who seem to have worked with it. --- Jura 15:35, 29 June 2019 (UTC)

@Jura1: I just wanted to note that HDI estimates for certain years have changed, e.g., the HDI of Germany in 1995 was given as 0.830 at the time I added the value to Wikidata, now it is 0.834. Bodhisattwa added current estimates but the outdated ones should be deleted. (I am not familiar with OpenRefine yet and actually did the HDI stuff manually back then. 😲) -- IvanP (talk) 16:33, 29 June 2019 (UTC)
SELECT (URI(CONCAT("https://www.wikidata.org/wiki/",strafter(str(?item), "y/"),"#P1081")) as ?click) 
        ?year ?v ?url ?rank 
        ?statedin
WHERE
{
    BIND(wd:Q1025 as ?item) 
    ?item p:P1081 ?st . 
    ?st ps:P1081 ?v .
    OPTIONAL { ?st prov:wasDerivedFrom/pr:P854 ?url }
    OPTIONAL { ?st pq:P585 ?year } .
    OPTIONAL { ?st prov:wasDerivedFrom/pr:P248 ?statedin } .
    ?st wikibase:rank ?rank 
}
ORDER BY ?year

Try it!

An additional problem then. For some years we have multiple values and from the statements it's hard to say which one is which (see query above). The question is if they should be deleted, get deprecated rank or some "criterion used"-qualifier value (e.g. provisional).
Good thing 2017 has just one value ;). So we can set that preferred while sorting out the rest. --- Jura 23:28, 29 June 2019 (UTC)

Hi! The old value should be deprecated with "reason deprecation" = item/value with less accuracy (Q42727519) (check Help:Deprecation ). I'm operating the WDBot for the property nominal GDP (P2131). I use "retrieved" to note when the data was retrieved. If after time there is some revision for a old value, then it is easy to check which one is the most actual and the old one can be deprecated. Cheers! Datawiki30 (talk) 19:10, 1 July 2019 (UTC)

fix multiple values per year

still todo --- Jura 23:24, 19 July 2019 (UTC)

seems to be done. There are no items with multiple "best" statements [3]. --Pasleim (talk) 14:06, 27 December 2019 (UTC)
I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. --Pasleim (talk) 14:06, 27 December 2019 (UTC)

Removing invalid Billboard artist ID (P4208) statements

Request date: 17 June 2019, by: Tinker Bell

Link to discussions justifying the request
Task description

Remove all Billboard artist ID (P4208) statements matching the regex [0,9]{6}\/.{0,}

Discussion

I'm checking right now how many of these claims are left. If that looks good, then deleting them is adding a line of code. See my script here. Edoderoo (talk) 12:55, 19 June 2019 (UTC)

Request process

Accepted by (Edoderoo (talk) 15:29, 19 June 2019 (UTC)) and under process
There was one item protected against vandalism, that blocked my script. Now it finished it completely.
Task completed (12:31, 23 June 2019 (UTC))

Edoderoo, thanks, but, there are many cases matching the regex in Wikidata:Database_reports/Constraint_violations/P4208#"Format"_violations? The last update was at June 30 --Tinker Bell 02:39, 6 July 2019 (UTC)
The request was for six numbers (see the RegEx-example), but the ones left have seven digits. I see they don't work either, so my script runs again, now for 7 digits. Edoderoo (talk) 07:44, 6 July 2019 (UTC)
Let's now wait for the constraint-report to update. There must be progress. Edoderoo (talk) 11:56, 6 July 2019 (UTC)
Now there is only a few issues left, that can be handled best manually. Edoderoo (talk) 07:29, 19 July 2019 (UTC)
Edoderoo, thanks! --Tinker Bell 20:59, 18 August 2019 (UTC)
I think that this discussion is resolved and can be archived. If you disagree, don't hesitate to replace this template with your comment. --Pasleim (talk) 17:13, 19 January 2020 (UTC)