{
  "description": "A bar chart showing the US population distribution of age groups and gender in 2000.",
  "data": { "url": "data/population.json"},
  "transform": {
    "filter": "datum.year == 2000",
    "calculate": [{"field": "gender", "expr": "datum.sex == 2 ? \"Female\" : \"Male\""}]
  },
  "mark": "bar",
  "encoding": {
    "x": {
      "field": "age", "type": "ordinal",
      "scale": {"bandWidth": 17}
    },
    "y": {
      "aggregate": "sum", "field": "people", "type": "quantitative",
      "axis": {"title": "population"}
    },
    "color": {
      "field": "gender", "type": "nominal",
      "scale": {"range": ["#e377c2","#1f77b4"]}
    }
  },
  "config": {
    "mark": {"opacity": 0.6, "stack" : "none"}
  }
}

{
  "description": "A bar chart showing the US population distribution of age groups and gender in 2000.",
  "data": { "url": "data/population.json"},
  "transform": {
    "filter": "datum.year == 2000",
    "calculate": [{"field": "gender", "expr": "datum.sex == 2 ? \"Female\" : \"Male\""}]
  },
  "mark": "bar",
  "encoding": {
    "x": {
      "field": "age", "type": "ordinal",
      "scale": {"bandWidth": 17}
    },
    "y": {
      "aggregate": "sum", "field": "people", "type": "quantitative",
      "axis": {"title": "population"}
    },
    "color": {
      "field": "gender", "type": "nominal",
      "scale": {"range": ["#e377c2","#1f77b4"]}
    }
  },
  "config": {
    "mark": {"opacity": 0.6, "stacked" : "none"}
  }
}

Fix stacked example. cc @kanitw
Fix stacked example. cc @kanitw