指导

fname = "data/2020/numpy_survey_results.tsv"
column_names = [
    'participated', 'role', 'mentor_paid', 'mentor_motivation',
    'mentor_motivation_other', 'mentor_connect', 'mentor_connect_other',
    'mentor_activities', 'mentor_activities_other', 'mentee_charged',
    'mentee_connect', 'mentee_connect_other', 'mentee_activities',
    'mentee_activities_other', 'satisfaction', 'interested'
]
mentorship_dtype = np.dtype({
    "names": column_names,
    "formats": ['<U1024'] * len(column_names),
})

data = np.loadtxt(
    fname, delimiter='\t', skiprows=3, dtype=mentorship_dtype,
    usecols=range(56, 74), comments=None
)

我们向调查参与者询问了他们参与与开源科学软件相关的**指导项目**的经验。在 1236 名受访者中,有 122 (10%) 人表示参与了某种形式的科学软件指导项目:67 (55%) 人担任导师,18 (15%) 人担任学员,37 (30%) 人身兼二职1

participant_mask = data['participated'] == 'Yes'
glue(
    'num_mentorship_participants',
    gluval(participant_mask.sum(), data.shape[0]),
    display=False
)
mentor_mask, mentee_mask, both_mask = (
    data['role'] == key for key in ('Mentor', 'Mentee', 'Both')
)
num_mentors = mentor_mask.sum()
num_mentees = mentee_mask.sum()
num_both = both_mask.sum()
glue(
    'num_mentors',
    gluval(num_mentors, participant_mask.sum()),
    display=False
)
glue('num_mentees', gluval(num_mentees, participant_mask.sum()), display=False)
glue('num_both', gluval(num_both, participant_mask.sum()), display=False)

导师动机

我们请导师们分享了他们担任开源软件(OSS)导师的动机。

all_mentors_mask = mentor_mask | both_mask

motivations = data['mentor_motivation'][all_mentors_mask]
motivations = motivations[motivations != '']
num_resp = motivations.shape[0]
motivations = flatten(motivations)
labels, cnts = np.unique(motivations, return_counts=True)
I = np.argsort(cnts)
labels, cnts = labels[I], cnts[I]
cnts = 100 * cnts / num_resp

fig, ax = plt.subplots(figsize=(12, 8))
ax.barh(np.arange(len(labels)), cnts)
ax.set_yticks(np.arange(len(labels)))
ax.set_yticklabels(labels)
ax.set_xlabel('Percentage of Mentors')
fig.tight_layout()
../../_images/mentorship_8_0.png

导师联系

我们向导师和学员询问了他们是如何与对应方匹配的。

fig, ax = plt.subplots(figsize=(12, 8))
for start_ind, (key, label) in enumerate(zip(
    ('mentor_connect', 'mentee_connect'),
    ('Mentors', 'Mentees')
)):
    cnxn_data = data[key][data[key] != '']
    num_resp = cnxn_data.shape[0]
    labels, cnts = np.unique(flatten(cnxn_data), return_counts=True)
    # Plot
    ax.barh(
        np.arange(start_ind, 2 * len(labels), 2),
        100 * cnts / num_resp,
        align='edge',
        label=label,
    )
ax.set_yticks(np.arange(start_ind, 2 * len(labels), 2))
ax.set_yticklabels(labels)
ax.set_xlabel('Percentage of Participants')
ax.legend()
fig.tight_layout()
../../_images/mentorship_10_0.png

指导活动

我们询问了参与者作为指导项目的一部分,他们参与了哪些类型的活动。

# NOTE: not every activity was reported by both mentors/mentees
labels = np.unique(flatten(data['mentor_activities']))[3:]
fig, ax = plt.subplots(figsize=(12, 8))
for start_ind, (key, label) in enumerate(zip(
    ('mentor_activities', 'mentee_activities'),
    ('Mentors', 'Mentees')
)):
    activities_data = data[key][data[key] != '']
    num_resp = activities_data.shape[0]
    activities_data = np.array(flatten(activities_data))
    cnts = np.array([np.sum(activities_data == act) for act in labels])
    # Plot
    ax.barh(
        np.arange(start_ind, 2 * len(labels), 2),
        100 * cnts / num_resp,
        align='edge',
        label=label,
    )
# Manual modification to one category name
labels[labels == 'Attend a lecture'] = 'Attend an Event'
ax.set_yticks(np.arange(start_ind, 2 * len(labels), 2))
ax.set_yticklabels(labels)
ax.set_xlabel('Percentage of Participants')
ax.legend()
fig.tight_layout()
../../_images/mentorship_12_0.png

项目满意度

我们询问了学员们对指导项目(或多个项目)的体验满意度。

satisfaction = data['satisfaction'][data['satisfaction'] != '']
labels, cnts = np.unique(satisfaction, return_counts=True)

fig, ax = plt.subplots(figsize=(8, 8))
ax.pie(cnts, labels=labels, autopct='%1.1f%%')
fig.tight_layout()
../../_images/mentorship_14_0.png

对 NumPy 指导项目的兴趣

最后,我们询问了调查参与者是否对正式的 NumPy 指导项目感兴趣。在回答此问题的 978 名参与者中,有 592 (61%) 人表示感兴趣,其中包括曾参与其他开源软件(OSS)指导项目的 73 (70%) 名导师和 44 (80%) 名学员。

all_mentees_mask = mentee_mask | both_mask
num_resp = np.sum(data['interested'] != '')
num_yes = np.sum(data['interested'] == 'Yes')
num_former_mentors_yes = np.sum(data['interested'][all_mentors_mask] == 'Yes')
num_former_mentees_yes = np.sum(data['interested'][all_mentees_mask] == 'Yes')

glue('num_responded_mentorship_interest', num_resp, display=False)
glue('interested_in_mentorship', gluval(num_yes, num_resp), display=False)
glue(
    'former_mentors',
    gluval(num_former_mentors_yes, all_mentors_mask.sum()),
    display=False
)
glue(
    'former_mentees',
    gluval(num_former_mentees_yes, all_mentees_mask.sum()),
    display=False
)

1

对于参与过多个不同指导项目的人员,此处未作区分。