Wikidata:Bot requests/Archive/2019/06

From Wikidata
Jump to navigation Jump to search

geographical township of Quebec (Q23019040) maintenance

Request date: 4 May 2019, by: YanikB (talkcontribslogs)

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 geographical 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)
  • Sounds good. --- Jura 07:54, 20 June 2019 (UTC)
    • If you create a suitable catalog item, I could do this as I have such scripts available. --MisterSynergy (talk) 08:20, 20 June 2019 (UTC)
      • Sure: Q64732761. Thanks for your help. --- Jura 08:32, 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)

Replace Consortium of European Research Libraries (Q1127581)

# 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!

  • @MisterSynergy:. Thanks for your help. I just noticed that some already used P248, but with Q1127581. Would you kindly update these too? --- Jura 10:57, 21 June 2019 (UTC)
    • Sure, but it is probably worth to generalize, right? --MisterSynergy (talk) 12:54, 21 June 2019 (UTC)
    • Yep. As we don't have a special qualifier for quaternary sources ;) --- Jura 13:13, 21 June 2019 (UTC)

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)
    • Sorry for delay. If there are any other data sets (with affordable license) that would be useful in these infoboxes let me know. --813gan (talk) 23:03, 10 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)