Skip to content

Commit

Permalink
Add column for averages per company/country
Browse files Browse the repository at this point in the history
  • Loading branch information
borisson committed Feb 18, 2018
1 parent af3d462 commit 6596486
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/templates/companies.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<th>Company</th>
<th>Contributors</th>
<th>Mentions</th>
<th>Avg.</th>
<th>Percent</th>
</tr>
<% companies.each do |name, values| %>
Expand All @@ -48,7 +49,8 @@
</table>
</td>
<td><%= values['contributors'].length %></td>
<td><%= values['mentions'] %> (~<%= values['mentions'] / values['contributors'].length %>)</td>
<td><%= values['mentions'] %></td>
<td>~<%= values['mentions'] / values['contributors'].length %></td>
<td><%= ((values['mentions']/sum)*100).round(4) %>%</td>
<% if lastMentions != values['mentions'] %>
<% lastOrder = i %>
Expand Down
4 changes: 3 additions & 1 deletion app/templates/countries.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<th>Country</th>
<th>Contributors</th>
<th>Mentions</th>
<th>Avg.</th>
<th>Percent</th>
</tr>
<% companies.each do |name, values| %>
Expand All @@ -38,7 +39,8 @@
</table>
</td>
<td><%= values['contributors'].length %></td>
<td><%= values['mentions'] %> (~<%= values['mentions'] / values['contributors'].length %>)</td>
<td><%= values['mentions'] %></td>
<td>~<%= values['mentions'] / values['contributors'].length %></td>
<td><%= ((values['mentions']/sum)*100).round(4) %>%</td>
<% if lastMentions != values['mentions'] %>
<% lastOrder = i %>
Expand Down

0 comments on commit 6596486

Please sign in to comment.