Skip to content

gerrymandr/sample-graph-data

Repository files navigation

Sample Electoral Data

This repo contains sample electoral data, including adjacency graphs, units at various scales, demographic data, and past election results. We’ve started with data from Minnesota’s Legislative Coordinating Commission covering an area to the north and west of Minneapolis with a mix of urban, rural, white, non-white, conservative, and liberal voters.

Minnesota Sample Area

See an interactive map of demographics and voting patterns (source code in map.html).

Interactive map of demographics and voting patterns

Also see an interactive map of several generated plans (source code in maps.html).

Interactive map of several generated plans

Layers

Four layers are included: minor civil divisions (MCDs), Census tracts, voter tabulation districts (VTDs), and Census blocks. Raw data and adjacency lists for graph representations are included for each. Each includes demographic and race data detailed in metadata.

Minor Civil Divisions

Minnesota MCDs Graph

Census Tracts

Minnesota Tracts Graph

Voter Tabulation Districts

Minnesota VTD Graph

Census Blocks

Minnesota Blocks Graph

Enumerating Partitioning Schemes

We used the python-igraph in order to prototype enumerating possible partitioning schemes. See the generate_partitions.py file for doing this enumeration:

$ python generate_partitions.py mcd2010-slice.csv mcd2010-graph.csv 
Number of partitions: 5
[1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
[1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
[1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
[1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]
[1, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

Each of these lines corresponds to a partitioning of the MCD's in the input files, which can then be visualized by editing maps.html.

About

Sample electoral data, including adjacency graphs, units at various scales, demographic data, and past election results

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published