Published
Edited
Mar 29, 2021
Importers
Insert cell
Insert cell
Insert cell
Insert cell
vl.markLine()
.data(chart_data)
.encode(
vl.x().fieldO("Work").axis({labelAngle:0}),
vl.y().fieldQ("Revenue").axis({format:"$"})
)
.title("Sales on @hicetnunc")
.width(300)
.render()
Insert cell
Insert cell
Insert cell
d3 = require("d3")
Insert cell
sheet = "https://docs.google.com/spreadsheets/d/e/2PACX-1vRlL9XaMcDfSxuWpDwo2_QNOGtc08swxajSpGmjIXSwbUe0bgFFc9AqRz0xsMtd-Gx0ARjCpxN2E845/pub?output=csv"
Insert cell
data = await d3.csv(sheet)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { vl } from "@vega/vega-lite-api"
Insert cell
table_styles = html`<style>
p code, li code {color: #c30771;}

code.error {
color:red;
}
table {
font-family: arial, sans-serif;
border-collapse: collapse;
display: block;
overflow: auto;
white-space: nowrap;
width:${width}px;
min-width:${width}px;
max-height:500px;
}

td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}

td:first-of-type {
font-style: italic;
font-weight: bold;
}

tr:nth-child(even) {
background-color: #d3d3d359;
}
</style>`
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