{
  "spec": {
    "data": {"url": "data/cars.json"},
    "mark": "bar",
    "encodings": [
      {
        "channel": "x",
        "bin": {"maxbins": "?"},
        "field": "Miles_per_Gallon",
        "type": "quantitative"
      }
    ]
  },
  "nest": [
    {
      "groupBy": ["field", "aggregate", "bin", "timeUnit", "stack"],
      "orderGroupBy": "aggregationQuality"
    },
    {"groupBy": "encoding", "orderGroupBy": "effectiveness"}
  ],
  "orderBy": "effectiveness",
  "config": {
    "autoAddCount": true
  }
}
