Skip to content

Latest commit

 

History

History
291 lines (245 loc) · 7.68 KB

stats.md

File metadata and controls

291 lines (245 loc) · 7.68 KB
layout
base

{% assign tutorials = site.pages | where:"layout", "tutorial_hands_on" | where_exp:"item","item.enable != false" %}

{% assign topics = site.data | where_exp: "item", "item.type" | where_exp:"item","item.enable != false" %} {% assign topics_science = topics | where: "type","use" | where_exp:"item","item.enable != false" | sort: "name" %} {% assign topics_technical = topics | where_exp: "item", "item.type != 'use'" | where_exp: "item", "item.type != 'map'" | where_exp:"item","item.enable != false" %}

{% assign contributors = site.data['contributors'] | where_exp: "item", "item.halloffame != 'no'" | sort: "joined" %} {% assign contributors_by_month = contributors | group_by: "joined" %} {% assign contributors_over_time = "" | split: ',' %} {% assign contributors_over_time_labels = "" | split: ',' %} {% assign contributors_count = 0 %} {% for m in contributors_by_month %} {% assign new_contributors = m.items | size %} {% assign contributors_count = contributors_count | plus: new_contributors%} {% assign contributors_over_time = contributors_over_time | push: contributors_count %} {% assign contributors_over_time_labels = contributors_over_time_labels | push: m.name %} {% endfor %}

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.js"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> <style type="text/css" media="all"> .card-title { font-size: 2rem; text-align: center; } </style>

GTN Statistics

{% snippet faqs/gtn/gtn_stats.md %}

{{ topics_science | size }} Scientific Topics
Growing Community
{{ topics_technical | size }} Technical Topics
New Contributors

Welcome to our newest members!

{% assign new_members = site.data['contributors'] | most_recent_contributors: 10 %}
<ul>
{% for m in new_members %}
    {% assign i = m[0] %}
    <li>{% include _includes/contributor-badge.html id=i %}</li>
{% endfor %}
</ul>
<p class="card-text">Thanks a lot for your contributions!</p>
Recently Updated Tutorials
{% assign latest_tutorials = site | recently_modified_tutorials %} {% for tuto in latest_tutorials %} {% assign topic_id = tuto | get_topic %} {% assign topic = site.data[topic_id] %} {% endfor %}
DateTopicTitle
{{ tuto.last_modified_at | date: "%b %-d, %Y" }} {{ topic.title }} {{ tuto.title }}

Thanks a lot for your contributions!

Analytics Data

You get to see the same data that we do! Visit plausible.galaxyproject.eu.

<iframe src="https://plausible.galaxyproject.eu/training.galaxyproject.org" width="100%" height="1600px" frameBorder="0"></iframe>
<script type="text/javascript"> Chart.plugins.unregister(ChartDataLabels); function genColors(size) { var o = []; for(i = 0; i < size; i++){ o.push(`hsl(${ i * 360 / size }, 100%, 50%)`) } return o; } // Charts displaying number of tutorials per topic // Scientific Topics var data_tutos = [{% for topic in topics_science %}{{site | topic_filter: topic.name | size }}{%unless forloop.last%},{%endunless%}{% endfor %}]; var labels_topics = [{% for topic in topics_science %}"{{ topic.title }}"{%unless forloop.last%},{%endunless%}{% endfor %}]; // Remove animations for accessibility const isReduced = window.matchMedia(`(prefers-reduced-motion: reduce)`) === true || window.matchMedia(`(prefers-reduced-motion: reduce)`).matches === true; if(isReduced){ Chart.defaults.global.animation.duration = 0; } var tutorialsBar = new Chart('tutorialsBar', { type: 'horizontalBar', data: { labels: labels_topics, datasets: [{ backgroundColor: genColors(data_tutos.length), data: data_tutos }] }, plugins: [ChartDataLabels], options: { legend: { display: false }, title: { display: true, text: 'Tutorials per Topic' }, plugins: { datalabels: { anchor: 'end', align: 'end' } } } }); // Technical Topics // Chart displaying number of tutorials per topic var data_tutos = [{% for topic in topics_technical %}{{site | topic_filter: topic.name | size }}{%unless forloop.last%},{%endunless%}{% endfor %}]; var labels_topics = [{% for topic in topics_technical %}"{{ topic.title }}"{%unless forloop.last%},{%endunless%}{% endfor %}]; var tutorialsBarTechnical = new Chart("tutorialsBarTechnical", { type: 'horizontalBar', data: { labels: labels_topics, datasets: [{ backgroundColor: genColors(data_tutos.length), data: data_tutos }] }, plugins: [ChartDataLabels], options: { scales: { xAxes: [{ ticks: { beginAtZero: true } }], }, legend: { display: false }, title: { display: true, text: 'Tutorials per Topic' }, plugins: { datalabels: { anchor: 'end', align: 'end' } } } }); // Contributors chart var data_contributors = [{%for c in contributors_over_time %}{x:"{{contributors_over_time_labels[forloop.index]}}" , y: {{c}} } {%unless forloop.last%},{%endunless%}{%endfor%}]; var labels_contributors = [{%for l in contributors_over_time_labels %}"{{l}}"{%unless forloop.last%},{%endunless%}{%endfor%}]; var contributorsBar = new Chart('contributorsGraph', { type: 'line', data: { datasets: [{ data: data_contributors, }] }, options: { scales: { yAxes: [{ ticks: { beginAtZero: true } }], xAxes: [{ type: 'time', time: { displayFormats:{month:'YYYY-MM'}, min:'2017-10', unit: 'month', distribution: 'linear' } }] }, legend: { display: false }, title: { display: true, text: 'Contributors over time' } } }); </script>