function tt_type(job) {
if (job === undefined) {return "ambiguous"}
for (let t of ["Temporary", "Researcher", "Not Applicable", "Part-Time Faculty",
"Full-Time Non-Tenure-Track Faculty", "Management/Leadership",
"Fellowship", "Librarian/Archivist/Curator", "Visiting Faculty", "Other",
"Full-Time Faculty with No Tenure System","K-12 Teacher", "Internship"]) {
if (job['Employment TypeList'] !== undefined) {
for (let portion of job['Employment TypeList'].split(",")) {
if (portion == t) {
return "Non Tenure-Track"
}
}
}
}
if (job.Title.startsWith("Tenure-Track Position")) return "Tenure-Track"
if (job["CategoryList"] == "History Education") {
return "Non Tenure-Track"
}
for (let t of ["Tenure-track", "Full-Time Tenure-Track/Tenured Faculty", "Tenured", "Tenured Faculty"]) {
if (job['Employment TypeList'] == t) return "Tenure-Track"
}
for (let t of ["Full-Time Non-Tenure-Track Faculty,Full-Time Tenure-Track/Tenured Faculty"]) {
if (job['Employment TypeList'] == t) return "ambiguous"
}
for (let t of ["Instructor/Lecturer"]) {
if (job['MaxRank'] == t) return "Non Tenure-Track"
}
for (let title of ["Assistant Professor", "Associate Professor", "Full Professor"]) {
if (job['MinRank'] == title) return "Tenure-Track"
if (job.Title.startsWith(title)) return "Tenure-Track"
}
if (job.Title.match(/.* Chair in .*/)) return "Tenure-Track"
return "ambiguous"
}