Page MenuHomePhabricator

Simple math in tables
Open, Needs TriagePublic


It is my understanding that the developers are working very hard on making it easier to create tables in visual editor. We are not quite there yet, and I have seen a recent setback, but we are close to being able to copy and paste an existing table from a spreadsheet directly into an editing window. At present, this allows cell by cell transfer of data, but does not allow one to do traditional spreadsheet functions such as simple math (e.g. sum of entries in a column, ratio of two cells). While full functionality of a spreadsheet is well beyond the scope of what ought to be available in media wiki, I see tremendous value in allowing some simple concepts such as sums and ratios. (I would also like the ability to have hidden columns, which I suspect are technically possible but may be nontrivial. I'll be happy to explain if the need for this isn't obvious).

Editors who do not follow sports closely may be unaware that we have many hundreds if not thousands of articles with tables of historical results for teams coaches and individual players. As an example, see John Thurston.

In a nutshell, the challenge is that, while it is not hard to add a single year to a template, or update the template when the team wins, the subtotals by coach, by conference versus non-conference, aggregate cumulative results and winning percentages are not automatically updated, but have to be edited separately.

The setup creates two problems:

  • Harder than it should be—Updating a single game is not easy — instead of editing one field, the editor may need to edit eight fields. Or maybe six, or maybe four, it depends
  • Errors persist—If any editor ever makes an error, the subtotals and totals will now be wrong, and a subsequent edit which makes all of the right increments will not correct the problem but preserve the error. (Plus, if some editor notes the subtotals are wrong and corrects them, they may have been wrong because some individual entry was wrong and now the subtotals are right but the individual entry is wrong. When the software does not do the totals, the individual entries and the totals can get out of sync)

To illustrate,

  • Existing approach when a game is won:
  • Increment season win count
  • If a conference game, increment season win count
  • If winning percentage template in place, increment win count
  • Increment coach win count
  • If a conference game, increment season conference win count for the coach
  • If winning percentage template in place, increment win count for the coach totals
  • Increment all time win count
  • If winning percentage template in place, increment win count for all time totals

Proposed approach when a game is won:

  • Increment win count in the conference field, if a conference game, or in the non-conference field if non-conference (the software then calculates all subtotals and ratios).

I've presented this in the context of sports tables, but there are many tables within Wikipedia which require occasional updates. In cases where these tables have subtotals and totals the same problems can persist — that the entries in the subtotals get out of sync. Editors should modify individual entries, and let a computer do the math.

I don't know whether this will fall within the types of things considered in scope. If it is in scope, I'll note that my brief discussion above is far short of adequate, and I'll volunteer to write more fully developed use cases and take a stab at specifications.

--Sphilbrick (talk) 17:23, 16 November 2015 (UTC)

This card tracks a proposal from the 2015 Community Wishlist Survey:

This proposal received 7 support votes, and was ranked #77 out of 107 proposals.

Event Timeline

DannyH raised the priority of this task from to Needs Triage.
DannyH updated the task description. (Show Details)
DannyH moved this task to Wishlist 51-on on the Community-Wishlist-Survey-2015 board.
DannyH added a subscriber: DannyH.
IMPORTANT: If you are a community developer interested in working on this task: The Wikimedia Hackathon 2016 (Jerusalem, March 31 - April 3) focuses on #Community-Wishlist-Survey projects. There is some budget for sponsoring volunteer developers. THE DEADLINE TO REQUEST TRAVEL SPONSORSHIP IS TODAY, JANUARY 21. Exceptions can be made for developers focusing on Community Wishlist projects until the end of Sunday 24, but not beyond. If you or someone you know is interested, please REGISTER NOW.
DannyH set Security to None.