Published
Edited
Aug 8, 2022
7 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof ttOnly = Inputs.checkbox(["Only Tenure-track Jobs"], {value : ["Only Tenure-track jobs"]})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
filtered = {
const r = rows.filter(d => d.year >= 2004)
.filter(d => ("" +
searchin.indexOf("Description") > -1 ? d.Description : "" +
searchin.indexOf("Title") > -1 ? d.Title : "" +
"\n" )
.match(new RegExp(filter, 'i')))
.filter(d => exclude === '' || !("" +
searchin.indexOf("Description") > -1 ? d.Description : "" +
searchin.indexOf("Title") > -1 ? d.Title : "" +
"\n").match(new RegExp(exclude, 'i'))
)
d3.shuffle(r)
return r
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
d3.shuffle(rows)
const diversity_language = rows.slice(0, 1000).map(d => d.Description).map(d => d.match(/[^\.]*(to apply|diversity|encouraged)[^\.]*/)).filter(d => d).map(d => d[0])
d3.shuffle(diversity_language)
return md`${diversity_language.slice(0, 30).join("\n\n")}`
}
Insert cell
html`${sentences[0]}`
Insert cell
sentences = {
let s = rows.map(d => d.Description.match(/[^\.\n>]*/).map(m => [m.length, m, d.JobID]))
s = s.flat()
s.sort((a, b) => b[0] - a[0])
return s
}
Insert cell
rows[3]
Insert cell
rows
Insert cell
rows[0]
Insert cell
rows_raw
Insert cell
rows = us_only.length > 0 ? rows_raw.filter(d => d.CountryCode == "USA" || state_info.get(d.StateCode)) : rows_raw
Insert cell
us_only.length
Insert cell
rows_raw = {
const rows = data.sheet("tblJoblistings", {headers: true})
for (let job of rows) {
job['tt'] = tt_type(job)
job['year'] = job.DateTimePosted.getFullYear()
if (job.DateTimePosted.getMonth() <= 5) {
job.year -= 1
}
}
return rows
}
Insert cell
import { state_info } from "@bmschmidt/state-info"

Insert cell
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"
}
Insert cell
d3 = require("d3", "d3-random")
Insert cell
embed = require('vega-embed')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more