|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + {% include head.html %} |
| 4 | + |
| 5 | + <body> |
| 6 | + {% include nav.html %} |
| 7 | + |
| 8 | + <main> |
| 9 | + <article id="view-stats" class="view"> |
| 10 | + <section> |
| 11 | + <h2>Stats</h2> |
| 12 | + <p class="stats-subtitle">The Ruby UY community in numbers</p> |
| 13 | + </section> |
| 14 | + |
| 15 | + {% comment %} Base data {% endcomment %} |
| 16 | + {% assign projects = site.data.community.projects %} |
| 17 | + {% assign meetups = site.meetups | sort: "date" %} |
| 18 | + |
| 19 | + {% comment %} Talks {% endcomment %} |
| 20 | + {% assign all_talks = meetups | flat_map: "talks" %} |
| 21 | + {% assign all_talks_count = all_talks | size %} |
| 22 | + |
| 23 | + {% comment %} Stamps {% endcomment %} |
| 24 | + {% assign total_stars = projects | sum_by: "stars" %} |
| 25 | + {% assign unique_authors = projects | map: "github_user" | uniq %} |
| 26 | + |
| 27 | + {% comment %} Meetups {% endcomment %} |
| 28 | + {% assign meetups_by_year = meetups | group_by_exp: "meetup", "meetup.date | date: '%Y'" %} |
| 29 | + {% assign top_hosts_by_meetups = meetups | group_by: "host" | sort: "size" | reverse %} |
| 30 | + |
| 31 | + {% comment %} Talks rankings {% endcomment %} |
| 32 | + {% assign hosts_by_talk = "" | split: "" %} |
| 33 | + {% for meetup in meetups %} |
| 34 | + {% for talk in meetup.talks %} |
| 35 | + {% assign hosts_by_talk = hosts_by_talk | push: meetup.host %} |
| 36 | + {% endfor %} |
| 37 | + {% endfor %} |
| 38 | + {% assign top_hosts = hosts_by_talk | group_by_exp: "host_slug", "host_slug" | sort: "size" | reverse | slice: 0, 5 %} |
| 39 | + {% assign all_speakers = all_talks | flat_map: "speakers" %} |
| 40 | + {% assign grouped_speakers = all_speakers | group_by_exp: "speaker_id", "speaker_id" | sort: "size" | reverse | slice: 0, 5 %} |
| 41 | + |
| 42 | + {% comment %} Projects rankings {% endcomment %} |
| 43 | + {% assign top_projects = projects | sort: "stars" | reverse | slice: 0, 5 %} |
| 44 | + {% assign top_contributors_by_count = projects | group_by: "github_user" | sort: "size" | reverse %} |
| 45 | + {% assign all_topics = projects | flat_map: "topics" | compact %} |
| 46 | + {% assign top_topics = all_topics | group_by_exp: "item", "item" | sort: "size" | reverse | slice: 0, 8 %} |
| 47 | + |
| 48 | + <section class="stats-stamps"> |
| 49 | + <div class="stats-stamp stats-stamp--1"> |
| 50 | + <div class="stats-stamp-num">{{ meetups.size }}</div> |
| 51 | + <div class="stats-stamp-label">Meetups</div> |
| 52 | + </div> |
| 53 | + <div class="stats-stamp stats-stamp--2"> |
| 54 | + <div class="stats-stamp-num">{{ all_talks_count }}</div> |
| 55 | + <div class="stats-stamp-label">Talks</div> |
| 56 | + </div> |
| 57 | + <div class="stats-stamp stats-stamp--3"> |
| 58 | + <div class="stats-stamp-num">{{ site.data.people.size }}</div> |
| 59 | + <div class="stats-stamp-label">Members</div> |
| 60 | + </div> |
| 61 | + <div class="stats-stamp stats-stamp--4"> |
| 62 | + <div class="stats-stamp-num">{{ projects.size }}</div> |
| 63 | + <div class="stats-stamp-label">Projects</div> |
| 64 | + </div> |
| 65 | + <div class="stats-stamp stats-stamp--5"> |
| 66 | + <div class="stats-stamp-num">{{ total_stars }}</div> |
| 67 | + <div class="stats-stamp-label">Stars</div> |
| 68 | + </div> |
| 69 | + <div class="stats-stamp stats-stamp--6"> |
| 70 | + <div class="stats-stamp-num">{{ unique_authors.size }}</div> |
| 71 | + <div class="stats-stamp-label">Authors</div> |
| 72 | + </div> |
| 73 | + </section> |
| 74 | + |
| 75 | + <section> |
| 76 | + <h3>Meetups</h3> |
| 77 | + |
| 78 | + <h4 class="stats-subheading">Per year — each square = one meetup</h4> |
| 79 | + <div class="stats-visualcount"> |
| 80 | + {% for year in meetups_by_year %} |
| 81 | + {% assign year_meetup_count = year.items.size %} |
| 82 | + <div class="stats-visualcount-row"> |
| 83 | + <span class="stats-visualcount-year">{{ year.name }}</span> |
| 84 | + <div class="stats-visualcount-blocks"> |
| 85 | + {% for meetup in year.items %} |
| 86 | + <a href="{{ meetup.url }}" class="stats-block" title="{{ meetup.host }} — {{ meetup.date | date: '%b %Y' }}"></a> |
| 87 | + {% endfor %} |
| 88 | + </div> |
| 89 | + <span class="stats-visualcount-total">{{ year_meetup_count }}</span> |
| 90 | + </div> |
| 91 | + {% endfor %} |
| 92 | + </div> |
| 93 | + |
| 94 | + <h4 class="stats-subheading">Top hosts (by meetups)</h4> |
| 95 | + <ol class="stats-ranking"> |
| 96 | + {% for host_group in top_hosts_by_meetups limit: 5 %} |
| 97 | + {% assign company = site.data.companies[host_group.name] %} |
| 98 | + <li><strong>{{ company.name | default: host_group.name }}</strong> <span class="stats-value">{{ host_group.size }} meetups</span></li> |
| 99 | + {% endfor %} |
| 100 | + </ol> |
| 101 | + </section> |
| 102 | + |
| 103 | + <section> |
| 104 | + <h3>Talks</h3> |
| 105 | + |
| 106 | + <h4 class="stats-subheading">Per year — each dot = one talk</h4> |
| 107 | + <div class="stats-visualcount"> |
| 108 | + {% for year in meetups_by_year %} |
| 109 | + {% assign year_talk_count = year.items | flat_map: "talks" | size %} |
| 110 | + <div class="stats-visualcount-row"> |
| 111 | + <span class="stats-visualcount-year">{{ year.name }}</span> |
| 112 | + <div class="stats-visualcount-blocks"> |
| 113 | + {% for meetup in year.items %} |
| 114 | + {% for talk in meetup.talks %} |
| 115 | + <a href="{{ meetup.url }}#{{ talk.title | slugify }}" class="stats-dot" title="{{ talk.title }}"></a> |
| 116 | + {% endfor %} |
| 117 | + {% endfor %} |
| 118 | + </div> |
| 119 | + <span class="stats-visualcount-total">{{ year_talk_count }}</span> |
| 120 | + </div> |
| 121 | + {% endfor %} |
| 122 | + </div> |
| 123 | + |
| 124 | + <h4 class="stats-subheading">Top hosting companies (by talks featured)</h4> |
| 125 | + <ol class="stats-ranking"> |
| 126 | + {% for host in top_hosts %} |
| 127 | + {% assign company = site.data.companies[host.name] %} |
| 128 | + <li> |
| 129 | + <strong>{{ company.name | default: host.name }}</strong> |
| 130 | + <span class="stats-value">{{ host.size }} talks</span> |
| 131 | + </li> |
| 132 | + {% endfor %} |
| 133 | + </ol> |
| 134 | + |
| 135 | + <h4 class="stats-subheading">Most active speakers</h4> |
| 136 | + <ol class="stats-ranking"> |
| 137 | + {% for group in grouped_speakers %} |
| 138 | + {% assign person = site.data.people[group.name] %} |
| 139 | + <li><strong>{{ person.name | default: group.name }}</strong> <span class="stats-value">{{ group.size }} talks</span></li> |
| 140 | + {% endfor %} |
| 141 | + </ol> |
| 142 | + </section> |
| 143 | + |
| 144 | + <section> |
| 145 | + <h3>Projects</h3> |
| 146 | + <div class="stats-hero"> |
| 147 | + <div class="stats-hero-number">{{ total_stars }}</div> |
| 148 | + <div class="stats-hero-label">GitHub stars across our community's projects</div> |
| 149 | + </div> |
| 150 | + |
| 151 | + <h4 class="stats-subheading">Top 5 by stars</h4> |
| 152 | + <ol class="stats-ranking"> |
| 153 | + {% for project in top_projects %} |
| 154 | + <li> |
| 155 | + <a href="{{ project.url }}" target="_blank" rel="noopener"><strong>{{ project.name }}</strong></a> |
| 156 | + <span class="stats-author">@{{ project.github_user }}</span> |
| 157 | + <span class="stats-value">★ {{ project.stars }}</span> |
| 158 | + </li> |
| 159 | + {% endfor %} |
| 160 | + </ol> |
| 161 | + |
| 162 | + <h4 class="stats-subheading">Top contributors (by Ruby/Rails project count)</h4> |
| 163 | + <table class="stats-table"> |
| 164 | + <thead><tr><th>Author</th><th>Projects</th><th>Total stars</th></tr></thead> |
| 165 | + <tbody> |
| 166 | + {% for contributor in top_contributors_by_count limit: 5 %} |
| 167 | + <tr> |
| 168 | + <td>@{{ contributor.name }}</td> |
| 169 | + <td>{{ contributor.size }}</td> |
| 170 | + <td>{{ contributor.items | sum_by: "stars" }}</td> |
| 171 | + </tr> |
| 172 | + {% endfor %} |
| 173 | + </tbody> |
| 174 | + </table> |
| 175 | + |
| 176 | + <h4 class="stats-subheading">Most popular topics</h4> |
| 177 | + <div class="stats-topics"> |
| 178 | + {% for entry in top_topics %} |
| 179 | + <span class="stats-topic">{{ entry.name }} <em>{{ entry.size }}</em></span> |
| 180 | + {% endfor %} |
| 181 | + </div> |
| 182 | + </section> |
| 183 | + |
| 184 | + <section> |
| 185 | + <h3>Here's your receipt</h3> |
| 186 | + <div class="stats-receipt"> |
| 187 | + <div class="stats-receipt-header"> |
| 188 | + <div>RUBY UY</div> |
| 189 | + <div>COMMUNITY RECEIPT</div> |
| 190 | + <div>SINCE 2022 — {{ meetups.size }} EVENTS HOSTED</div> |
| 191 | + </div> |
| 192 | + <div class="stats-receipt-row"><span>Meetups hosted</span><span>{{ meetups.size }}</span></div> |
| 193 | + <div class="stats-receipt-row"><span>Talks delivered</span><span>{{ all_talks_count }}</span></div> |
| 194 | + <div class="stats-receipt-row"><span>Active members</span><span>{{ site.data.people.size }}</span></div> |
| 195 | + <div class="stats-receipt-row"><span>Open source projects</span><span>{{ projects.size }}</span></div> |
| 196 | + <div class="stats-receipt-row"><span>Total GitHub stars</span><span>{{ total_stars }}</span></div> |
| 197 | + <div class="stats-receipt-row"><span>Unique authors</span><span>{{ unique_authors.size }}</span></div> |
| 198 | + <div class="stats-receipt-divider">— — — — — — — — — —</div> |
| 199 | + <div class="stats-receipt-row stats-receipt-total"><span>TOTAL IMPACT</span><span>∞</span></div> |
| 200 | + <div class="stats-receipt-footer">THANK YOU FOR BEING PART OF THE COMMUNITY</div> |
| 201 | + </div> |
| 202 | + </section> |
| 203 | + </article> |
| 204 | + </main> |
| 205 | + |
| 206 | + {% include footer.html %} |
| 207 | + </body> |
| 208 | +</html> |
0 commit comments