Using DRA Repositories

Alec Ramsay
Dave’s Redistricting
1 min readJan 31, 2022

This note describes how to setup public DRA repositories. The directions below assume:

  • You have a terminal window open and have changed directories to where the repositories will be located locally, and
  • You have git installed

vtd_data

To use this precinct-by-precinct data, first clone the repo:

git clone https://github.com/dra2020/vtd_data

Then download the contents:

git pull

To use either of the two repositories below, you must also have node and npm installed.

dra-analytics

To run analytics at a command line, first clone the repo:

git clone https://github.com/dra2020/dra-analytics

Then download the contents:

git pull

Finally, install all the dependencies and compile the code:

npm installnpm run build

With that done, you can run analytics at the command line.

The cli.md document in the cli/ directory describes how to run compactness, splitting, and partisan analytics. There are also some sample shell scripts in the scripts/ directory that run multiple commands in sequence.

dra-analytics-app

To run the partisan analytics in a standalone app, first clone the repo:

git clone https://github.com/dra2020/dra-analytics-app

Then download the contents:

git pull

Again install all the dependencies and compile the code:

npm installnpm run build

With that done, you can finally start the standalone app:

npm run test

With the server running, open a browser window and point it at localhost:3000.

The app is simple and straightforward: it takes a partisan profile and runs most of the analytics on the Advanced tab in DRA.

--

--

Alec Ramsay
Dave’s Redistricting

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