the-law-factory icon indicating copy to clipboard operation
the-law-factory copied to clipboard

Add global statistics on law modules

Open njoyard opened this issue 8 years ago • 2 comments

I think it would be interesting to have global statistics in each law module :

  1. articles: global change ratio and growth ratio at each step (vs previous step & vs beginning)
  2. amendments: total number of amendments, total/% in each state, total/% for each group (maybe even totals/% for each group+state couple)
  3. debates: total number of words spoken, of speakers, and also per-group (total & %)

All this data is already available (except for 1. for existing texts, but https://github.com/regardscitoyens/the-law-factory-parser/commit/ef2155c4c2afdc6d7ca09e987adec6a9829f71dd enables making the stats available in the API), so the question is more whether we want to display it, and how we want to display it.

  • For articles, maybe we could add a block on top of each step with info in a popover.
  • For amendments, the stats could be visible in the sidebar when loading the page ; but in this case we'd need a way to deselect an amendment (ie. return to the initial sidebar state). Or we could add the stats to legend tooltips, but that would limit the data we can display.
  • For debates, we could either add a global line on top of the viz, or display stats in the sidebar as well (deselection is already possible in debates).

What do you think ?

njoyard avatar May 04 '16 10:05 njoyard

+1 for the objective, but let's be careful to not overfill the screen with more info as it is already quite rich and complex as suggested in #183 maybe only main figures such as total numbers should be directly visible, and more in tooltips only

  • for articles I don't see how to give a number visible in each column, maybe just the whole percentage of modif but i fear it it to be too obscure. Maybe an icon info (i) on top of the first article in each column that displays a tooltip on hover and/or click.
  • for amendments, as said in #183, the legend seems a good place, and maybe the total could be given next to the group name smaller but no parenthesis. ratios in tooltip would be cool. and this could apply to sections as well
  • for debates, to be coherent with amendment I'd use the legend as well to indicate only a global percentage and more details in tooltips

RouxRC avatar May 08 '16 19:05 RouxRC

For articles maybe something like that with data (length, % length change, % content change) in popovers (maybe using a different color to distinguish from actual text sections) :

example

njoyard avatar May 09 '16 06:05 njoyard