"*Postdoctoral fellows receive preference over PhD students for Hostel 1 and Hostel 2 accommodation.*"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"housing_mapping = {\n",
" 0: \"On campus shared\",\n",
" 1: \"Hostel 3\",\n",
" 2: \"Hostel 5\",\n",
"}\n",
"availability = {}\n",
"availability[\"student\"] = {\n",
" 0: 2 + 6 - 1, # shared on campus\n",
" 1: 19, # hostel 3\n",
" 2: 3, # hostel 5\n",
"} # END"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Housing for students"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A few notes before we begin.\n",
"\n",
" - In the first CSV input below, we have preferences from last year students and 2 postdocs. The postdocs were automatically allotted their first preferences as there was vacancy and they are categorically preferred for allocation over students. Therefore we will drop the entries corresponding to the 2 postdocs.\n",
" - In the second CSV input below, we have preferences from first year students. However the female students have been pre-allotted on-campus housing given their preference for it, and we will only perform allocation for the remaining students here."
"WE realize immediately that since hostels 2 and 4 have no vacancies,\n",
" - Jitendra, Soummyadip and Basudeb will all get hostel 3 (which is their next choice after hostels 2 and 4). \n",
" - Remaining student Anup can also be allotted hostel 3 because they have not given any preference after hostel 2, so we just allot whatever hostel has more rooms free."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"raw_responses = raw_responses2"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Timestamp</th>\n",
" <th>Email Address</th>\n",
" <th>Name</th>\n",
" <th>Program enrolled</th>\n",
" <th>Year of Study</th>\n",
" <th>Are you a female student?</th>\n",
" <th>Please indicate your order of preference for campus housing [On-campus accommodation]</th>\n",
" <th>Please indicate your order of preference for campus housing [Hostel 3]</th>\n",
" <th>Please indicate your order of preference for campus housing [Hostel 5]</th>\n",
"As per a randomized lottery, we will allocate pool 1 in the following order:['sangeetha s', 'anjali bhatter', 'sri krithika', 'elizabeth sara roy', 'kanak sorari', 'saiba ayoub']\n",
"...assigning housing 0 to sangeetha s as it has 7 vacancies still.\n",
"...assigning housing 0 to anjali bhatter as it has 6 vacancies still.\n",
"...assigning housing 1 to sri krithika as it has 19 vacancies still.\n",
"...assigning housing 0 to elizabeth sara roy as it has 5 vacancies still.\n",
"...assigning housing 0 to kanak sorari as it has 4 vacancies still.\n",
"...assigning housing 0 to saiba ayoub as it has 3 vacancies still.\n",
"\n",
"As per a randomized lottery, we will allocate pool 2 in the following order:['prajwal prakashrao jadhav', 'saikat bera', 'vamshi krishna talala', 'arup datta', 'abhinav dhawan', 'anesh', 'saikat ghosh']\n",
"...assigning housing 1 to prajwal prakashrao jadhav as it has 18 vacancies still.\n",
"...assigning housing 0 to saikat bera as it has 2 vacancies still.\n",
"...assigning housing 1 to vamshi krishna talala as it has 17 vacancies still.\n",
"...assigning housing 0 to arup datta as it has 1 vacancies still.\n",
"For abhinav dhawan, acco 0 is full. Moving on...\n",
"...assigning housing 1 to abhinav dhawan as it has 16 vacancies still.\n",
"For anesh, acco 0 is full. Moving on...\n",
"...assigning housing 2 to anesh as it has 3 vacancies still.\n",
"For saikat ghosh, acco 0 is full. Moving on...\n",
"...assigning housing 1 to saikat ghosh as it has 15 vacancies still.\n",
"\n",
"As per a randomized lottery, we will allocate pool 3 in the following order:[]\n",
Timestamp,Email Address,Name,Program enrolled,Year of Study,Are you a female student?,Please indicate your order of preference for campus housing [On-campus accommodation],Please indicate your order of preference for campus housing [Hostel 3],Please indicate your order of preference for campus housing [Hostel 5]