The Ultimate Site of Worms Armageddon

Leagues => Leagues General => Topic started by: Zemke on May 09, 2022, 10:18 AM

Title: Activity
Post by: Zemke on May 09, 2022, 10:18 AM
I assume we all feel activity declining for the last decade. I did the math.

(https://www.tus-wa.com/forums/leagues-general/activity-34430/?action=dlattach;attach=200985;image;type=png)

Again without Classic league as it distorts the view.

(https://www.tus-wa.com/forums/leagues-general/activity-34430/?action=dlattach;attach=200987;image;type=png)

Zooming in on more recent years.

(https://www.tus-wa.com/forums/leagues-general/activity-34430/?action=dlattach;attach=200989;image;type=png)

Here's NNN league activity. Some data is inaccessible unfortunately. I have attained conflicting versions of data, so there are two plots.

(https://www.tus-wa.com/forums/leagues-general/activity-34430/?action=dlattach;attach=200996;image;type=png)

These graphs as an attachment:

[attachment=1]
[attachment=2]
[attachment=3]

The script that made these graphs:

Code: [Select]
#!/usr/bin/env python3

from datetime import datetime as dt, timedelta
from functools import reduce
import re

def fmt_dt(s):
  return dt.strptime(s, '%B %d, %Y, %H:%M:%S')
 

with open('tus.tsv', 'r') as f:
  ll = [x.split('\t') for x in f.read().splitlines()]

R = {l[0]: [] for l in ll }
for l in ll:
  start = fmt_dt(l[2])
  end = fmt_dt(l[3])
  g = sum([int(re.sub('[^\d]', '', s)) for s in l[4].split(', ')])
  dur = (end-start).days+2
  R[l[0]].append((start+(timedelta(days=dur/2)), g/dur, 2))

for k,v in R.items():
  R[k].sort()

import matplotlib.pyplot as plt

mx_y = 0
for l,vv in R.items():
  xs = [v[0] for v in vv]
  ys = [v[1] for v in vv]

  plt.plot(xs, ys, 'o-', label=l)

  mx, mx_i = -1, -1
  for i,(x,y) in enumerate(zip(xs, ys)):
    if y > mx:
      mx = y
      mx_i = i
  mx_y = max(mx, mx_y)

  label = "{:.2f}".format(y)
  plt.annotate(round(mx, 1),
               (xs[mx_i],ys[mx_i]),
               textcoords="offset points",
               xytext=(0,5),
               weight='bold',
               color=plt.gca().lines[-1].get_color(),
               ha='center')

plt.yticks(range(0, int(mx_y), 5))
xticks = sorted(list(set([a[0] for b in R.values() for a in b])))
xticks = (reduce(lambda acc, v: acc + [v] if len(acc) == 0 or (v-acc[-1]).days > 300 else acc, xticks, []))
plt.xticks(xticks, [d.strftime("%m/%y") for d in xticks])
plt.grid(True, linewidth=0.5, linestyle='-')
plt.ylabel('games')
plt.xlabel('season mid (month/year)')
plt.title('Average games a day per season')

plt.annotate('https://www.tus-wa.com/leagues/seasons-info/ (May 7, 2022)',
             xy = (1.0, -0.1),
             xycoords='axes fraction',
             ha='right',
             va="center",
             fontsize=10)

plt.tight_layout()
plt.legend()
plt.show()


Data from https://www.tus-wa.com/leagues/seasons-info/ in TSV format:

[attachment=4]
Title: Re: Activity
Post by: Sbaffo on May 09, 2022, 11:10 AM
Pretty neat graphs
Title: Re: Activity
Post by: Lupastic on May 09, 2022, 11:17 AM
everyone missing the game eventually returns :-[ most of them only for a short while though
Title: Re: Activity
Post by: Korydex on May 09, 2022, 11:45 AM
So there was really no reason to kill Classic, activity improved only for a season or two xD
Title: Re: Activity
Post by: Kradie on May 09, 2022, 12:20 PM
Time to replace Roper with ZaR Roper.
Title: Re: Activity
Post by: Zemke on May 09, 2022, 04:19 PM
There's new data available for NNN. It differs from data I had attained many years ago. I therefore kept both data in the new graph which is attached here and updated in the original post.

[attachment=1]
Title: Re: Activity
Post by: Korydex on May 09, 2022, 05:28 PM
There's new data available for NNN. It differs from data I had attained many years ago. I therefore kept both data in the new graph which is attached here and updated in the original post.

[attachment=1]
I can see pandemic starting, Dario's and chuvash's comeback on this graph :D And nice average in the beginning, it's interesting what it was even before that!