GerryChain icon indicating copy to clipboard operation
GerryChain copied to clipboard

Use MCMC to analyze districting plans and gerrymanders

Results 37 GerryChain issues
Sort by recently updated
recently updated
newest added

This PR adds common optimization methods to the gerrychain codebase. The `SingleMetricOptimizer` class represents the class of optimization problems over a single plan metric and currently implements short bursts, a...

work-in-progress
summer-project

This PR introduces a new parent `Partition` class `MultiMemberPartition` which adds magnitudes for each of the districts corresponding to their number of representatives. (by default this is set to 1)....

work-in-progress
summer-project

I'm wondering if there is any opportunity/possibility to add multiprocessing to GerryChain?

Consider this setup, where we try to generate two GerryChain Partitions, one built from the North Carolina Census [block dual graph](https://www.dropbox.com/s/pm4g7ugsuejjx9c/NC_full_vote_vtd.json?dl=0), the other from the [VTD dual graph](https://www.dropbox.com/s/pm4g7ugsuejjx9c/NC_full_vote_vtd.json?dl=0). ```python from...

bug

An assignment CSV has a column of node indices and a column with the corresponding district assignments. This CSV format seems to be common in the redistricting world. JSON probably...

good first issue
feature

The population balance percentage can be set in two places. in the recom proposal: [`def recom(partition, pop_col, pop_target, epsilon, node_repeats=1, method=bipartition_tree):`](https://github.com/mggg/GerryChain/blob/01b8801877498f87d1b9968415bc7c2439f448c0/gerrychain/proposals/tree_proposals.py#L11) and as a constraint: [`def within_percent_of_ideal_population(initial_partition, percent=0.01, pop_key="population"):`](https://github.com/mggg/GerryChain/blob/01b8801877498f87d1b9968415bc7c2439f448c0/gerrychain/constraints/validity.py#L52) This...

A matrix that holds the district adjacency where the values are the number of cut-edges between each district. This could be helpful just in general, but would be especially helpful...

Instead of picking a new root for the tree, which is irrelevant for the current formulation, if none of the edges in the tree are cuttable the method should instead...

`partition` objects cannot be passed through the `pickle` serialization library. Below are more details and a fix. If we want to implement it, I can make a PR in the...

If I'm a new user who hasn't seen ensemble analysis before, I want to get a bird's-eye view of what that is, and each of the decisions that I need...

docs