This website is for Vega-Lite v3. Go to the main Vega-Lite homepage for the latest release.

Annual Weather Heatmap

View this example in the online editor

Vega-Lite JSON Specification

{
  "$schema": "https://vega.github.io/schema/vega-lite/v3.json",
  "data": {
      "url": "data/seattle-temps.csv"
  },
  "title": "2010 Daily Max Temperature (F) in Seattle, WA",
  "config": {
      "view": {
          "strokeWidth": 0
      },
      "scale": {
          "rangeStep": 13
      },
      "axis": {
          "domain": false
      }
  },
  "mark": "rect",
  "encoding": {
      "x": {
          "field": "date",
          "timeUnit": "date",
          "type": "ordinal",
          "title": "Day",
          "axis": {
              "labelAngle": 0,
              "format": "%e"
          }
      },
      "y": {
          "field": "date",
          "timeUnit": "month",
          "type": "ordinal",
          "title": "Month"
      },
      "color": {
          "field": "temp",
          "aggregate": "max",
          "type": "quantitative",
          "legend": {
              "title": null
          }
      }
  }
}