Module talk:Chart: Difference between revisions

Content deleted Content added
Line 443:
:There appears to be a trend towards modules reading the content of a page, then trying to parse the wikitext and doing something with the result. That could be reasonable for something like [[Wikipedia:User scripts/Most imported scripts]] (the example given above) but I don't think it's desirable for articles. I have commented on that before and might try to say more but for now I'll just note that IMHO it would be better to have the data stored somewhere (in a module or in Commons structured data) and display the table and the chart from that data. That would be much more efficient and understandable, and would be much less fragile. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 05:16, 20 May 2021 (UTC)
:I also again iterate that this seems like something that is gonna break at some point. Besides, we already have Lua data tables and the Commons Data namespace. Make a template to turn that into a wikitable instead, seems way more efficient to me. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 07:22, 20 May 2021 (UTC)
::No doubt Wikidata and Commons:Data are the future, but as of now, I don't see data there being updated, do you? Look at [[commons:Data:Bea.gov/GDP by state.tab]], the very first source there on [[Template:Graph:Stacked]]: the data is 5 years stale, whereas the data at the [[List of states and territories of the United States by GDP]] is freshly updated.
::No doubt too that this is a much more fragile solution, yet much more flexible (as is typically the case with... everything in life?). Besides, not every wikitable warrants a database in Wikidata or Commons:Data, yet readers may benefit from seeing its data graphed in the article. [[User:Guarapiranga|— 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚]] ([[User talk:Guarapiranga|talk]]) 08:09, 20 May 2021 (UTC)