{
  "spec": {
    "data": {"url": "data/cars.json"},
    "mark": "?",
    "encodings": [
      {
        "channel": "?",
        "field": "Origin",
        "type": "nominal"
      }
    ]
  },
  "nest": [
    {
      "groupBy": ["field", "aggregate", "bin", "timeUnit", "stack"],
      "orderGroupBy": "aggregationQuality"
    },
    {
      "groupBy": [{
        "property": "channel",
        "replace": {
          "x": "xy", "y": "xy",
          "color": "style", "size": "style", "shape": "style", "opacity": "style",
          "row": "facet", "column": "facet"
        }
      }],
      "orderGroupBy": "effectiveness"
    },
    {
      "groupBy": ["channel"],
      "orderGroupBy": "effectiveness"
    }
  ],
  "orderBy": "effectiveness",
  "config": {
    "autoAddCount": true
  }
}