Public
Edited
Apr 28, 2023
Insert cell
Insert cell
Insert cell
Insert cell
seattleWeatherTyped = FileAttachment("seattle-weather.csv").csv({typed: true})
Insert cell
Insert cell
Insert cell
vl.markBar()
.data(seattleWeatherTyped)
.encode(
vl.x().fieldQ("temp_max").bin(true),
vl.y().count()
)
.title("Histogram of Daily Max Temperatures in Seattle (2012-2015)")
.render()
Insert cell
Insert cell
vl.markBar()
.data(seattleWeatherTyped)
.encode(
vl.x().fieldQ("temp_max").bin(true),
vl.y().count(),
vl.color().fieldN('weather')
)
.title("Histogram of Daily Max Temperatures in Seattle (2012-2015)")
.render()
Insert cell
Insert cell
vl.markBar()
.data(seattleWeatherTyped)
.encode(
vl.x().fieldQ("temp_max").bin(true),
vl.y().count(),
vl.color().fieldN('weather').scale({range: ["#AEC7E8", "#C7C7C7", "#1F77B4", "#9467bd", "#E7BA52"]})
)
.title("Histogram of Daily Max Temperatures in Seattle (2012-2015)")
.render()
Insert cell
Insert cell
vl.markBar()
.data(seattleWeatherTyped)
.encode(
vl.x().fieldQ("temp_max").bin(true),
vl.y().count(),
vl.color().fieldN('weather').scale({range: ["#AEC7E8", "#C7C7C7", "#1F77B4", "#9467bd", "#E7BA52"]}),
vl.column().fieldN('weather'),
)
.title("Histogram of Daily Max Temperatures in Seattle (2012-2015)")
.width(150)
.height(150)
.render()
Insert cell
Insert cell
Insert cell
vl.markPoint()
.data(seattleWeatherTyped)
.encode(vl.x().fieldT('date').title('date'),
vl.y().fieldQ('temp_max').title('Max Temp'),
).title('Seattle Max Temperatures 2012-2015')
.render()
Insert cell
Insert cell
vl.markPoint({'filled': true})
.data(seattleWeatherTyped)
.encode(vl.x().fieldT('date').title('date'),
vl.y().fieldQ('temp_max').title('Max Temp'),
vl.color().fieldN('weather').scale({range: ["#AEC7E8", "#C7C7C7", "#1F77B4", "#9467bd", "#E7BA52"]}),
).render()
Insert cell
Insert cell
vl.markPoint({'filled': true})
.data(seattleWeatherTyped)
.encode(vl.x().fieldT('date').title('date'),
vl.y().fieldQ('temp_max').title('Max Temp'),
vl.color().fieldN('weather').scale({range: ["#AEC7E8", "#C7C7C7", "#1F77B4", "#9467bd", "#E7BA52"]}),
vl.size().fieldQ('precipitation').scale({range: [4, 500]})
).render()
Insert cell
Insert cell
vl.markPoint({'filled': true})
.data(seattleWeatherTyped)
.encode(vl.x().fieldT('date').timeUnit('monthdate').title('date (month-date)'),
vl.y().fieldQ('temp_max').title('Max Temp'),
vl.color().fieldN('weather').scale({range: ["#AEC7E8", "#C7C7C7", "#1F77B4", "#9467bd", "#E7BA52"]}),
vl.size().fieldQ('precipitation').scale({range: [4, 500]})
).render()
Insert cell
Insert cell
vl.markPoint({'filled': true})
.data(seattleWeatherTyped)
.encode(vl.x().fieldT('date').timeUnit('monthdate').title('date (month-date)'),
vl.y().fieldQ('temp_max').title('Max Temp'),
vl.color().fieldN('weather').scale({range: ["#AEC7E8", "#C7C7C7", "#1F77B4", "#9467bd", "#E7BA52"]}),
vl.size().fieldQ('precipitation').scale({range: [4, 500]}),
vl.column().fieldN('weather')
)
.width(150)
.height(150)
.render()
Insert cell
Insert cell
Insert cell
vl.markPoint()
.data(seattleWeatherTyped)
.encode(vl.x().fieldT('date').title('date'),
vl.y().fieldQ('precipitation').title('precipitation'),
vl.color().fieldN('weather').scale({range: ["#AEC7E8", "#C7C7C7", "#1F77B4", "#9467bd", "#E7BA52"]})
).title('Seattle Precipitation 2012-2015')
.render()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {vl} from '@vega/vega-lite-api-v5'
Insert cell
import {printTable} from '@jonfroehlich/data-utilities'
Insert cell
import {printTableTypes} from '@jonfroehlich/data-utilities'
Insert cell
import {toc} from "@jonfroehlich/collapsible-toc"
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