108 lines
3.2 KiB
HTML
108 lines
3.2 KiB
HTML
{# bs5ok #}
|
|
{% load origin %}
|
|
{% origin %}
|
|
<div id="chart"></div>
|
|
<script>
|
|
var chartConf = {
|
|
chart: {
|
|
type: 'column'
|
|
},
|
|
plotOptions: {
|
|
column: {
|
|
animation: false
|
|
}
|
|
},
|
|
title: {
|
|
text: '{{ stats_title|escapejs }}'
|
|
},
|
|
xAxis: {
|
|
type: "category",
|
|
title: {
|
|
text: 'Affiliation'
|
|
}
|
|
},
|
|
yAxis: {
|
|
title: {
|
|
text: 'Number of authors'
|
|
}
|
|
},
|
|
tooltip: {
|
|
formatter: function () {
|
|
var s = '<b>' + this.points[0].key + '</b>';
|
|
|
|
$.each(this.points, function () {
|
|
s += '<br />' + chartConf.yAxis.title.text + ': ' + this.y;
|
|
});
|
|
|
|
return s;
|
|
},
|
|
shared: true
|
|
},
|
|
series: {{ chart_data }}
|
|
};
|
|
</script>
|
|
<h2>Data</h2>
|
|
<table class="table table-sm table-striped tablesorter stats-data">
|
|
<thead>
|
|
<tr>
|
|
<th data-sort="affiliation">Affiliation</th>
|
|
<th data-sort="num">Percentage of authors</th>
|
|
<th data-sort="num">Authors</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for affiliation, percentage, count, names in table_data %}
|
|
<tr>
|
|
<td>{{ affiliation|default:"(unknown)" }}</td>
|
|
<td>{{ percentage|floatformat:2 }}%</td>
|
|
<td>{% include "stats/includes/number_with_details_cell.html" %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
The statistics are based entirely on the author affiliation
|
|
provided with each draft. Since this may vary across documents, an
|
|
author may be counted with more than one affiliation, making the
|
|
total sum more than 100%.
|
|
</p>
|
|
<h2>Affiliation Aliases</h2>
|
|
<p>
|
|
In generating the above statistics, some heuristics have been
|
|
applied to determine the affiliations of each author.
|
|
</p>
|
|
{% if request.GET.showaliases %}
|
|
<p>
|
|
<a href="{{ hide_aliases_url }}" class="btn btn-primary">Hide generated aliases</a>
|
|
</p>
|
|
{% if request.user.is_staff %}
|
|
<p>
|
|
Note: since you're an admin, you can
|
|
<a href="{% url "admin:stats_affiliationalias_add" %}">add an extra known alias</a>
|
|
or see the
|
|
<a href="{% url "admin:stats_affiliationalias_changelist" %}">existing known aliases</a>
|
|
and
|
|
<a href="{% url "admin:stats_affiliationignoredending_changelist" %}">generally ignored endings</a>.
|
|
</p>
|
|
{% endif %}
|
|
{% if alias_data %}
|
|
<table class="table table-sm table-striped tablesorter">
|
|
<thead>
|
|
<tr>
|
|
<th data-sort="affiliation">Affiliation</th>
|
|
<th data-sort="alias">Alias</th>
|
|
</tr>
|
|
</thead>
|
|
{% for name, alias in alias_data %}
|
|
<tr>
|
|
<td>{{ name|default:"(unknown)" }}</td>
|
|
<td>{{ alias }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
{% else %}
|
|
<p>
|
|
<a href="{{ show_aliases_url }}" class="btn btn-primary">Show generated aliases</a>
|
|
</p>
|
|
{% endif %} |