mggg / GerryChain

Use MCMC to analyze districting plans and gerrymanders
https://mggg.github.io/GerryChain/
Other
132 stars 74 forks source link

Getting unequal population via constraints ? #413

Closed hunsao closed 7 months ago

hunsao commented 1 year ago

As far as I know, here the district boundaries are manipulated, while keeping the (almost) the same population in the new district designs. But I do not only aim to manipulate the boundaries, but also to get a new and unequal population (p.e with 2 districts moving from statu quo population to a 60-20).

There's any way to get an unequal population?

Thanks!

mkarrmann commented 1 year ago

@hunsao

There's any way to get an unequal population ?

Could you elaborate? It's not clear to me exactly what you're asking.

Is your goal to require that a partition have a certain degree of inequality between its different districts? If so, then there doesn't exist a pre-existing validator for this, but it wouldn't be hard to write one, you can check out the validators in constraints.validity.py for reference.

hunsao commented 1 year ago

@hunsao

There's any way to get an unequal population ?

Could you elaborate? It's not clear to me exactly what you're asking.

Is your goal to require that a partition have a certain degree of inequality between its different districts? If so, then there doesn't exist a pre-existing validator for this, but it wouldn't be hard to write one, you can check out the validators in constraints.validity.py for reference.

Sorry, I added some more info to the main question. The idea is to get somehow (I guess that via constraints), as you said, a certain degree (probably the maximum possible) of inequality between its different districts in terms of population. Kind of opening the population bounds as far as I can while keeping contiguity (at the moment i'm not really worried about compactness).

mkarrmann commented 1 year ago

@hunsao In that case you need to write your own validator. One does not exist out of the box to accomplish that.

hunsao commented 1 year ago

@hunsao In that case you need to write your own validator. One does not exist out of the box to accomplish that.

Thanks for replying. I could imagine it since the study of gerrymandering usually does not contemplate these types of scenarios. My main concern was if it could be possible, so I guess i'll have to try adding diverse constraints within the validator.