From 7ca1ff360c62fdc2fbfa47d047cac7a398248816 Mon Sep 17 00:00:00 2001 From: Joris Vercammen Date: Sun, 18 Feb 2018 11:38:02 +0100 Subject: [PATCH] Add column for averages per company/country --- app/templates/companies.html.erb | 4 +++- app/templates/countries.html.erb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/templates/companies.html.erb b/app/templates/companies.html.erb index e968b8b672..eb9c21fc8a 100644 --- a/app/templates/companies.html.erb +++ b/app/templates/companies.html.erb @@ -32,6 +32,7 @@ Company Contributors Mentions + Avg. Percent <% companies.each do |name, values| %> @@ -48,7 +49,8 @@ <%= values['contributors'].length %> - <%= values['mentions'] %> (~<%= values['mentions'] / values['contributors'].length %>) + <%= values['mentions'] %> + ~<%= values['mentions'] / values['contributors'].length %> <%= ((values['mentions']/sum)*100).round(4) %>% <% if lastMentions != values['mentions'] %> <% lastOrder = i %> diff --git a/app/templates/countries.html.erb b/app/templates/countries.html.erb index 7a4cb780a5..092508a192 100644 --- a/app/templates/countries.html.erb +++ b/app/templates/countries.html.erb @@ -22,6 +22,7 @@ Country Contributors Mentions + Avg. Percent <% companies.each do |name, values| %> @@ -38,7 +39,8 @@ <%= values['contributors'].length %> - <%= values['mentions'] %> (~<%= values['mentions'] / values['contributors'].length %>) + <%= values['mentions'] %> + ~<%= values['mentions'] / values['contributors'].length %> <%= ((values['mentions']/sum)*100).round(4) %>% <% if lastMentions != values['mentions'] %> <% lastOrder = i %>