This notebook calculates the average and maximum number of mentees per mentor at all Growth wikis. The resulting number includes all mentees, including experienced users trying out the Growth features or inactive users.
This now only considers active users (mitigation proposed in T318457).
from wmfdata import mariadb, utils
import pandas as pd
pd.set_option('display.max_colwidth', None)
pd.set_option('display.width', None)
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)
wikis = utils.get_dblist('growthexperiments')
dfs = []
for wiki in wikis:
dfs.append(mariadb.run('''
WITH mentees_by_mentor AS (
SELECT gemm_mentor_id AS mentor_id, COUNT(*) AS mentees
FROM growthexperiments_mentor_mentee
WHERE
gemm_mentor_role='primary'
AND gemm_mentee_is_active = 1
GROUP BY gemm_mentor_id
)
SELECT
DATABASE() AS dbname,
MAX(mentees) AS max_mentees,
AVG(mentees) AS avg_mentees
FROM mentees_by_mentor
''', wiki, use_x1=True))
df = pd.concat(dfs)
df.loc[df.max_mentees.notna()].sort_values(by='max_mentees', ascending=False)
dbname | max_mentees | avg_mentees | |
---|---|---|---|
0 | enwiki | 58868 | 15630.4463 |
0 | fawiki | 35399 | 8457.5000 |
0 | arwiki | 34543 | 10496.0556 |
0 | idwiki | 11055 | 6127.6923 |
0 | ruwiki | 10739 | 4780.5091 |
0 | trwiki | 10122 | 3743.4706 |
0 | dewiki | 9968 | 3975.7600 |
0 | viwiki | 9575 | 1703.6620 |
0 | ptwiki | 9158 | 3369.0889 |
0 | itwiki | 8031 | 2423.6364 |
0 | frwiki | 7368 | 2430.6154 |
0 | nlwiki | 5968 | 2688.5000 |
0 | kowiki | 5792 | 950.7324 |
0 | elwiki | 5075 | 3702.3333 |
0 | eswiki | 4909 | 2148.0625 |
0 | huwiki | 4533 | 2914.4444 |
0 | skwiki | 4205 | 2235.5000 |
0 | plwiki | 4085 | 2589.3636 |
0 | zhwiki | 4049 | 1479.6750 |
0 | rowiki | 3742 | 2016.6250 |
0 | bnwiki | 3314 | 1027.0741 |
0 | cswiki | 2558 | 1198.2667 |
0 | svwiki | 2370 | 1473.6111 |
0 | nowiki | 2171 | 1334.5000 |
0 | hrwiki | 2032 | 1086.5000 |
0 | hewiki | 1395 | 633.0746 |
0 | azwiki | 1276 | 638.4286 |
0 | srwiki | 1102 | 839.4000 |
0 | sqwiki | 1009 | 738.3333 |
0 | euwiki | 1007 | 964.6667 |
0 | hywiki | 1006 | 583.2727 |
0 | ukwiki | 891 | 624.1951 |
0 | frwiktionary | 850 | 629.1000 |
0 | lvwiki | 483 | 478.5000 |
0 | ckbwiki | 448 | 278.0000 |
0 | tewiki | 245 | 187.6429 |
0 | knwiki | 207 | 207.0000 |
0 | testwiki | 136 | 28.6170 |
0 | kuwiki | 76 | 70.6667 |
0 | newiki | 66 | 12.2222 |
0 | jvwiki | 32 | 32.0000 |
0 | kswiki | 16 | 15.5000 |
0 | frrwiki | 10 | 8.0000 |
0 | hiwiki | 1 | 1.0000 |
0 | tumwiki | 1 | 1.0000 |