The below applet uses a modified version of the Top-Trading Cycle algorithm to match volunteers to tasks given a list of volunteers, a list of tasks, and the volunteer preferences. The algorithm itself was developed by Shapley and Scarf in 1974, and implemented in situations with priority orders (like school choice) by Abdulkadiroglu and Sonmez in 2003.
This applet works well with data that has a structure similar to the data in this Google spreadsheet. Data like this is easily generated from a registration form that is created in Google forms, like this example. It is important to list both the volunteers and all of the available positions, and to denote all of the preferences by a common prefix. A complete How to Guide with visual examples is presented below the applet.
- First, create an online sign-up form and collect volunteer sign-ups. For an example, see this template Google form. The form asks for the person’s name and their date of birth. The date of birth is just in case we have two volunteers with the same name. We also ask them to fill in if they volunteered before, and if so, in what position. Finally, we ask them to rank all of the available roles. These are the volunteers’ “preferences”, and it is important that every volunteer rank every role. As you can see in the template, an easy way to do this is using Google form’s grid question, with the rank (preference) on the left and the role on the top. This puts the data in the correct shape for this applet.
- Link the results to a spreadsheet. This can be done by clicking the green “View responses in Sheets” icon in the results window of Google forms. The output should like similar to this.
- Once all of this information is collected, assign a priority order in a new column. A priority order is just a number indicating who gets first choice over open positions. For example, perhaps the organization wants to let experienced volunteers get higher priority. Then the organization would place a number (1 for highest priority) next to the relevant people. It is okay to only give some people priority – the applet will assume that if no priority order is given (or if there is a tie) priority will be assign randomly. So if an organization only wants to give priority to 3 people who have volunteered for 10 years, but does not want to distinguish between the three volunteers, the we can just put a “1” next to the three volunteers in a column titled “priority” and leave the column blank for everyone else. Then the algorithm will give these three people top priority (breaking ties among the three using a random number) and assign a priority to everyone else randomly (with more random numbers).
- Change the names of the preference columns so that they share a common prefix but are still numbered. It is not important what prefix is used, just that it is common to only the preference columns. One good format is “pref1”, “pref2”, “pref3”, etc.
- Add a column with all of the available jobs. If there are multiple openings for the same job, the job should be listed as many times as there are openings. For jobs where a volunteer indicated they filled the role last year, put the job name in the row of that person. This tells the algorithm to give priority (for that job) to the person who filled the role last year. For all other jobs, put the job name below the list of volunteers. Once this is all done, the final spread sheet should look something like this:
- Save the spreadsheet as a “.csv” file.
- Upload the file above. Fill in the fields to indicate which columns capture the volunteer identifier, the position names, and the priority order. If priority was left blank for some people (or ties were allowed) the applet will ask the user to confirm that they are okay with a random number breaking ties. This just means if three people are blank (or three people are given the same number) they will be ordered randomly, with an equal probability of any of the three people being first, second or third.
- The submit button will not be enabled until all fields are filled in, the volunteer identifier column uniquely identifies volunteers, and there are enough preference columns. The last condition means if there are 10 distinct jobs (for example, if there are two “Set Up” positions, this counts as one unique job), each person must have a complete ranking of these jobs. In other words, there should be 10 preference columns.
- If all of these conditions are satisfied, click “Submit” and wait for the algorithm to run its course. Once it does, it will present a list of volunteers matched to jobs. The user can then download it as a csv again and use it to assign volunteers to tasks! The final list will look like this: