Assign applicants to projects

Try to give applicants one of their first-choice projects, by randomly assigning them a project, weighted by number of places remaining.

Each applicant was able to select more than one (assumed equal) first-choice project, and similarly more than one second-choice project.

Load data

Load the applications and then filter out the ones that we don't want to allocate projects to (e.g. withdrawn, duplicates or withdrawn).

For the purposes of this example, redact the actual data:

Now filter out:

Extract chosen projects

We have given each project a number:

The online form concatenates the choices, so split them into a list:

Given the number of projects and number of applicants, we might assume about 8 people per team:

However we have some double-groups with a questions that can be split in two, so we will aim for a group size smaller than this.

Assignments

Encapsulate the assignment alogirthm in a function.

In summary:

Manually tweak the ideal_group_sizes paramater until the final group sizes are about right:

Acknowledgements

By: James Thomas

Last updated: 20th May 2021