A bar chart, and the whole API chart(rows, "bar", x=X("month_name", sort=MONTHS), y="average(precipitation)")
Average daily rain (mm) 0 1 2 3 4 5 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec month_name average(precipitation)
The mark changes, the encoding does not the same channels as above, with mark="line"
Average daily maximum (°C) 0 5 10 15 20 25 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec month_name average(temp_max) A colour channel, and the stacking Vega-Lite implies nothing says `stack`; a bar with a colour channel stacks anyway
0 20 40 60 80 100 120 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec month(date) days drizzle rain sun snow fog
xOffset groups instead of stacking the same spec with an xOffset channel — and it stops the stacking
0 50 100 150 200 250 Q1 Q2 Q3 Q4 quarter(date) days drizzle rain sun snow fog
timeUnit carries its own order the two charts above needed sort=MONTHS; a timeUnit knows a weekday runs Sun–Sat
0 0.5 1 1.5 2 2.5 3 3.5 Sun Mon Tue Wed Thu Fri Sat day(date) avg mm
bin: a histogram the bars fill their bucket rather than being hairlines at its start
0 50 100 150 0 10 20 30 daily max °C days
transform: filter and calculate filter "datum.weather === 'rain'", then calculate the daily range
0 2 4 6 8 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec month(date) avg range °C, rainy days layer: two marks, one pair of scales a line and its points, in one hue, because that is one series
0 1 2 3 4 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec month(date) avg wind m/s boxplot: five statistics per group whiskers reach 1.5×IQR; what lies outside is drawn, not hidden
0 10 20 30 40 Q1 Q2 Q3 Q4 quarter(date) daily max °C
errorbar: how well the mean is known extent=stderr — narrow. Compare the next one, which is the same data
0 10 20 30 40 Q1 Q2 Q3 Q4 quarter(date) daily max °C
errorbar: how spread the data is extent=stdev — the same rows, an order of magnitude wider. They are not the same question
0 10 20 30 40 Q1 Q2 Q3 Q4 quarter(date) daily max °C
errorband with borders, extent=ci a bootstrapped 95% interval, seeded so the server and the browser agree
0 10 20 30 40 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec month(date) daily max °C facet: small multiples, on one pair of scales panels scaled apart look like a comparison and are not one
2012 0 2 4 6 8 Q1 Q2 Q3 Q4 quarter(date) avg mm 2013 Q1 Q2 Q3 Q4 quarter(date) 2014 Q1 Q2 Q3 Q4 quarter(date) 2015 Q1 Q2 Q3 Q4 quarter(date)
hconcat: different charts, independent scales so each panel keeps its own axes — without them it cannot be read
0 100 200 300 400 500 600 drizzle fog rain snow sun weather days 0 10 20 30 40 0 2 4 6 8 10 wind temp_max
one axis only a spec may encode just x: the other axis is one slot, with no furniture
0 10 20 30 40 every day's maximum, °C
tooltip: hover a point a <title> inside each mark — the browser's own, and free on a static page
0 10 20 30 40 0 2 4 6 8 date: 2012-01-01
weather: drizzle
temp_max: 12.8 date: 2012-01-13
weather: sun
temp_max: 5 date: 2012-01-25
weather: rain
temp_max: 8.9 date: 2012-02-06
weather: sun
temp_max: 16.1 date: 2012-02-18
weather: rain
temp_max: 6.7 date: 2012-03-01
weather: sun
temp_max: 6.1 date: 2012-03-13
weather: snow
temp_max: 5.6 date: 2012-03-25
weather: rain
temp_max: 13.3 date: 2012-04-06
weather: rain
temp_max: 11.1 date: 2012-04-18
weather: rain
temp_max: 13.3 date: 2012-04-30
weather: rain
temp_max: 12.8 date: 2012-05-12
weather: sun
temp_max: 24.4 date: 2012-05-24
weather: rain
temp_max: 17.2 date: 2012-06-05
weather: rain
temp_max: 13.3 date: 2012-06-17
weather: sun
temp_max: 18.9 date: 2012-06-29
weather: rain
temp_max: 21.7 date: 2012-07-11
weather: fog
temp_max: 27.8 date: 2012-07-23
weather: rain
temp_max: 18.9 date: 2012-08-04
weather: sun
temp_max: 33.9 date: 2012-08-16
weather: sun
temp_max: 34.4 date: 2012-08-28
weather: sun
temp_max: 22.8 date: 2012-09-09
weather: rain
temp_max: 18.9 date: 2012-09-21
weather: drizzle
temp_max: 16.1 date: 2012-10-03
weather: sun
temp_max: 18.9 date: 2012-10-15
weather: rain
temp_max: 17.2 date: 2012-10-27
weather: rain
temp_max: 14.4 date: 2012-11-08
weather: rain
temp_max: 10 date: 2012-11-20
weather: rain
temp_max: 11.1 date: 2012-12-02
weather: rain
temp_max: 8.3 date: 2012-12-14
weather: rain
temp_max: 6.1 date: 2012-12-26
weather: rain
temp_max: 6.7 date: 2013-01-07
weather: rain
temp_max: 10 date: 2013-01-19
weather: drizzle
temp_max: 1.1 date: 2013-01-31
weather: rain
temp_max: 9.4 date: 2013-02-12
weather: rain
temp_max: 11.1 date: 2013-02-24
weather: rain
temp_max: 8.9 date: 2013-03-08
weather: drizzle
temp_max: 11.7 date: 2013-03-20
weather: rain
temp_max: 11.1 date: 2013-04-01
weather: sun
temp_max: 17.2 date: 2013-04-13
weather: rain
temp_max: 10.6 date: 2013-04-25
weather: sun
temp_max: 21.7 date: 2013-05-07
weather: sun
temp_max: 20.6 date: 2013-05-19
weather: sun
temp_max: 18.3 date: 2013-05-31
weather: sun
temp_max: 19.4 date: 2013-06-12
weather: rain
temp_max: 20.6 date: 2013-06-24
weather: rain
temp_max: 21.1 date: 2013-07-06
weather: sun
temp_max: 26.1 date: 2013-07-18
weather: sun
temp_max: 26.1 date: 2013-07-30
weather: sun
temp_max: 25 date: 2013-08-11
weather: sun
temp_max: 25 date: 2013-08-23
weather: sun
temp_max: 25 date: 2013-09-04
weather: rain
temp_max: 22.8 date: 2013-09-16
weather: rain
temp_max: 21.7 date: 2013-09-28
weather: rain
temp_max: 16.7 date: 2013-10-10
weather: rain
temp_max: 14.4 date: 2013-10-22
weather: sun
temp_max: 14.4 date: 2013-11-03
weather: rain
temp_max: 12.2 date: 2013-11-15
weather: rain
temp_max: 10.6 date: 2013-11-27
weather: sun
temp_max: 14.4 date: 2013-12-09
weather: sun
temp_max: 1.1 date: 2013-12-21
weather: rain
temp_max: 8.9 date: 2014-01-02
weather: rain
temp_max: 10.6 date: 2014-01-14
weather: sun
temp_max: 11.1 date: 2014-01-26
weather: sun
temp_max: 8.3 date: 2014-02-07
weather: sun
temp_max: 3.3 date: 2014-02-19
weather: rain
temp_max: 8.3 date: 2014-03-03
weather: rain
temp_max: 14.4 date: 2014-03-15
weather: rain
temp_max: 16.7 date: 2014-03-27
weather: rain
temp_max: 12.2 date: 2014-04-08
weather: rain
temp_max: 15.6 date: 2014-04-20
weather: sun
temp_max: 15.6 date: 2014-05-02
weather: sun
temp_max: 18.3 date: 2014-05-14
weather: sun
temp_max: 27.8 date: 2014-05-26
weather: sun
temp_max: 18.3 date: 2014-06-07
weather: sun
temp_max: 24.4 date: 2014-06-19
weather: rain
temp_max: 25.6 date: 2014-07-01
weather: sun
temp_max: 34.4 date: 2014-07-13
weather: sun
temp_max: 29.4 date: 2014-07-25
weather: sun
temp_max: 22.8 date: 2014-08-06
weather: fog
temp_max: 26.1 date: 2014-08-18
weather: sun
temp_max: 29.4 date: 2014-08-30
weather: rain
temp_max: 17.8 date: 2014-09-11
weather: sun
temp_max: 24.4 date: 2014-09-23
weather: rain
temp_max: 18.9 date: 2014-10-05
weather: fog
temp_max: 23.9 date: 2014-10-17
weather: rain
temp_max: 16.7 date: 2014-10-29
weather: rain
temp_max: 16.7 date: 2014-11-10
weather: sun
temp_max: 11.1 date: 2014-11-22
weather: rain
temp_max: 9.4 date: 2014-12-04
weather: rain
temp_max: 8.3 date: 2014-12-16
weather: sun
temp_max: 10 date: 2014-12-28
weather: rain
temp_max: 6.7 date: 2015-01-09
weather: rain
temp_max: 10 date: 2015-01-21
weather: fog
temp_max: 7.2 date: 2015-02-02
weather: rain
temp_max: 11.1 date: 2015-02-14
weather: rain
temp_max: 14.4 date: 2015-02-26
weather: rain
temp_max: 11.7 date: 2015-03-10
weather: rain
temp_max: 13.3 date: 2015-03-22
weather: rain
temp_max: 11.7 date: 2015-04-03
weather: rain
temp_max: 11.1 date: 2015-04-15
weather: sun
temp_max: 13.9 date: 2015-04-27
weather: rain
temp_max: 25 date: 2015-05-09
weather: sun
temp_max: 26.7 date: 2015-05-21
weather: sun
temp_max: 25.6 date: 2015-06-02
weather: rain
temp_max: 17.8 date: 2015-06-14
weather: sun
temp_max: 27.8 date: 2015-06-26
weather: sun
temp_max: 31.7 date: 2015-07-08
weather: drizzle
temp_max: 30 date: 2015-07-20
weather: sun
temp_max: 26.7 date: 2015-08-01
weather: sun
temp_max: 33.3 date: 2015-08-13
weather: sun
temp_max: 28.3 date: 2015-08-25
weather: sun
temp_max: 25.6 date: 2015-09-06
weather: rain
temp_max: 16.1 date: 2015-09-18
weather: sun
temp_max: 19.4 date: 2015-09-30
weather: fog
temp_max: 18.3 date: 2015-10-12
weather: rain
temp_max: 18.3 date: 2015-10-24
weather: fog
temp_max: 15 date: 2015-11-05
weather: rain
temp_max: 11.7 date: 2015-11-17
weather: rain
temp_max: 13.3 date: 2015-11-29
weather: fog
temp_max: 1.7 date: 2015-12-11
weather: rain
temp_max: 9.4 date: 2015-12-23
weather: rain
temp_max: 5 wind precipitation drizzle sun rain snow fog
16 charts, every one of them markup. Nothing on this page fetches JavaScript — there is no <script src> anywhere in it, and the only script it carries at all is the chrome's inline theme toggle, which has to run before first paint. The data is the 1,461 daily observations of Seattle weather that ship in the repository, and the same figures build standalone with python tools/chart_gallery.py.