Wikidata:Bot requests/Archive/2016/09

Hi all. After removing a lot of pages from ns0 on Italian wikipedia there is some fixing to do on Wikidata. In all following items you should remove all itwiki links (they should be all starting with "Progetto:Storia/", these are all sandboxes now) and then you should delete (or make a request if you can't do it yourself) all items that remain with no other content. Thanks in advance. (Example) --Supernino (talk) 10:22, 15 September 2016 (UTC)

Easy.   Done. Also removed the list as it was rather long. If somebody is interested in list, it is available in this version. --Edgars2007 (talk) 10:55, 15 September 2016 (UTC)
This section was archived on a request by: --Edgars2007 (talk) 10:55, 15 September 2016 (UTC)

Remove "uit n/a =" from Dutch description

Can someone remove "uit n/a =" from the Dutch descriptions, like "auteur uit n/a = (1818-1890)" > "auteur (1818-1890)"? This error was introduced by a bot, 478 instances. Sjoerd de Bruin (talk) 17:55, 16 September 2016 (UTC)

Done (incompletely); some anomalies found, skipped:

XXN, 09:34, 18 September 2016 (UTC)

Those are   Done, thanks. However, I still see 126 instances. Sjoerd de Bruin (talk) 07:31, 19 September 2016 (UTC)
Yep, my bad, used too restrictive search pattern (the remaining item descriptions as well were exceptions in some wise - they didn't have values after uit n/a =). Now finished. --XXN, 09:22, 19 September 2016 (UTC)
This section was archived on a request by: XXN, 09:22, 19 September 2016 (UTC)

SoundCloud

We have ~111 items with website account on (P553) = SoundCloud (Q568769), whose qualifier website username or ID (P554) need to be transferred to SoundCloud ID (P3040). Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:04, 14 September 2016 (UTC)

  Done --Pasleim (talk) 17:28, 16 September 2016 (UTC)
@Pasleim: Thank you. I think there are still 21 remaining: [1]. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:55, 16 September 2016 (UTC)
The remaining one couldn't be processed by the bot (conflicting values, newly added values or unsupported elements by pywikibot). Since the number of remaining claims is not high I will not further work on it and I think everybody interested in SoundCloud can now take over. --Pasleim (talk) 13:31, 20 September 2016 (UTC)
@Pasleim: Thanks for clarifying; I think the rest are all resolved, now. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 17:34, 20 September 2016 (UTC)
This section was archived on a request by: --Pasleim (talk) 21:04, 20 September 2016 (UTC)

Update featured article badges

I'm not sure about other languages, but it seems the featured article badges for English Wikipedia haven't been updated since the initial import. It is now badly out of sync. We should remove badges for articles that are no longer featured articles and add badges for newly promoted featured articles (and hopefully do this on a regular basis). Kaldari (talk) 02:31, 17 September 2016 (UTC)

We have 4,940 items on Wikidata with en-wiki link as a featured article (per this). PetScan tells there are right now 4,834 featured articles on English Wikipedia. So yes, they are not in sync. I don't know any automatic way to update those, only manually by first making a list of those both queries, sorting them alphabetically (using a tool ofc), and then using some diff comparing tool for the 2 lists or some other way like that. --Stryn (talk) 18:01, 19 September 2016 (UTC)
Query for enwiki good articles. --Edgars2007 (talk) 18:08, 19 September 2016 (UTC)
  Done --Pasleim (talk) 21:04, 20 September 2016 (UTC)
This section was archived on a request by: --Pasleim (talk) 21:04, 20 September 2016 (UTC)

Coors of hq

Hello, I need again for these items to move its P625 coordinates as P625 qualifier of P159. --Jklamo (talk) 19:43, 9 September 2016 (UTC)

Pasleim, maybe something for DeltaBot and fixClaims.py? --Edgars2007 (talk) 12:52, 10 September 2016 (UTC)
By the way, the query above doesn't work although it does return some results.
SELECT DISTINCT ?item WHERE {
  ?item wdt:P31/wdt:P279* wd:Q4830453;
        wdt:P625 [];
        wdt:P159 [] .
  MINUS { ?item p:P159/pq:P625 [] } . # actually, this is superfluous, those coords shouldn't be there anyway
}
Try it!
Matěj Suchánek (talk) 17:55, 10 September 2016 (UTC)
I'm completely OK with this approach and I know this has been done before several times, but...
  • Are we really sure, that those coords are for headquaters? It may be for factory or something like that, that also has primary (coords)=yes.
  • If we know P969 (P969) of presumambly headquaters wouldn't it be better to move coords there as qualifier? Yes, also not good - will probably be too high error rate.
Just loud thinking. You can answer or ignore this. --Edgars2007 (talk) 17:13, 11 September 2016 (UTC)
We are not 100% sure and it is hard to take sample test, as for most of company items just P159/P625 are filled (no P969). But mostly really it is coors of hq. Coordinates are in 99% imported from wiki articles and these articles have just coors with no distinction to what they are related.
P969 is just another qualifier of P159, another qualifiers may be P281 or even P276 with specific building. But in future we can be able to deduct location from P969 (using OSM for example) and compare it to P625. That can be error check that will be never possible at wikis. --Jklamo (talk) 18:43, 12 September 2016 (UTC)

I don't see why we are necessarily moving P625 to below P159. Some companies, such as some bakeries, are really just a single address with no other locations besides the main location. They have a unique address and geocoordinate and keep P625 makes queries easier. — Finn Årup Nielsen (fnielsen) (talk) 21:28, 13 September 2016 (UTC)

It is necessary, as sole P625 are semantically wrong and ambigous. Company is a juridical person, thus itself does not have coordinates. There are coordinates of headquarter (factory or shop used by company), so these coors needs to be stored appropriate place as qualifier. Make an exception for small companies for example will just cause P625 to be added again directly by bots and users.
Also it is important to distinguish company entity and specific shop/factory/restaurant. In case item about specific shop/factory/restaurant just remove P31:Q4830453 (and leave P31:Q213441 for example) and then direct P625 may stay and they won´t be semantically wrong or ambigous. --Jklamo (talk) 21:59, 13 September 2016 (UTC)
This section was archived on a request by: Edgars2007 (talk) 09:06, 24 September 2016 (UTC)

Import coordinates from enwiki

There are currently 13849 items associated with w:Category:Coordinates not on Wikidata that have don't have any statements (Wikidata:Database reports/items without claims categories/enwiki). Looking at the item list, it seems that most are suitable for import even if some relate to organizations and might later be moved per #Coors_of_hq).
--- Jura 07:38, 14 September 2016 (UTC)

When I'm importing coords, I'm ignoring companies (I try to follow constraints on 625 talk page). Maybe I should add them directly to headquaters, maybe... --Edgars2007 (talk) 07:59, 14 September 2016 (UTC)
These items currently don't have any statements, so I'm not sure what your constraint checks would do. I do think that having some coordinates would be better than having no statement at all.
--- Jura 08:08, 14 September 2016 (UTC)
Yes, items without statements are valid items for my bot to import them :) --Edgars2007 (talk) 08:10, 14 September 2016 (UTC)
Note that all coordinates form enwiki (or another wiki) articles are not suitable to import, as in some cases (company, people, ship, sport season, etc...) they are unclear or misleading. It is better to perform category-based imports. --Jklamo (talk) 12:13, 14 September 2016 (UTC)
I think we are fairly efficient in identifying people items, so it's unlikely that these are in the 13849 items. The list does include events, but these can have coordinates. Many sports related items got p641 recently, so it's less likely to find them there. BTW, I added a link to the list in my initial comment.
--- Jura 13:01, 14 September 2016 (UTC)
@Jklamo: talking about the problem in general - this is one of the reasons for why that value stats table is very valuable (from Ivan's talk page), then I can improve script (for adding coords), not overcomplicating it. --Edgars2007 (talk) 15:35, 14 September 2016 (UTC)
  • If you want to work on intersections with other categories, this can give a list of possible candidates. Even better, it isn't limited to items that don't have any statements.
    --- Jura 13:07, 14 September 2016 (UTC)
This section was archived on a request by: Edgars2007 (talk) 09:06, 24 September 2016 (UTC)

country→Kosovo

Could someone please replace all cases of country (P17)Kosovo (Q1231) with country (P17)Kosovo (Q1246)? The country property should point to the political-territorial entity rather than the cultural-geographic region. Thank you. --Arctic.gnome (talk) 22:34, 23 September 2016 (UTC)

done with Petscan --Pasleim (talk) 11:30, 24 September 2016 (UTC)
This section was archived on a request by: --Pasleim (talk) 11:30, 24 September 2016 (UTC)

Gadget for entering the parents of a person

I would like to have a gadget where I have a form in which I can put: Item-Id of a person, name of mother, date of birth of mother, place of birth of mother, date of death of mother, place of death of mother, name of father, date of birth of father, place of birth of father, date of death of father, place of death of father and the source for the claim. It would also be nice to have the gadget in the Tools-list. Having such a gadget would make it a lot easier to enter this data. ChristianKl (talk) 09:40, 24 September 2016 (UTC)

Wrong area :) File a new phab: ticket and tag it with "wikidata-gadgets" project. --Edgars2007 (talk) 10:14, 24 September 2016 (UTC)
This section was archived on a request by: --Edgars2007 (talk) 13:04, 24 September 2016 (UTC)

Undo incorrect redirect fixes (wrong merge)

political ideology (Q14934048) was merged to political thought (Q11499141) back in december 2015, causing KrBot (talkcontribslogs) chancing the redirect to the destination like this. Can this still be undone, as the merge was reverted too late? Sjoerd de Bruin (talk) 17:53, 19 September 2016 (UTC)

@Ivan A. Krestinin: --Pasleim (talk) 14:42, 20 September 2016 (UTC)
  DoneIvan A. Krestinin (talk) 15:56, 25 September 2016 (UTC)
Thank you very much! Sjoerd de Bruin (talk) 11:46, 26 September 2016 (UTC)
This section was archived on a request by: Sjoerd de Bruin (talk) 11:46, 26 September 2016 (UTC)

LinkedIn & VK

Like my previous SoundCloud request (kindly resolved by User:Pasleim), we have values of website account on (P553) that need to be converted to P2035 (P2035) (587 of them) and VK ID (P3185) (95). Can someone do this, please? There will likely be more types to be done in the near future. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:39, 21 September 2016 (UTC)

Adding Last.fm ID (P3192). Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:55, 21 September 2016 (UTC)
mostly done. Some leftovers have to be done manually. --Pasleim (talk) 15:53, 26 September 2016 (UTC)
This section was archived on a request by: --Pasleim (talk) 15:53, 26 September 2016 (UTC)

Property:P473 cleaning

A bot should remove the international code easily recognizable by matching the relevant country code in the associated country instance. A list with the codes that do not respect the associated regex can be found here. Inside that list there is a subset of wrong local codes that erroneously contains the country code.

Once removed the country codes, a further check consist on verifing that the local codes is starting with a number or an open bracket. Blank spaces or minus shall be removed from the beginning (+380-512 shall became 512; not -512).

A second activity to be performed (after the previous one) is to split in separate values, all the code divided by comma (e.g. "07361, 07366, 07367" shall became "07361", "07366" and "07367"). --Andyrom75 (talk) 18:30, 11 September 2016 (UTC)

  Done --Pasleim (talk) 19:00, 14 October 2016 (UTC)
This section was archived on a request by: --Pasleim (talk) 19:00, 14 October 2016 (UTC)

result of human using architectural style (P149) to genre (P136)

I see there is a lot of human (Q5) using architectural style (P149). The result are generally ok, the they sould be move to genre (P136), who the contraints are compatible with human (Q5). List of the items in question via petscan. --Fralambert (talk) 14:42, 24 September 2016 (UTC)

Isn't movement (P135) a better option? Sjoerd de Bruin (talk) 11:45, 26 September 2016 (UTC)
@Fralambert: I could do this with my bot but I need consensus about which property to use. So could you answer please Sjoerd's question? --Pasleim (talk) 14:41, 12 October 2016 (UTC)
@Sjoerddebruin, Pasleim: If you think that movement (P135) id a better option, why not? --Fralambert (talk) 00:05, 13 October 2016 (UTC)
  Done --Pasleim (talk) 16:33, 14 October 2016 (UTC)
This section was archived on a request by: --Pasleim (talk) 16:33, 14 October 2016 (UTC)

French cities not marked as such

Ajaccio (Q40104) is a municipality (Q15284) with a population (P1082) of 58,000 inhabitants, yet it was not instance of (P31) city (Q515).

I guess their might be work for a bot to correct similar cases?

In France a "ville" (city) is defined by having more than 2000 inhabitants.

Thanks! Syced (talk) 07:41, 28 September 2016 (UTC)

  • Maybe you'd want to make a dedicated item for such "ville", but then, what's the advantage compared to the current situation.
    --- Jura 09:35, 1 October 2016 (UTC)
This section was archived on a request by:
--- Jura 12:08, 21 November 2016 (UTC)

NLSZ authority name (HuBpOSK) import from VIAF

Hey, I was wondering if someone could import NSZL name authority ID (P3133) from VIAF. The trick is that this ID is not the primary ID on the NLSZ record (that would be NSZL (VIAF) ID (P951)), but the one under HuBpOSK in NLSZ records (so for http://viaf.org/processed/NSZL%7C000000015848 it is "114", see Antal Szerb (Q570810)). Thanks! – Máté (talk) 05:33, 4 September 2016 (UTC)

Cyrillic merges

This included pairs of items with articles at ruwiki and ukwiki each (Sample: Q15061198 / Q12171178). Maybe it's possible to find similar items merely based on labels in these languages and merge them. --- Jura 03:33, 19 September 2015 (UTC)

I cannot find any ru-uk pairs. Are they all done? --Infovarius (talk) 16:27, 3 November 2015 (UTC)
The ones on that list are identified based on dates of birth/death and we regularly go through them. The occasional findings there (also with ru/be) suggest that there are more (without dates). A query would need to be done to find them. --- Jura 16:33, 3 November 2015 (UTC)
Today the list includes quite a few, thanks to new dates of birth/death being added. --- Jura 16:43, 2 December 2015 (UTC)
A step could involve reviewing suggestions for missing labels in one language based on labels in another languages with Add Names as labels (Q21640602): sample be/ru. --- Jura 11:44, 6 December 2015 (UTC)
I came across a few items that had interwikis in ukwiki to ruwiki, but as they were on separate items, these weren't used to link the articles to existing items (sample, merged since). --- Jura 10:17, 15 December 2015 (UTC)
SELECT DISTINCT ?item ?Spanishlabel ?item2 ?Italianlabel
WHERE 
{
  	VALUES ?item { wd:Q19909894 }
  	?item wdt:P31 wd:Q5 .

    VALUES ?item2 { wd:Q16704775 }
  	?item2 wdt:P31 wd:Q5 .

    ?item rdfs:label ?Spanishlabel . FILTER(lang(?Spanishlabel)="ru")
	BIND(REPLACE(?Spanishlabel, ",", "") as ?Spanishlabel2)

    ?item2 rdfs:label ?Italianlabel . FILTER(lang(?Italianlabel)="uk")

    FILTER(str(?Spanishlabel2) = str(?Italianlabel))
  	FILTER(str(?Spanishlabel) != str(?Italianlabel))
}
LIMIT 1

#added by Jura1
Try it!

The above currently finds one pair. It times out when not limited to specific items ;) Maybe there is a better way to find these.
--- Jura 14:19, 3 April 2016 (UTC)

In the meantime the two items were merged, so it doesn't work anymore.
--- Jura 16:54, 4 April 2016 (UTC)
See also User:Pasleim/projectmerge/ruwiki-ukwiki. XXN, 08:22, 8 September 2016 (UTC)

Revert label additions by Edoderoobot in the beginning of May

In the beginning of May, Edoderoobot (talkcontribslogs) copied a lot of labels from other languages like here and here. You can clearly see that these aren't acceptable labels in Dutch. I've asked the bot operator multiple times to clean this up, but they are still there. Can someone help me? Sjoerd de Bruin (talk) 07:17, 25 August 2016 (UTC)

The following query uses these:

  • Properties: instance of (P31)     
    SELECT *
    {
      	?item wdt:P31 wd:Q13406463 .
    	?item rdfs:label ?labelnl FILTER(lang(?labelnl)="nl")
      	?item rdfs:label ?labelen FILTER(lang(?labelen)="en" && str(?labelnl) = str(?labelen) )
    }
    

Above a list of (all) NL labels that are identical with EN (4698). You could use QuickStatements to delete the label for some or all (or replace it).
--- Jura 07:36, 25 August 2016 (UTC)

I would not be bothered if they were cleared all. I have now filtered for what items/instance of (P31) it makes sense to take over the English description (right now items like human (Q5)), so if any are deleted in excess I can re-do them with my (repaired) bot script. But i will have a look myself if this SPARQL-script can automate a repair action. This might be the opening I needed to get it fixed myself. Edoderoo (talk) 08:21, 25 August 2016 (UTC)
I created a repair script based on the above SPARQL-query... will run it tomorrow, as right now another script isn't finished yet. Please be adviced that there might be more P31-types, but those can be fixed with the same script. Most likely Sjoerd will keep contact with me about those, but feel free to contact me in case someone finds another case. Once more thanks to Jura for this helpful SPARQL-script! Edoderoo (talk) 13:24, 25 August 2016 (UTC)

Also a lot of errors in January, see here for a example. Sjoerd de Bruin (talk) 11:37, 31 August 2016 (UTC)

Also a broad selection of subjects, see Special:Diff/330646941. Can't we mass-revert? Sjoerd de Bruin (talk) 14:30, 8 September 2016 (UTC)

Updating population of US towns

Hello, I was wondering if a bot can be used to update population estimates in the U.S for 2015. I think a good source of information is here. It is a government website. Is this feasable?MechQuester (talk) 06:09, 26 July 2016 (UTC)

If there is any desire to do this, it should be as additional information, and should not replace official census information from 2010. This is because many laws have different provisions depending on the population of a town or city, and such laws always reference official census results which are done once every 10 years. Interim results from the Census Bureau are not recognized by law. Jc3s5h (talk) 14:22, 10 September 2016 (UTC)

NSW Flora IDs

Values for NSW Flora ID (P3130) are held in English Wikipedia's en:Template:NSW Flora Online, but split over multiple parameters, preventing the use of HarvestTemplates. Please can someone import them? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:23, 1 September 2016 (UTC)

My bot will import this from the original source. --Succu (talk) 16:44, 1 September 2016 (UTC)

@Pigsonthewing, YULdigitalpreservation, ChristianKl: At the moment this property works only for species (formatter: href=/cgi-bin/NSWfl.pl?page=nswfl&lvl=sp&name=), but the website has

too. This is simmilar to GRIN URL (P1421) or AlgaeBase URL (P1348). So the datatype of this property should be changed to URL. --Succu (talk) 08:13, 2 September 2016 (UTC)

@Succu: one of possible work-arounds is to have property value "nswfl" and a new qualifier with value "fm". Of course, not perfect... But this probably has to be discussed somewhere else, not on BOTREQ page.--Edgars2007 (talk) 08:18, 2 September 2016 (UTC)
@Edgars2007 Do you have a working example for this „workarond“? --Succu (talk) 21:16, 2 September 2016 (UTC)
@Succu: No, I don't have. --Edgars2007 (talk) 04:01, 3 September 2016 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────

The simplest fix will be to rename this property, and have another for other ranks. Otherwise, change the formatter URL and use IDs like:

  • lvl=sp&name=Avicennia~marina
  • lvl=in&name=Avicennia~marina+subsp.~australasica
  • lvl=gn&name=Avicennia

-- Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:54, 2 September 2016 (UTC)

I doubt this is a reasonable option. --Succu (talk) 18:21, 2 September 2016 (UTC)
Two, mutually-exclusive, options were suggested. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:58, 5 September 2016 (UTC)
I count three:
  1. recreate with datatype URL - straightforward
  2. create two additional taxon properties for the same dataset - complex (we don't use 3 properties for GRIN)
  3. reuse the current property with an URL fragment - a strange mixup between datatypes external ID and URL
--Succu (talk) 20:36, 8 September 2016 (UTC)
I was referring to my post, to which you replied in the singular. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:02, 10 September 2016 (UTC)

Calendar date

For every instance of calendar date (Q205892), please can someone's bot add calculated values like in these edits. It may also be possible to calculate labels in other languages; and values for other properties. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:51, 5 September 2016 (UTC)

P.S. query. --Edgars2007 (talk) 13:39, 10 September 2016 (UTC)

film budget

The following query uses these:

The query above returns over a thousand items, whereas the entertainment media jargon 'budget' refers to estimated cost (P2130) and not budget (P2769). These published numbers are estimated after production, and are not actually the planned budget. I would like someone to move these statements to the correct property while keeping the qualifiers. – Máté (talk) 12:04, 30 September 2016 (UTC)

Would someone please do it? :) It's been the wrong way for far too long now. – Máté (talk) 10:27, 6 February 2017 (UTC)

@Máté:   Done There are 7 items left which have both properties, to be sorted out by hand. Matěj Suchánek (talk) 14:28, 13 March 2017 (UTC)
@Matěj Suchánek: Thank you, you're a star! Only Snow White and the Seven Dwarfs (Q134430) remains, but it's the extremely rare case of P2769 being used properly (as the qualifier explains). – Máté (talk) 20:17, 13 March 2017 (UTC)
This section was archived on a request by: Matěj Suchánek (talk) 14:28, 13 March 2017 (UTC)

Species acronyms

Items for pages in species:Category:Repositories should probably have the full name listed on species:repositories as label and the acronym as alias.

If no better P31 value can be found, maybe P31=organization can do. Not sure what to suggest for the related categories. These are for taxa whose type specimen is held by that institution.
--- Jura 14:39, 20 September 2016 (UTC)

Dropped a note at Wikispecies. --Succu (talk) 19:48, 20 September 2016 (UTC)
The category is a mess replete with duplicates that I've long given up trying to deal with, but generally these pages should be treated as cross-wiki links for the equivalent institution (cf. species:AMNH, species:DNMNH, the latter of which I just merged into the proper institution).
In and of itself this is straightforward. The problem comes where many, if not most of these don't necessarily have straightforward matching pages on other wikis (e.g. because often a given institution correspond to several "collections" that have no been merged in Wikispecies), and that's not counting renamed institutions, collections that were moved/merged years ago, or the occasional outright ambiguous or incorrect name. Circeus (talk) 01:55, 21 September 2016 (UTC)
@Circeus: As long as the acronyms in Wikispecies article titles match the entry in the list, it should be fairly straightforward. Adding the full name to item labels would make it easier to find duplicates/merge them with other items. That some institutions have changed their name since or that collections were absorbed by others shouldn't be much of an issue. Wikidata is a good place to hold historic data as well.
--- Jura 13:01, 24 September 2016 (UTC)
I think we need a property to map an institution to a code. Index Herbariorum (Q11712089) (website) is an example for a register of herbarium (Q181916). --Succu (talk) 19:18, 24 September 2016 (UTC)
This might help, but isn't necessarily needed for this request.
BTW short name (P1813) could also be used.
--- Jura 10:48, 26 September 2016 (UTC)