Public
Edited
May 5
Insert cell
Insert cell
airlineData = FileAttachment("airline_data_5000.csv").csv()

Insert cell
import {Plot} from "@observablehq/plot"

Insert cell
FileAttachment("airline_data_5000.csv")

Insert cell
airlineData.slice(0, 5)

Insert cell
cleanData = airlineData.filter(d => d.ArrDelay !== "" && !isNaN(+d.ArrDelay))

Insert cell
Plot.plot({
marks: [
Plot.barY(
Plot.groupY({y: "mean"}, cleanData, {
x: "Airline",
y: d => +d.ArrDelay,
fill: "Airline"
})
)
],
x: {label: "Airline"},
y: {label: "Average Arrival Delay (min)"},
height: 400
})


Insert cell
Plot.plot({
marks: [
Plot.dot(cleanData, {
x: d => +d.DepDelay,
y: d => +d.ArrDelay,
title: d => `Flight ${d.FlightNum}`,
opacity: 0.5
})
],
x: {label: "Departure Delay (min)"},
y: {label: "Arrival Delay (min)"},
height: 400
})

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