You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2018/03/29 17:44:51 UTC
[whimsy] branch master updated: Display statistics of board meetings
This is an automated email from the ASF dual-hosted git repository.
curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new b2caae9 Display statistics of board meetings
b2caae9 is described below
commit b2caae9017715594a2245f5b5cb9838ec9649a87
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Thu Mar 29 13:44:44 2018 -0400
Display statistics of board meetings
---
www/officers/board-stats.cgi | 117 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 117 insertions(+)
diff --git a/www/officers/board-stats.cgi b/www/officers/board-stats.cgi
new file mode 100755
index 0000000..ac3cf76
--- /dev/null
+++ b/www/officers/board-stats.cgi
@@ -0,0 +1,117 @@
+#!/usr/bin/env ruby
+PAGETITLE = "Board Meeting Statistics since 2007" # Wvisible:meeting
+$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
+
+require 'whimsy/asf'
+require 'whimsy/asf/agenda'
+require 'whimsy/public'
+require 'wunderbar/bootstrap'
+require 'json'
+require 'set'
+
+BOARD = ASF::SVN['private/foundation/board']
+# Hash keys returned by summarize
+ERRORS = 'errors'
+PEOPLE = 'people'
+OFFICERS = 'officers'
+PMCS = 'pmcs'
+ACTIONS = 'actions'
+
+# produce HTML
+_html do
+ _whimsy_body(
+ title: PAGETITLE,
+ related: {
+ '/board/minutes' => 'Monthly Board Meeting Minutes (categorized)',
+ 'https://www.apache.org/foundation/board/calendar.html' => 'Monthly Board Meeting Minutes (by date)',
+ '/roster/group/board' => 'Current List of Directors'
+ },
+ helpblock: -> {
+ _ 'This summarizes statistics about monthly board meetings since 2007. Before 2007, the data collected below isn\'t easily parseable or wasn\'t consistently stored in meeting agendas.'
+ }
+ ) do
+ datums = JSON.parse(File.read(File.join(BOARD, 'scripts', 'meeting-summary.json')))
+ _whimsy_panel_table(
+ title: "Monthly Board Meeting Statistics",
+ helpblock: -> {
+ _p do
+ _ "Some months' minutes are skipped because data can't be easily parsed ("
+ _a! "see below for list", href: "#skips"
+ _ "). Most data is generated from public board meeting minutes, however some is "
+ _strong.text_warning "PRIVATE DATA: "
+ _ "The numbers of Average Preapprovals and Report Comments Length are private, and must not be shared outside the Membership."
+ end
+ }
+ ) do
+ _table.table.table_hover.table_striped do
+ _thead_ do
+ _tr do
+ _th 'Date'
+ _th '# Directors Attend'
+ _th '# Officers/Guests Attend'
+ _th '# Special Orders'
+ _th '# Officer Reports'
+ _th '# PMC Reports'
+ _th 'Average Report Text Length'
+ _th.text_warning 'Average Report Comments Length'
+ _th.text_warning 'Average # Preapprovals'
+ _th 'Discussion Items Section Text Length'
+ end
+ _tbody do
+ datums.select{ |k,v| !'stats'.eql?(k) && v.has_key?(PEOPLE) }.each.reverse_each do | month, agenda |
+ directors, others = agenda[PEOPLE].select{ |id, data| data['attending'] }.partition{ |id, data| 'director'.eql?(data['role']) }
+ _tr_ do
+ _td do
+ _ month.sub('board_agenda_', '')
+ end
+ _td.text_center do
+ dct = directors.length
+ if 9 == dct
+ _ dct
+ else
+ _span.text_warning dct
+ end
+ end
+ _td.text_center do
+ _ others.length
+ end
+ _td.text_center do
+ _ agenda['stats']['specialorders']
+ end
+ _td.text_center do
+ _ agenda[OFFICERS].length
+ end
+ _td.text_center do
+ _ agenda[PMCS].length
+ end
+ _td.text_center do
+ _ agenda['stats']['avgreportlen'].round(0)
+ end
+ _td.text_center do
+ _ agenda['stats']['avgcommentlen'].round(0)
+ end
+ _td.text_center do
+ _ agenda['stats']['avgapprovals'].round(1)
+ end
+ _td.text_center do
+ _ agenda['stats']['discusstextlen']
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ _h3.skips! 'Note: Some Months Are Skipped'
+ _p "Some month's agendas aren't easily parsed, and are skipped (i.e. not counted here). Current skip list:"
+ _ul do
+ datums.select{ |k,v| v.is_a?(Hash) && v.has_key?(ERRORS) }.each do |month, agenda|
+ _li do
+ _span.text_warning month
+ end
+ end
+ end
+
+ end
+end
+
--
To stop receiving notification emails like this one, please contact
curcuru@apache.org.