Community Wishlist Survey 2019/Reading/Improve graphs and interactive content

Improve graphs and interactive content

 
Examples of Vega and Vega-Lite graphs we can build
  • Problem: Wikipedia would benefit from more animations, interactive content, and self-updating infographics
When we discuss historical changes, we should be able to view those changes interactively, e.g. side by side. Statistical data should be represented as easy to understand charts, and when the new data becomes available, those charts should update. We already have some of the tools for this (the <graph> tag, the shared data on commons, maps), but the current tools are hard to use, not maintained, and need improvements. The comprehensive vision was presented several years ago in a short I Dream of Content paper.
The Graph extension has many advantages for Wikimedia projects. In brief, it allows data to by displayed by generating graphs on-the-fly (we do not need a picture file anymore, and so we do not need to create a new picture each time the data are updated). However, the Graph extension is currently not widely used, probably partly because the code is not really user-friendly.
  • Who would benefit: Readers and content creators
  • Proposed solution: Upgrade the Vega library, add Vega-Lite support, and add multilingual support to Graphs.
Develop a GUI Visual-Editor-like tool to help contributors to create nice graphs. This tool could look a bit like those in spreadsheet software (the user selects the data to plot and the type of graph, then fine-tunes it). This tool could be integrated with the Data namespace on Wikimedia Commons (example) and with the Wikidata Query Service. The latter already offers different visualisation methods, with the ability to export results to several formats (html, json, svg). See this example. Adding customizable Vega code as an output would be nice.
Community Wishlist Survey 2016/Categories/Multimedia#Support SVG interactivity and animation in Media Viewer discussed making animation and interactivity easier for SVGs.
  • More comments:

Discussion

Yes, I wish there was improved documentation for mw:Extension:Graph. Gryllida 23:00, 30 October 2018 (UTC)[reply]

Hmmm, actually I wrote a similar proposition here (I did not see this one before). Should we merge both proposals? Pamputt (talk)
Pamputt, yep, makes sense. Want to port your info to here, and just leave a redirect? Feel free to change the proposal. --Yurik (talk) 15:56, 1 November 2018 (UTC)[reply]
I modified the text above. Feel free to edit it. I also copied the discussion from the other proposal below in order to keep a record. Finally, I redirected the other proposal to this one. Pamputt (talk) 18:18, 2 November 2018 (UTC)[reply]
@Gryllida: the Vega official documentation page has tons of great documentation, but unfortunately it is for Vega 3,4+. MW is still on Vega 2, two major versions behind. If we upgrade and add Vega-Lite, it will be far easier to use (Vega-Lite has much simpler syntax), and we will be able to use the proper documentation site. --Yurik (talk) 22:54, 2 November 2018 (UTC)[reply]

One of the Vega-Lite authors and Vega contributors here. I'd like to express my full support for this effort and offer my help with any issues that come up. Dominik Moritz (talk) 18:25, 24 November 2018 (UTC)[reply]

Discussion from the other proposal

From Community Wishlist Survey 2019/Miscellaneous/Graph extension before merging

So I think one of the problems here is that Graph simply allows you to do too much... People want full flexibility but full flexibility turns out to be really hard to use if you are not an expert (nor interested in becoming one). I think many people are looking for simple graphs. I was thinking if it was perhaps an idea to add simple "graph" buttons to the Data namespace on Wikimedia Commons for instance. Like with spreadsheet software, select your data, choose a graph type, generate graph (Vega spec) and done... That would make creating simple graphs much easier, helping 80% of the people. And then when people want to get really down and dirty, they can modify those results etc. If you have similar ideas or thoughts on how to do this for data sources other than the tabular data, I would welcome them. I think that having a better insight into what would work is important to convince the foundation to work on issues like this. —TheDJ (talkcontribs) 16:08, 1 November 2018 (UTC)[reply]

Also, this is another "Fix all da things" wishlist item. I advise rewording it to be more specific and limiting the scope to the most useful tickets, in order to increase the changes of the item being successful and not to be excluded from voting by the team due to scope issues, please read Community_Wishlist_Survey_2019#proposalsphase. —TheDJ (talkcontribs) 16:10, 1 November 2018 (UTC)[reply]
Actually there are two points. First, the graph extension has been developed and now it has no support anymore. This is a global issue of Mediawiki. Some nice tools are developed at some time and finally they are not maintained on a long term and so they are not used because bugs that are reported are not fixed and contributors understand that no one is in charge of these tools. This was the basic idea of this proposal, just assign a developer to this tool to improve and fix it. Actually there was already a proposal about this and I think it is better written.
The second point is what you wrote above. The graph extension is rather difficult to use and a user friendly tool would help to use this nice extension. What you propose, a tool allowing to generate graph in a spreadsheet-like way, would be really nice.
So it looks like this is two proposals (one for upgrading Vega version and implementing lolisation) and the other one to provide user-friendly tools to generate graphs. Pamputt (talk) 09:18, 2 November 2018 (UTC)[reply]

There is a "Vega-Lite" version of Vega - it is by far easier than the full Vega, and can work together with the full Vega. Please update graphs/interactive content proposal with your thoughts. Ideally, I would even consolidate these two, as it seems a single proposal gets more votes, and attracts more attention than multiple ones. Thx! --Yurik (talk) 16:43, 2 November 2018 (UTC)[reply]

A gif player that can allow pausing dynamic .gif map would be a nice feature. C933103 (talk) 06:45, 4 November 2018 (UTC)[reply]
@C933103: sure - essentially GIF and Video player should be one and the same, and it could be a good addition. Unfortunately that wouldn't solve the fundamental problem - ability to easily generate data-driven content/visualizations. One would have to be a video editor to create either one. The <graph> driven vis is different because it relies on data sources, thus when data changes, the visualization is updated. Plus it also means that the visualization can be translated without recreating the whole thing (unlike a gif/video). But I do like your idea for the simple GIFs! --Yurik (talk) 22:19, 7 November 2018 (UTC)[reply]

Wikidata

How do Vega graphs fit in with interactive-graph Wikidata queries like Number of museums per country? HLHJ (talk) 08:31, 14 November 2018 (UTC)[reply]

I do not know for such complex case but in principle it works. You can see this graph that uses data from Wikidata. Pamputt (talk) 09:05, 14 November 2018 (UTC)[reply]
@HLHJ: Vega graphs can already get the data from Wikidata directly. The process right now is not very user friendly (you have to URL-encode the query), but it can be made far easier, e.g. "url": { "sparql": "SELECT ..." }. Thanks Pamputt for the link! --Yurik (talk) 17:46, 14 November 2018 (UTC)[reply]

Voting