Skip to content

Instantly share code, notes, and snippets.

@phette23
Created March 12, 2025 21:40
Show Gist options
  • Save phette23/3cdb34471bb655be94ecbd3275fca1fa to your computer and use it in GitHub Desktop.
Save phette23/3cdb34471bb655be94ecbd3275fca1fa to your computer and use it in GitHub Desktop.
Find senior projects/thesis sections & their instructors' emails
courses = require('./course_section_data_AP_Spring_2025.json')
// the course codes are not consistent so we can't use those
// some say senior project, senior thesis, senior game project, thesis project, and "fashion studio 5"
srprojects = courses.filter(c => c.status != "Preliminary")
.filter(c => c.section_title.toLowerCase().match(/senior|thesis/))
.filter(c => {
let level = parseInt(c.section_code.match(/-(\d{4})-/)[1])
return level < 5000 && level >= 4000
})
srprojects = srprojects.concat(courses.filter(c => c.section_title.toLowerCase().match('fashion studio 5')))
// section codes
srprojects.map(c => c.section_code).sort()
// sections with instructors
srprojects.forEach(c => {
console.log(c.section_code, c.section_title, c.instructors.map(i => {
return `${i.first_name} ${i.last_name} (${i.username})`
}).join(', '))
})
// instructor emails
emails = new Set()
srprojects.forEach(c => {
c.instructors.forEach(i => emails.add(i.username))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment