Mentor Match is a Python program that helps facilitate a public high school mentorship initiative. The goal of the initiative is to match Mentees (incoming freshmen) who are interested in specific clubs/activities with Mentors (upperclassmen) that are already a part of these clubs/activities. This provides every new student with a knowledgeable and relatable guide to help ease their high school transition and to help take full advantage of the extracurriculars they are excited about.
All code can be found here: 💻 GitHub
This program is specifically designed for school guidance counselors who manage the initiative. They previously completed the matching process by hand. Automating the matching process saves the counseling team roughly 15 hours of work and results in a higher average Match Rate (# of Mentee interests shared with Mentor / Overall # of Mentee interests).
How It Works
The process starts with both Mentors and Mentees filling out separate Google Forms. These forms gather basic information, including name, gender, race, contact, middle school, and interests/involvement (from a set list). This information is then consolidated into 2 spreadsheets - a spreadsheet of Mentees, with all their information organized by row, and a spreadsheet of Mentors, their information also organized by row. These 2 spreadsheets are the program's inputs.
Using the openPyXL library, the spreadsheets are processed and the participants' information is placed into Mentee/Mentor objects accordingly. At this point, the Mentees and Mentors are run through the matching algorithm based on the below criteria, in priority order:
- Capacity -- Each Mentor can be matched with a maximum of 5 Mentees
- Gender -- Each Mentee is matched with a Mentor of the same identifying gender
- Middle School -- Each Mentor is matched with at most 2 Mentees from a single middle school
- Interests/Involvement -- Each Mentee is matched with the Mentor who is involved in the highest number of the Mentee's interests
The final product is a formatted spreadsheet relating every Mentor to their Mentees. As part of Criteria #4, the spreadsheet includes the Match Rate and Match Count of each Mentee, displaying the percentage of their total interests that align with their Mentor and the raw number of interests in alignment, respectively.
The match rate of all Mentees is averaged to achieve our top line metric of success. This metric is a victim of outliers. However, it is consistently combined with human review, making it acceptable for our use case. Specifically, the counseling team always reviews the final, formatted spreadsheet, making any sensitive or last minute adjustments by hand and effectively dealing with any outliers.
Use It Yourself
In order to repurpose this program for your own use, you will need to do the following:
- Download the code from GitHub.
- Build your own Google Forms to gather Mentor/Mentee information and transfer it to an xlsx file. Examples of the xlsx used have been added to the repository. (Make sure the interests/involvement selections are the same on both the Mentee and Mentor forms)
- Update rows 12 and 13 in mentor_match.py to pull from your desired Mentor and Mentee spreadsheets.
- Update the processMentee() and processMentor() functions in util.py to ensure that the columns are adjusted for your xlsx. OR, modify your xlsx so the columns of data conform to the existing code.
That's it! As long as you gather Mentor/Mentee data via the syntax shown in the example xlsx files, the program should be able execute with only the above components updated, but feel free to enhance as required! Happy matching!