Class Preparation
Team Assignment
To generate the team assignment file, we can use the script in the cee202_team_assignment.ipynb notebook.
The script requires us to obtain a list of students, which we can download from the Canvas gradebook and save it as roster.csv.
Users can adjust roster = pd.read_csv('roster.csv') and size=4 to according to the location roster.csv is stored and desired
average team size.
After removing un-necessary information and entries with
we generate a mapping from row indices of roster to team assignment with
1# Mapping from row index to team assignment
2team = {}
3random.seed(100)
4available_ids = [i for i in range(roster.shape[0])]
5
6for i in range(roster.shape[0]//size):
7
8 # Sample size number of row indices from pool
9 sampled_ids = random.sample(available_ids,size)
10
11 for j in range(size):
12 # Assign the same group number of each sampled row index
13 team[sampled_ids[j]] = i+1
14
15 # Remove assigned row indices from pool
16 available_ids.remove(sampled_ids[j])
17
18# Place unassigned rows to difference teams
19for i,id in enumerate(available_ids):
20 team[id] = i+1
The final output is exported as CEE202_FindYourTeam.csv, which we can upload to Canvas during the first week.