Page MenuHomePhabricator

Charts should link to the source data on Wikimedia Commons
Open, MediumPublicFeature

Description

Feature summary (what you would like to be able to do and where):

The chart should have a link back to the source data file on Commons.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

This would make it a lot easier to fix typos and other errors. Now one has to enter editing mode and copy the file name, got to Commons and paste it.

It would also follow the same attribution praxis as we have for images (if the data has a license requiring attribution).

Benefits (why should this be implemented?):

Mostly for usability and being a good role model on verifiability and attribution, and perhaps also for legal reasons.

Event Timeline

Yep. There is a precedent for this. There is an edit link in Wikidata bridge when Wikidata statements are used in Wikipedia. On top of that, multiple community templates do the same in that situation.
If there will be no link, then undoubtedly someone will create a template with a link to the chart on commons. Then it will become common practice to use said template with every chart invoke. Or the chart extension could just add that link itself.

Yeah I too think this is needed. Right now when a chart is transcluded, I need to read the wikitext source to even be able to reach the chart definition on Commons. This makes it very difficult to edit.

Additionally, it would be cool if the charts definition file on Commons in turn would feature an edit button to directly take you to the tabular series data.

Additionally, it would be cool if the charts definition file on Commons in turn would feature an edit button to directly take you to the tabular series data.

That's a great idea!
Which also makes me wonder, should the transcluded chart link to both the definition for easy editing and to the data source as reference, or to only one of them?

Thanks for the ideas on this task. I think at the very least linking to the dataset used to generate a chart would be a good addition, for easy editing but also for clearer attribution.

CCiufo-WMF triaged this task as Medium priority.Jan 10 2025, 8:22 PM

Change #1141299 had a related patch set uploaded (by Simon04; author: Simon04):

[mediawiki/extensions/Chart@master] Add links to the source .chart and .tab data on Wikimedia Commons

https://gerrit.wikimedia.org/r/1141299

One approach could be to utilize the toolbox of ECharts (top right) and display the links to .chart and .tab there.

localhost_8080_index.php_Charts.png (759×1 px, 66 KB)

Jdlrobson-WMF added a subscriber: DTorsani-WMF.

@DTorsani-WMF would you be able to provide us some input on what the ideal experience for this would look like ( Seddon can provide more context on this if needed) ?

Note that enwiki has implemented a similar functionality for many navigation boxes, see https://en.wikipedia.org/wiki/Innsbruck#External_links for instance and note the V T E buttons on the left.

I would be supportive of using the toolbox in the top right. There are multiple things we could put in there. That being said, I would suggest we use an ellipses icon and open a menu for more clarity and better responsiveness, instead of using a list of icons that always show. In that menu, we could put the link to Wikidata, add the option to download as a CSV, toggle the patterns/symbols for accessibility. Would this be possible @Jdlrobson-WMF

I also like the toolbox idea, but would additionally recommend to include all charts and tabular data files used in a given article in the respective info page (e.g. https://en.wikipedia.org/w/index.php?title=Ammonia&action=info ), where we already list Templates, Modules and Wikidata items used in the article. (Thanks to @Kallichore for bringing up this idea in https://de.wikipedia.org/wiki/Hilfe_Diskussion:Chart#Seiteninformationen )

In the meanwhile, dewiki came up with this template https://de.wikipedia.org/wiki/Vorlage:Chart to link to the chart definition and chart help page ("Diagrammdaten: Definition | Hilfe").

In the meanwhile, dewiki came up with this template https://de.wikipedia.org/wiki/Vorlage:Chart to link to the chart definition and chart help page ("Diagrammdaten: Definition | Hilfe").

Cool! That's a lot closer to what I had in mind.

I think we should actually borrow pretty much exactly what dewiki has done with the template, so the bottom right corner would have something like:

image.png (356×1 px, 35 KB)

Where:

Change #1141299 abandoned by Simon04:

[mediawiki/extensions/Chart@master] Add links to the source .chart and .tab data on Wikimedia Commons

https://gerrit.wikimedia.org/r/1141299