BattyBot 81

New to bots on Wikipedia? Read these primers!

Operator: GoingBatty (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 14:12, Wednesday, February 7, 2024 (UTC)

Function overview: Replace ((coord missing)) with ((coord|source:wikidata|display=title))

Automatic, Supervised, or Manual: Automatic

Programming language(s): AutoWikiBrowser

Source code available: AWB

Links to relevant discussions (where appropriate): Wikipedia:Bot requests#Using coordinates on Wikidata

Edit period(s): Monthly

Estimated number of pages affected: 20,661

Namespace(s): Mainspace

Exclusion compliant (Yes/No): Yes

Function details: Category:Articles missing coordinates with coordinates on Wikidata contains 20,283 articles tagged with ((coord missing)), but they all have coordinates available on Wikidata. This bot would replace ((coord missing)) with ((coord|source:wikidata|display=title)) which will fetch the coordinates from Wikidata (e.g. this edit). This bot will also run AWB's general fixes. Thank you for your consideration.

Discussion

This might be a dumb question, but if every page indicating that it is missing coords is already on Wikipedia, why do we have this template? Why not just make it a wrapper/redirect to ((coord))? I know that MSGJ asked for this, and I trust their judgment, but this seems like a lot of work if it's that trivial of an issue. Primefac (talk) 14:26, 7 February 2024 (UTC)[reply]

@Primefac: ((coord missing)) contains 93,000 pages. Only 20,000 of them have coordinates on Wikidata. However, if you'd like to update the templates so this request would be moot, that's fine with me. GoingBatty (talk) 14:39, 7 February 2024 (UTC)[reply]
Yup, as I said... dumb question. Apparently I can't read, and (for some reason) thought that was also the transclusion count. Primefac (talk) 14:46, 7 February 2024 (UTC)[reply]
Do you mean that if coordinates are on Wikidata then we can just change the behaviour of ((coord missing)) so that it uses those coordinates instead of populating the maintenance category? Yes, that could be possible. The only disadvantages I can think of:
  1. It will still say "coord missing" in the wikicode which could be misleading
  2. The template may not be placed in the usual place (e.g. at the top) that the coord template is usually placed.
— Martin (MSGJ · talk) 15:05, 7 February 2024 (UTC)[reply]
Agreed. ((coord missing)) should be changed to ((coord)), see below for more detail. — The Anome (talk) 17:05, 7 February 2024 (UTC)[reply]

I'd be happy to support this, with one proviso, that the ((coord)) template be changed so that transclusion from Wikidata was gated via a "source=wikidata" parameter, so that it was clear on the enwiki side why the edit was made, and where the coordinates were being pulled from. So ((coord missing|Name of region)) would become ((coord|source=wikidata|display=title)). — The Anome (talk) 17:02, 7 February 2024 (UTC)[reply]

That parameter is not required by the template, so are you just putting that in for explanatory purposes and the template will just ignore it? — Martin (MSGJ · talk) 17:07, 7 February 2024 (UTC)[reply]
Putting it there for explanatory and tracking purposes, so we can see how it got there and why. Right now, the template should ignore it, but might also be useful to let us add extra semantics to ((coord)). For example: right now, if you add ((coord|display=title)) to an article that doesn't have coordinates on Wikidata, it blows up in an uninformative and mystifying way. Having this extra parameter might let the error message be improved, and also let such erroneous articles be put in a tracking category.

From my viewpoint as a maintainer of the ((coord missing)) ecosystem, the more tracking metadata we have, the better. I'm committed to a long-term transition to Wikidata as the master source of geodata, but it's going to be a long process, and the more we can smooth the transition by having backward and forward compatibility during the transition process, the better. — The Anome (talk) 17:09, 7 February 2024 (UTC)[reply]

Okay thanks for the explanation. I support this approach. — Martin (MSGJ · talk) 17:27, 7 February 2024 (UTC)[reply]
Thanks. I'm glad you're stepping up for this; ecosystems made out of multiple single-purpose bots that use wikitext, templates and categories for orchestration are generally more robust that those which rely on complex multi-purpose bots. — The Anome (talk) 17:30, 7 February 2024 (UTC)[reply]
@The Anome and MSGJ: Updated this bot request to change to ((coord|source:wikidata|display=title)) (e.g. this edit). (Note that |source=wikidata generates an error.) GoingBatty (talk) 19:44, 7 February 2024 (UTC)[reply]
Thanks all, I noticed the lack of "where is this data coming from" earlier but got distracted and never came back to express my concern; this seems to deal with the issue in a suitable manner. Primefac (talk) 21:07, 7 February 2024 (UTC)[reply]