Public
Edited
Oct 3, 2022
Insert cell
Insert cell
search[1]
Insert cell
Insert cell
Insert cell
filtered = search.map((n) => {
if ((n["Endowment per Student"] !== null)
&& (n["Avg Net Price Family Income over $110,000"] !== null)
&& (n["Avg Net Price Family Income $75,001-$110,000"] !== null)
&& (n["Avg Net Price Family Income $48,001-$75,000"] !== null)
&& (n["Avg Net Price Family Income $30,001-$48,000"] !== null)
&& (n["Avg Net Price Family Income $0-$30,000"] !== null)
&& (n["Name"] !== null)) {
return {"Name": n["Name"], "EPS": n["Endowment per Student"], "Over 110k": n["Avg Net Price Family Income over $110,000"], "75k-110k": n["Avg Net Price Family Income $75,001-$110,000"], "48k-75k": n["Avg Net Price Family Income $48,001-$75,000"], "30k-48k": n["Avg Net Price Family Income $30,001-$48,000"], "0-30k": n["Avg Net Price Family Income $0-$30,000"]}
}
})
Insert cell
viewof table = Inputs.table(filtered)
Insert cell
Insert cell
temp = search.map((x) => {
if (x["SAT/ACT Required"] == true) {
return {"Name": x["Name"], "SAT": x["Avg SAT"]}
}
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width: width,
marginLeft: 400,
marks: [
Plot.barX(search, {
x: "Avg Amount of aid (any source) for Under-graduates",
y: "Name",
fill: "Type",
sort: { y: "x", reverse: true, limit: 10 }
}),
Plot.ruleX([0])
],
color: { legend: true }
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
commonDataSetFiltered = commonDataSet.filter((school) => {
if (school.Type === "Public") {
return true;
} else if (school.Type === "Private") {
return true;
} else {
return false;
}
})
Insert cell
commonDataSetFiltered1 = commonDataSet.filter((school) => school.Type !== null)
Insert cell
commonDataSetFiltered2 = commonDataSet.filter(
(school) => school.Type === "Public" || school.Type === "Private"
)
Insert cell
Insert cell
Insert cell
Insert cell
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