Published
Edited
Feb 15, 2020
Insert cell
md`# Paird Assignment`
Insert cell
md`## Author: Ryan Liu, Yunjie Yao`
Insert cell
import {vl} from '@vega/vega-lite-api'
Insert cell
d3 = require('d3')
Insert cell
import {printTable} from '@uwdata/data-utilities'
Insert cell
stats = d3.csvParse(await FileAttachment("PairedAssignmentData.csv").text(), d3.autoType)
Insert cell
printTable(stats.slice(0,5))
Insert cell
vl.markBar()
.data(stats)
.encode(
vl.x().fieldO('Mode').title(null),
vl.y().fieldQ('TravelTimeMinutes'),
vl.column().fieldO('Route'),
vl.color().fieldO('Mode'),
)
.width(100).render()
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