Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Created October 11, 2012 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wboykinm/3873007 to your computer and use it in GitHub Desktop.
Save wboykinm/3873007 to your computer and use it in GitHub Desktop.
db config
<ScoreFunctions>
<ScoreFunction id="score1" type="district" calculator="publicmapping.redistricting.calculators.Interval" label="Tot Pop">
<SubjectArgument name="subject" ref="poptot"/>
<Argument name="target" value="6060" />
<Argument name="bound1" value="0.05"/>
<Argument name="bound2" value="0.1"/>
</ScoreFunction>
<ScoreFunction id="plan_all_blocks_assigned" type="plan"
calculator="publicmapping.redistricting.calculators.Interval"
label="All Blocks Assigned"
description="All blocks in the plan must be assigned.">
</ScoreFunction>
<ScoreFunction id="district_schwartzberg" type="district"
calculator="publicmapping.redistricting.calculators.Schwartzberg"
label="Compactness" user_selectable="true">
<LegislativeBody ref="council"/>
</ScoreFunction>
<!-- A custom calculator to do contiguity, and is boolean. -->
<ScoreFunction id="district_contiguous" type="district"
calculator="publicmapping.redistricting.calculators.Contiguity"
label="Contiguous" user_selectable="true">
<LegislativeBody ref="council"/>
</ScoreFunction>
</ScoreFunctions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment