fillHolesPlan {BARD}R Documentation

Fill holes in a redistricting plan.

Description

This fills holes (unassigned blocks) in a redistricting plan, using selectable methods.

Usage

fillHolesPlan(plan,method=c("random","fixed","closest"), fixed=1)

Arguments

plan input plan
method Hole filling method to use
fixed id for ``fixed'' method

Details

Fixed method assigns all missing blocks to a fixed value. Random method assigns blocks randomly. Closest assigns to a randomly chosen adjoining district (iteratively, if blocks are surrounded by other missing blocks

Value

Returns a bard plan.

Author(s)

Micah Altman Micah_Altman@harvard.edu http://www.hmdc.harvard.edu/micah_altman/

References

Micah Altman, 1997. ``Is Automation the Answer? The Computational Complexity of Automated Redistricting'', Rutgers Computer and Technology Law Journal 23 (1), 81-142 http://www.hmdc.harvard.edu/micah_altman/pubpapers.shtml

Micah Altman, Karin Mac Donald, and Michael P. McDonald, 2005. ``From Crayons to Computers: The Evolution of Computer Use in Redistricting'' Social Science Computer Review 23(3): 334-46.

See Also

Plan generation algorithms: createRandomPlan, createKmeansPlan, createContiguousPlan, createRandomPopPlan, createAssignedPlan.

Examples

  suffolk.map <- importBardShape(
      file.path(system.file("shapefiles", package="BARD"),"suffolk_tracts")
  )
  kplan <- createKmeansPlan(suffolk.map,5)
  kplan2<-kplan
  is.na(kplan2[c(1,10,20,100)])<-TRUE
  print(kplan2)
  kplan3 <- fillHolesPlan(kplan2,method="closest")
  

[Package BARD version 1.03 Index]