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.
The original purpose of this notebook was to see which wikis have more than 10k mentees per mentor in total, so the unstarred filtering can be disabled for them (T293182).
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)
You are using wmfdata v1.3.2, but v1.4.0 is available. To update, run `pip install --upgrade git+https://github.com/wikimedia/wmfdata-python.git@release --ignore-installed`. To see the changes, refer to https://github.com/wikimedia/wmfdata-python/blob/release/CHANGELOG.md
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'
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 | 58048 | 15611.7563 |
0 | fawiki | 35144 | 8830.1765 |
0 | arwiki | 34163 | 10399.0000 |
0 | ptwiki | 14054 | 5350.8222 |
0 | frwiki | 11797 | 3901.0761 |
0 | idwiki | 10915 | 6029.4615 |
0 | ruwiki | 10584 | 4719.6364 |
0 | trwiki | 10048 | 3693.7059 |
0 | dewiki | 9738 | 4042.2917 |
0 | viwiki | 9544 | 1717.9857 |
0 | itwiki | 7792 | 2364.6818 |
0 | nlwiki | 5849 | 2629.7000 |
0 | kowiki | 5774 | 944.6056 |
0 | elwiki | 4937 | 3637.3333 |
0 | huwiki | 4452 | 2883.0000 |
0 | eswiki | 4427 | 1844.0667 |
0 | bnwiki | 4372 | 1320.2857 |
0 | skwiki | 4150 | 2176.5000 |
0 | plwiki | 4047 | 2556.5455 |
0 | zhwiki | 3814 | 1436.4750 |
0 | rowiki | 3651 | 1978.1250 |
0 | cswiki | 3647 | 1593.2667 |
0 | svwiki | 2333 | 1455.0556 |
0 | nowiki | 2111 | 1299.1667 |
0 | hrwiki | 1965 | 1064.0000 |
0 | hewiki | 1322 | 615.8382 |
0 | azwiki | 1208 | 621.8571 |
0 | srwiki | 1077 | 831.4000 |
0 | euwiki | 996 | 953.5000 |
0 | hywiki | 996 | 578.0000 |
0 | sqwiki | 970 | 714.3333 |
0 | ukwiki | 875 | 616.0976 |
0 | frwiktionary | 789 | 622.0000 |
0 | lvwiki | 466 | 461.5000 |
0 | ckbwiki | 432 | 265.0000 |
0 | tewiki | 242 | 183.7143 |
0 | knwiki | 207 | 207.0000 |
0 | testwiki | 135 | 28.2128 |
0 | kuwiki | 75 | 69.3333 |
0 | newiki | 63 | 13.0000 |
0 | jvwiki | 24 | 24.0000 |
0 | kswiki | 16 | 15.0000 |
0 | frrwiki | 10 | 8.0000 |
0 | hiwiki | 1 | 1.0000 |
0 | tumwiki | 1 | 1.0000 |