Doing Research With DRA

Alec Ramsay
Dave’s Redistricting
3 min readJan 12, 2022

This post outlines how you can use DRA for research & analysis.

Running partisan analytics at a command-line interface

Analyzing Maps in DRA

You can analyze maps in DRA using using a suite of tools available on the Statistics, Analyze, Compare, Advanced tabs. The analytics use a rich set of shapes, census, demographic, and election data in DRA (see About Data) and a methodology of composite of statewide elections and fractional seat probabilities instead of all-or-nothing accounting.

In the Official Maps collection we have the congressional & state legislative maps for all 50 states used in the 2018 and 2020 elections, and you can use the Import command to load any map for which you have 2020 or 2010 block-assignment files or shapefiles. We’re also adding the new 2022 plans, as states adopt them.

On the home page with the map of the US, you can click to see page for each state. On it we show the Notable Maps that maximize each rating dimension for that state & type of map (which defaults to congressional). Together the notable maps give you a sense of the tradeoffs in the state’s political geography.

Finally, users have posted almost 20,000 maps to the Published maps collection which you can sift through using our powerful filtering & sorting capabilities. These include almost 1,000 COI representing Native American reservations and tribal lands and over 600 COI the Center for New Data inferred from cell phone use.

Using Data Outside DRA

You can download the district data, precinct data & district assignments, and analytics for maps and analyze them outside DRA, using the Export command.

All the precinct-by-precinct data that we use in DRA are also available in a public GitHub repository (vtd_data).

Update 02/16/24: All the block-level data that we use in DRA are also now available in a public GitHub repository (block_data).

Using Analytics Outside DRA

You can also use most of the analytics available inside DRA in a variety of ways outside of DRA proper:

  • You can integrate the node package that we use in DRA into another application.
  • Alternatively, you can download the analytics code from the public GitHub repository and run the analytics at a command-line interface (CLI). UPDATE (5/20/23): There is also now a Python version of the analytics.
  • Finally, you can use a standalone app to run most of the partisan analytics on the Advanced tab in DRA, by loading a simple JSON files that includes the statewide and district-by-district Democratic vote shares. This allows you to experiment with partisan “profiles” for which you don’t have or can’t create the underlying map/plan (such as Greg Warrington’s hypothetical plans).

A partisan profile is a JSON file that contains a statewide two-party Democratic vote share along with district-by-district Democratic vote shares.
For example:

{
"statewide": 0.515036,
"byDistrict": [ 0.423500, 0.428588, 0.433880, 0.443866, 0.454505, 0.456985, 0.458005, 0.458134, 0.463947, 0.473144, 0.718314, 0.736620, 0.775817 ]}

To set these repositories up locally, see the step-by-step directions in Using DRA Repositories.

--

--

Alec Ramsay
Dave’s Redistricting

I synthesize large complex domains into easy-to-understand conceptual frameworks: I create simple maps of complex territories.