{
  "alt": "Scatter plot with one dot per state, the state's Democratic margin on the horizontal axis and its party gap on the vertical axis, with a nearly level fitted line and a band that includes a level line. The dots form a cloud around the average party gap of {fact:state_gap_mean} points, with no clear rise or fall from the most Republican to the most Democratic states. The three lowest and three highest gaps are labelled with postal codes.",
  "caption": "State party gaps show no clear rise or fall from the most Republican to the most Democratic states: the fitted slope is {fact:state_gap_slope} points of party gap per {fact:margin_step} points of Democratic margin, and its interval includes zero. The labelled dots are the three lowest and the three highest state gaps; every state is in the data table. The line is a least squares fit with a 95% band from a bootstrap over states.",
  "data": [
    {
      "gap": 41.5105,
      "gap_hi": 44.0802,
      "gap_lo": 38.9408,
      "margin": -26.2812,
      "n": 2259,
      "se": 1.31106,
      "state": "AL"
    },
    {
      "gap": 49.9349,
      "gap_hi": 51.9043,
      "gap_lo": 47.9654,
      "margin": -4.57153,
      "n": 3836,
      "se": 1.00482,
      "state": "AZ"
    },
    {
      "gap": 40.9609,
      "gap_hi": 44.237,
      "gap_lo": 37.6849,
      "margin": -27.1046,
      "n": 1287,
      "se": 1.67145,
      "state": "AR"
    },
    {
      "gap": 44.0815,
      "gap_hi": 45.1906,
      "gap_lo": 42.9725,
      "margin": 28.8792,
      "n": 15069,
      "se": 0.565842,
      "state": "CA"
    },
    {
      "gap": 53.3323,
      "gap_hi": 55.6937,
      "gap_lo": 50.9709,
      "margin": 7.2979,
      "n": 2446,
      "se": 1.20479,
      "state": "CO"
    },
    {
      "gap": 41.3286,
      "gap_hi": 44.8322,
      "gap_lo": 37.8251,
      "margin": 16.6178,
      "n": 1569,
      "se": 1.78753,
      "state": "CT"
    },
    {
      "gap": 43.0123,
      "gap_hi": 47.7593,
      "gap_lo": 38.2653,
      "margin": 15.6937,
      "n": 650,
      "se": 2.42192,
      "state": "DE"
    },
    {
      "gap": 41.7955,
      "gap_hi": 42.8882,
      "gap_lo": 40.7028,
      "margin": -1.03235,
      "n": 12328,
      "se": 0.55748,
      "state": "FL"
    },
    {
      "gap": 42.5745,
      "gap_hi": 44.2693,
      "gap_lo": 40.8798,
      "margin": -4.93925,
      "n": 5087,
      "se": 0.864659,
      "state": "GA"
    },
    {
      "gap": 31.4727,
      "gap_hi": 37.7284,
      "gap_lo": 25.2171,
      "margin": 36.0364,
      "n": 479,
      "se": 3.19165,
      "state": "HI"
    },
    {
      "gap": 51.1684,
      "gap_hi": 55.5533,
      "gap_lo": 46.7834,
      "margin": -34.2946,
      "n": 761,
      "se": 2.2372,
      "state": "ID"
    },
    {
      "gap": 43.4701,
      "gap_hi": 45.1109,
      "gap_lo": 41.8293,
      "margin": 17.584,
      "n": 6436,
      "se": 0.837132,
      "state": "IL"
    },
    {
      "gap": 44.3988,
      "gap_hi": 46.4094,
      "gap_lo": 42.3883,
      "margin": -16.1375,
      "n": 3457,
      "se": 1.02578,
      "state": "IN"
    },
    {
      "gap": 47.8886,
      "gap_hi": 50.4602,
      "gap_lo": 45.3171,
      "margin": -4.0166,
      "n": 1539,
      "se": 1.31203,
      "state": "IA"
    },
    {
      "gap": 49.7921,
      "gap_hi": 52.8608,
      "gap_lo": 46.7234,
      "margin": -20.6946,
      "n": 1215,
      "se": 1.56567,
      "state": "KS"
    },
    {
      "gap": 39.5381,
      "gap_hi": 42.2224,
      "gap_lo": 36.8538,
      "margin": -27.5702,
      "n": 2683,
      "se": 1.36954,
      "state": "KY"
    },
    {
      "gap": 37.9586,
      "gap_hi": 41.0186,
      "gap_lo": 34.8985,
      "margin": -19.1184,
      "n": 1758,
      "se": 1.56125,
      "state": "LA"
    },
    {
      "gap": 49.2137,
      "gap_hi": 53.3424,
      "gap_lo": 45.0849,
      "margin": 8.51886,
      "n": 789,
      "se": 2.1065,
      "state": "ME"
    },
    {
      "gap": 46.7496,
      "gap_hi": 48.7441,
      "gap_lo": 44.7551,
      "margin": 28.9005,
      "n": 3066,
      "se": 1.01762,
      "state": "MD"
    },
    {
      "gap": 45.8396,
      "gap_hi": 48.5658,
      "gap_lo": 43.1134,
      "margin": 28.3412,
      "n": 2552,
      "se": 1.39092,
      "state": "MA"
    },
    {
      "gap": 44.5343,
      "gap_hi": 46.4963,
      "gap_lo": 42.5724,
      "margin": 3.84794,
      "n": 4873,
      "se": 1.00098,
      "state": "MI"
    },
    {
      "gap": 52.2338,
      "gap_hi": 54.4326,
      "gap_lo": 50.0351,
      "margin": 5.01251,
      "n": 2676,
      "se": 1.12182,
      "state": "MN"
    },
    {
      "gap": 37.113,
      "gap_hi": 40.5755,
      "gap_lo": 33.6506,
      "margin": -15.7974,
      "n": 1162,
      "se": 1.76654,
      "state": "MS"
    },
    {
      "gap": 48.1089,
      "gap_hi": 50.1597,
      "gap_lo": 46.0581,
      "margin": -15.4077,
      "n": 3397,
      "se": 1.04633,
      "state": "MO"
    },
    {
      "gap": 56.2059,
      "gap_hi": 60.5348,
      "gap_lo": 51.8771,
      "margin": -18.6054,
      "n": 502,
      "se": 2.20861,
      "state": "MT"
    },
    {
      "gap": 52.7275,
      "gap_hi": 55.8571,
      "gap_lo": 49.5979,
      "margin": -23.5192,
      "n": 950,
      "se": 1.59674,
      "state": "NE"
    },
    {
      "gap": 46.3881,
      "gap_hi": 49.5134,
      "gap_lo": 43.2628,
      "margin": 4.00059,
      "n": 1851,
      "se": 1.59454,
      "state": "NV"
    },
    {
      "gap": 50.4826,
      "gap_hi": 54.8132,
      "gap_lo": 46.1521,
      "margin": 3.73509,
      "n": 692,
      "se": 2.20946,
      "state": "NH"
    },
    {
      "gap": 41.9501,
      "gap_hi": 43.7677,
      "gap_lo": 40.1325,
      "margin": 16.0122,
      "n": 4431,
      "se": 0.92736,
      "state": "NJ"
    },
    {
      "gap": 49.289,
      "gap_hi": 53.0502,
      "gap_lo": 45.5279,
      "margin": 10.1239,
      "n": 1018,
      "se": 1.91896,
      "state": "NM"
    },
    {
      "gap": 38.91,
      "gap_hi": 40.2531,
      "gap_lo": 37.5668,
      "margin": 27.7526,
      "n": 10028,
      "se": 0.685285,
      "state": "NY"
    },
    {
      "gap": 44.8945,
      "gap_hi": 46.5416,
      "gap_lo": 43.2474,
      "margin": -2.68629,
      "n": 4781,
      "se": 0.840342,
      "state": "NC"
    },
    {
      "gap": 48.3572,
      "gap_hi": 54.5708,
      "gap_lo": 42.1436,
      "margin": -31.8621,
      "n": 313,
      "se": 3.17021,
      "state": "ND"
    },
    {
      "gap": 42.3252,
      "gap_hi": 43.7932,
      "gap_lo": 40.8573,
      "margin": -4.36936,
      "n": 6810,
      "se": 0.748946,
      "state": "OH"
    },
    {
      "gap": 47.4287,
      "gap_hi": 50.7358,
      "gap_lo": 44.1217,
      "margin": -36.0085,
      "n": 1528,
      "se": 1.68726,
      "state": "OK"
    },
    {
      "gap": 57.2754,
      "gap_hi": 59.3957,
      "gap_lo": 55.1552,
      "margin": 13.2244,
      "n": 2468,
      "se": 1.08174,
      "state": "OR"
    },
    {
      "gap": 43.2947,
      "gap_hi": 44.5065,
      "gap_lo": 42.0829,
      "margin": 1.77713,
      "n": 9050,
      "se": 0.618267,
      "state": "PA"
    },
    {
      "gap": 39.6312,
      "gap_hi": 46.2209,
      "gap_lo": 33.0414,
      "margin": 21.5103,
      "n": 404,
      "se": 3.36212,
      "state": "RI"
    },
    {
      "gap": 43.443,
      "gap_hi": 45.6865,
      "gap_lo": 41.1994,
      "margin": -12.7975,
      "n": 2259,
      "se": 1.14468,
      "state": "SC"
    },
    {
      "gap": 52.7292,
      "gap_hi": 57.6492,
      "gap_lo": 47.8091,
      "margin": -26.1923,
      "n": 413,
      "se": 2.51022,
      "state": "SD"
    },
    {
      "gap": 45.5167,
      "gap_hi": 47.8698,
      "gap_lo": 43.1636,
      "margin": -24.2872,
      "n": 3129,
      "se": 1.20056,
      "state": "TN"
    },
    {
      "gap": 43.4038,
      "gap_hi": 44.577,
      "gap_lo": 42.2307,
      "margin": -10.4882,
      "n": 10983,
      "se": 0.598545,
      "state": "TX"
    },
    {
      "gap": 45.0818,
      "gap_hi": 48.502,
      "gap_lo": 41.6615,
      "margin": -32.2122,
      "n": 1215,
      "se": 1.74501,
      "state": "UT"
    },
    {
      "gap": 41.2379,
      "gap_hi": 48.8425,
      "gap_lo": 33.6333,
      "margin": 33.9984,
      "n": 298,
      "se": 3.87992,
      "state": "VT"
    },
    {
      "gap": 45.4515,
      "gap_hi": 47.3413,
      "gap_lo": 43.5616,
      "margin": 6.12633,
      "n": 4569,
      "se": 0.9642,
      "state": "VA"
    },
    {
      "gap": 53.2493,
      "gap_hi": 55.4979,
      "gap_lo": 51.0006,
      "margin": 17.2938,
      "n": 3329,
      "se": 1.14728,
      "state": "WA"
    },
    {
      "gap": 37.7742,
      "gap_hi": 41.346,
      "gap_lo": 34.2024,
      "margin": -37.4021,
      "n": 1078,
      "se": 1.82234,
      "state": "WV"
    },
    {
      "gap": 48.3777,
      "gap_hi": 50.2391,
      "gap_lo": 46.5164,
      "margin": 2.15881,
      "n": 3156,
      "se": 0.949674,
      "state": "WI"
    },
    {
      "gap": 54.4244,
      "gap_hi": 60.3615,
      "gap_lo": 48.4874,
      "margin": -47.0704,
      "n": 265,
      "se": 3.0291,
      "state": "WY"
    }
  ],
  "id": "state_party_gap",
  "notes": [
    "The dots carry no whiskers because the scatter chart draws none. The data table gives each state's standard error and a 95% interval (normal, from a linearised standard error that treats respondents within a state as independent). The largest standard error is {fact:state_se_max} points, and the smallest state has {fact:state_n_min} Democrats and Republicans per issue on average.",
    "A state needs at least 50 Democrats and 50 Republicans on an issue for that issue to count, and at least ten issues to appear. The tooltip shows the average number of respondents per issue. The District of Columbia has fewer than ten such issues and is not plotted, so the scatter has {fact:n_states_scatter} states while the bootstrap for the other estimates has {fact:n_states} clusters."
  ],
  "source": "CES cumulative common content, 2013-2021; state presidential returns (MEDSL) for the state two-party margin; weighted (weight_cumulative)",
  "spec": {
    "highlight": [
      "HI",
      "MS",
      "WV",
      "WY",
      "MT",
      "OR"
    ],
    "label": "state",
    "overlays": [
      {
        "hi": "conf_high",
        "kind": "band",
        "label": "Fit",
        "lo": "conf_low",
        "rows": [
          {
            "conf_high": 51.61,
            "conf_low": 44.048,
            "fit": 47.817,
            "margin": -47.0704
          },
          {
            "conf_high": 51.3821,
            "conf_low": 44.1124,
            "fit": 47.7147,
            "margin": -44.9927
          },
          {
            "conf_high": 51.1458,
            "conf_low": 44.1319,
            "fit": 47.6125,
            "margin": -42.9151
          },
          {
            "conf_high": 50.9176,
            "conf_low": 44.1977,
            "fit": 47.5102,
            "margin": -40.8374
          },
          {
            "conf_high": 50.6628,
            "conf_low": 44.264,
            "fit": 47.4079,
            "margin": -38.7597
          },
          {
            "conf_high": 50.4281,
            "conf_low": 44.3174,
            "fit": 47.3056,
            "margin": -36.682
          },
          {
            "conf_high": 50.193,
            "conf_low": 44.3784,
            "fit": 47.2033,
            "margin": -34.6044
          },
          {
            "conf_high": 49.9617,
            "conf_low": 44.3993,
            "fit": 47.1011,
            "margin": -32.5267
          },
          {
            "conf_high": 49.7175,
            "conf_low": 44.4558,
            "fit": 46.9988,
            "margin": -30.449
          },
          {
            "conf_high": 49.484,
            "conf_low": 44.4947,
            "fit": 46.8965,
            "margin": -28.3714
          },
          {
            "conf_high": 49.2206,
            "conf_low": 44.5009,
            "fit": 46.7942,
            "margin": -26.2937
          },
          {
            "conf_high": 48.9932,
            "conf_low": 44.5188,
            "fit": 46.6919,
            "margin": -24.216
          },
          {
            "conf_high": 48.7838,
            "conf_low": 44.5301,
            "fit": 46.5897,
            "margin": -22.1384
          },
          {
            "conf_high": 48.5266,
            "conf_low": 44.5629,
            "fit": 46.4874,
            "margin": -20.0607
          },
          {
            "conf_high": 48.2896,
            "conf_low": 44.5632,
            "fit": 46.3851,
            "margin": -17.983
          },
          {
            "conf_high": 48.0847,
            "conf_low": 44.5984,
            "fit": 46.2828,
            "margin": -15.9054
          },
          {
            "conf_high": 47.8737,
            "conf_low": 44.5787,
            "fit": 46.1805,
            "margin": -13.8277
          },
          {
            "conf_high": 47.7321,
            "conf_low": 44.5687,
            "fit": 46.0783,
            "margin": -11.75
          },
          {
            "conf_high": 47.56,
            "conf_low": 44.5219,
            "fit": 45.976,
            "margin": -9.67235
          },
          {
            "conf_high": 47.418,
            "conf_low": 44.4659,
            "fit": 45.8737,
            "margin": -7.59468
          },
          {
            "conf_high": 47.284,
            "conf_low": 44.3713,
            "fit": 45.7714,
            "margin": -5.51701
          },
          {
            "conf_high": 47.1661,
            "conf_low": 44.2913,
            "fit": 45.6691,
            "margin": -3.43934
          },
          {
            "conf_high": 47.1242,
            "conf_low": 44.1719,
            "fit": 45.5669,
            "margin": -1.36168
          },
          {
            "conf_high": 47.0511,
            "conf_low": 44.045,
            "fit": 45.4646,
            "margin": 0.715994
          },
          {
            "conf_high": 47.0174,
            "conf_low": 43.9138,
            "fit": 45.3623,
            "margin": 2.79366
          },
          {
            "conf_high": 46.9837,
            "conf_low": 43.7783,
            "fit": 45.26,
            "margin": 4.87133
          },
          {
            "conf_high": 46.9588,
            "conf_low": 43.6009,
            "fit": 45.1577,
            "margin": 6.949
          },
          {
            "conf_high": 46.9517,
            "conf_low": 43.3733,
            "fit": 45.0555,
            "margin": 9.02667
          },
          {
            "conf_high": 46.9973,
            "conf_low": 43.2062,
            "fit": 44.9532,
            "margin": 11.1043
          },
          {
            "conf_high": 46.9852,
            "conf_low": 42.9859,
            "fit": 44.8509,
            "margin": 13.182
          },
          {
            "conf_high": 47.0155,
            "conf_low": 42.789,
            "fit": 44.7486,
            "margin": 15.2597
          },
          {
            "conf_high": 47.0464,
            "conf_low": 42.5775,
            "fit": 44.6463,
            "margin": 17.3373
          },
          {
            "conf_high": 47.0989,
            "conf_low": 42.3739,
            "fit": 44.5441,
            "margin": 19.415
          },
          {
            "conf_high": 47.1467,
            "conf_low": 42.155,
            "fit": 44.4418,
            "margin": 21.4927
          },
          {
            "conf_high": 47.1768,
            "conf_low": 41.9354,
            "fit": 44.3395,
            "margin": 23.5704
          },
          {
            "conf_high": 47.2359,
            "conf_low": 41.7056,
            "fit": 44.2372,
            "margin": 25.648
          },
          {
            "conf_high": 47.2886,
            "conf_low": 41.4544,
            "fit": 44.1349,
            "margin": 27.7257
          },
          {
            "conf_high": 47.4208,
            "conf_low": 41.2052,
            "fit": 44.0327,
            "margin": 29.8034
          },
          {
            "conf_high": 47.4668,
            "conf_low": 40.9553,
            "fit": 43.9304,
            "margin": 31.881
          },
          {
            "conf_high": 47.5402,
            "conf_low": 40.7056,
            "fit": 43.8281,
            "margin": 33.9587
          },
          {
            "conf_high": 47.6451,
            "conf_low": 40.4595,
            "fit": 43.7258,
            "margin": 36.0364
          }
        ],
        "x": "margin",
        "y": "fit"
      }
    ],
    "x": "margin",
    "xDomain": [
      -60,
      60
    ],
    "xFormat": {
      "digits": 0,
      "signed": true
    },
    "xLabel": "State two-party margin (points, Democratic minus Republican)",
    "y": "gap",
    "yDomain": [
      25,
      60
    ],
    "yFormat": {
      "digits": 0
    },
    "yLabel": "Party gap in points"
  },
  "subtitle": "State party gap averaged over the issues, in points, against the state's mean two-party presidential margin; Democrats and Republicans; CES survey years 2013 to 2021",
  "table": {
    "columns": [
      {
        "key": "state",
        "label": "State"
      },
      {
        "format": {
          "digits": 1,
          "signed": true
        },
        "key": "margin",
        "label": "State two-party margin"
      },
      {
        "format": {
          "digits": 1
        },
        "key": "gap",
        "label": "Party gap"
      },
      {
        "format": {
          "digits": 1
        },
        "key": "se",
        "label": "Standard error"
      },
      {
        "format": {
          "digits": 1
        },
        "key": "gap_lo",
        "label": "Party gap, low"
      },
      {
        "format": {
          "digits": 1
        },
        "key": "gap_hi",
        "label": "Party gap, high"
      },
      {
        "format": {
          "digits": 0,
          "thousands": true
        },
        "key": "n",
        "label": "Respondents per issue"
      }
    ]
  },
  "title": "The party gap averages {fact:state_gap_mean} points across states and shows no clear relation to a state's partisanship",
  "type": "scatter",
  "width": "body"
}
