Public
Edited
Nov 17, 2023
Insert cell
Insert cell
import {vl} from '@vega/vega-lite-api-v5'
Insert cell
grades = FileAttachment("a3-grades-updated.csv").csv({typed: true})
Insert cell
vl.markErrorbar()
.data(grades)
.encode(
vl.y().field("TA"),
vl.x().fieldQ("Grades")
)
.title("Grade distributiion of A3 - CSE 442 Fall 2023")
.width(600)
.height(300)
.render()
Insert cell
g = FileAttachment("453.csv").csv({typed: true})
Insert cell
{
const a = vl.markLine({point: true})
.data(g)
.encode(
vl.y().fieldQ("Utilization").title("Frontend Utilization").axis({"titleColor": "steelblue"}),
vl.x().fieldQ("Load Rate").title("Load (req/sec)")
)

const b = vl.markLine({color: "green", point: true})
.data(g)
.transform(
vl.filter('datum["Load Rate"] <= 8000')
)
.encode(
vl.y().fieldQ("Client Response Time (ms)").axis({"titleColor": "green"}),
vl.x().fieldQ("Load Rate").scale({"domain": [0, 9000]})
)

const rule = vl.markRule({strokeDash: [4, 2]})
.data(g)
.encode(
vl.y().datum(1).scale({domain: [0.0, 1.4]}).axis({labels:false, ticks:false, grid:false})
)

return vl.layer(a, b, rule)
.resolve({"scale": {"y": "independent"}})
.title("Frontend Utilization and Client Response Time for different Load")
.width(400)
.height(300)
.render()
}
Insert cell
d = FileAttachment("453-a2.csv").csv({typed: true})
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more