{
  "name": "kennedy",
  "layout": {
    "width": 800,
    "height": 180,
    "composition": "single",
    "column": [
      {
        "field": "percentage",
        "scale": {
          "domain": [
            35,
            95
          ]
        }
      }
    ],
    "haxis": {// horizontal axis design
      "grid": true,
      "gridColor": "#cccccc",
      "gridDash": [
        3,
        1
      ]
    }
  },
  "layer": [
    {
      "mark": {
        "type": "circle",// dot mark
        "color": {
          "value": "black"
        },
        "size": {
          "value": 80
        }
      },
      "text": [// axis values
        {
          "type": "on-axis",
          "field": "percentage",
          "values": [
            40,
            50,
            60,
            70,
            80,
            90
          ],
          "orient": "top",
          "padding": 10,
          "items": [
            {
              "fontSize": 13,
              "color": "black",
              "expression": "datum.value + '%'"
            }
          ]
        },
        {// general positionoing of mark labels
          "type": "on-mark",
          "field": "justice",
          "orient": "bottom-center",
          "dy": 20,
          "dx": -2,
          "values": [
            "Gorsuch",
            "White",
            "O'Connor",
            "Roberts",
            "Thomas",
            "Scalia",
            "Alito",
            "Blackmun",
            "Souter",
            "Brennan",
            "Kagan",
            "Sotomayor",
            "Marshall"
          ],
          "items": [
            {
              "fontWeight": 100,
              "fontSize": 13
            }
          ],
          "angle": 45
        },
        {// specific positioning of overlapping mark labels
          "type": "on-mark",
          "field": "justice",
          "orient": "bottom-center",
          "dy": 53,
          "dx": 29,
          "values": [
            "Rehnquist"
          ],
          "items": [
            {
              "fontWeight": 100,
              "fontSize": 13,
              "expression": "', ' + datum.value"
            }
          ],
          "angle": 45
        },
        {
          "type": "on-mark",
          "field": "justice",
          "orient": "bottom-center",
          "dy": 63,
          "dx": 39,
          "values": [
            "Breyer"
          ],
          "items": [
            {
              "fontWeight": 100,
              "fontSize": 13,
              "expression": "', ' + datum.value"
            }
          ],
          "angle": 45
        },
        {
          "type": "on-mark",
          "field": "justice",
          "orient": "bottom-center",
          "dy": 54,
          "dx": 30,
          "values": [
            "Stevens"
          ],
          "items": [
            {
              "fontWeight": 100,
              "fontSize": 13,
              "expression": "', ' + datum.value"
            }
          ],
          "angle": 45
        },
        {
          "type": "on-mark",
          "field": "justice",
          "orient": "bottom-center",
          "dy": 55,
          "dx": 33,
          "values": [
            "Ginsburg"
          ],
          "items": [
            {
              "fontWeight": 100,
              "fontSize": 13,
              "expression": "', ' + datum.value"
            }
          ],
          "angle": 45
        },
        {// special design for a mark label (Kennedy)
          "type": "on-mark",
          "field": "justice",
          "orient": "bottom-center",
          "dy": 15,
          "dx": -7,
          "width": 65,
          "values": [
            "Kennedy"
          ],
          "items": [
            {
              "fontWeight": 900,
              "fontSize": 13
            }
          ],
          "fill": "#ffe100",
          "padding": 5,
          "radius": 5,
          "angle": 45
        }
      ]
    }
  ],
  "nondata": {
    "items": [
      {// manually drawing an axis domain line
        "name": "domain",
        "type": "mark",
        "mark": {
          "shape": "rule",
          "stroke": "black"
        },
        "width": 800,
        "height": 1,
        "x": 0,
        "y": 106
      },
      {// nondata annotation
        "type": "text",
        "x": 9,
        "y": 75,
        "width": 240,
        "text": [
          {
            "align": "left",
            "fontColor": "#999999",
            "text": "Percentage of votes in the majority,
over each justice’s career",
"lineHeight": "120%" } ], "box": { "fill": "white" } } ] }, "title": {// title "width": 350, "items": [ { "text": "In close decisions, Kennedy voted in the majority 76 percent of the time.", "fontSize": 22, "fontWeight": 700, "offset": 30 } ] }, "data": [// dataset for the visualization { "justice": "Gorsuch", "percentage": 82, "_index_": 0 }, { "justice": "Kennedy", "percentage": 76, "_index_": 1 }, { "justice": "White", "percentage": 68, "_index_": 2 }, { "justice": "O'Connor", "percentage": 66, "_index_": 3 }, { "justice": "Roberts", "percentage": 65, "_index_": 4 }, { "justice": "Rehnquist", "percentage": 65, "_index_": 5 }, { "justice": "Thomas", "percentage": 63, "_index_": 6 }, { "justice": "Scalia", "percentage": 62, "_index_": 7 }, { "justice": "Alito", "percentage": 61, "_index_": 8 }, { "justice": "Blackmun", "percentage": 57, "_index_": 9 }, { "justice": "Souter", "percentage": 47, "_index_": 10 }, { "justice": "Stevens", "percentage": 46, "_index_": 11 }, { "justice": "Brennan", "percentage": 46, "_index_": 12 }, { "justice": "Kagan", "percentage": 45, "_index_": 13 }, { "justice": "Sotomayor", "percentage": 44, "_index_": 14 }, { "justice": "Breyer", "percentage": 44, "_index_": 15 }, { "justice": "Ginsburg", "percentage": 42, "_index_": 16 }, { "justice": "Marshall", "percentage": 42, "_index_": 17 } ] }
In close decisions, Kennedy voted in the majority 76 percent of the time.
$-x-p1660$-x-p1691$-x-p1722$-x-p1753$-x-p1784$-x-p1815
Gorsuch
White
O'Connor
Roberts
Thomas
Scalia
Alito
Blackmun
Souter
Brennan
Kagan
Sotomayor
Marshall
, Rehnquist
, Breyer
, Stevens
, Ginsburg
Kennedy
Percentage of votes in the majority,
over each justice’s career
40%
50%
60%
70%
80%
90%