Bar Chart with bars center-aligned with time unit ticks

View this example in the online editor

Vega-Lite JSON Specification

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {"url": "data/seattle-weather.csv"},
  "mark": "bar",
  "encoding": {
    "x": {"timeUnit": "month", "field": "date", "type": "temporal", "bandPosition": 0},
    "y": {"aggregate": "mean", "field": "precipitation"}
  }
}