editPlanInteractive {BARD} | R Documentation |
These functions allow one to create or edit a plan interactively, by selecting blocks from a map and assigning them to districts. Reports can be generated for each selection.
editPlanInteractive(plan, reportFUN = NULL, ...) createPlanInteractive(basemap, ndists, reportFUN = NULL, ...)
plan |
plan to be edited |
basemap |
bard basemap |
ndists |
number of districts |
reportFUN |
this function will be called after every selection is added, for continuous reporting of district scores |
... |
other arguments to pass to reportFUN |
returns a bard plan
This depends on the iplots package. This package is still beta-quality. You may see occasional glitches.
Micah Altman Micah_Altman@harvard.edu http://www.hmdc.harvard.edu/micah_altman/
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
Altman, M. 1998. Modeling the Effect of Mandatory District Compactness on Partisan Gerrymanders, Political Geography 17:989-1012.
Bush v. Vera, 517 U.S. 952 (1996).
Micah Altman and Michael P. McDonald. 2004. A Computation Intensive Method for Detecting Gerrymanders Paper presented at the annual meeting of the The Midwest Political Science Association, Palmer House Hilton, Chicago, Illinois, Apr 15, 2004. http://www.allacademic.com/meta/p83108_index.html
C. Cirincione , T.A. Darling, and T.G. O'Rourke. 2000. ``Assessing South Carolina's 1990's Congressional Districting.'' Political Geography 19: 189-211.
Grofman, B. 1982, "For single Member Districts Random is Not Equal", In Representation and Redistricting Issues, ed. B. Grofman, A. Lijphart, R. McKay, H. Scarrow. Lexington, MA: Lexington Books.
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.
Other plan creation functions createRandomPlan, etc.
Plan refinement algorithms refineGreedyPlan
, refineAnnealPlan
, refineGenoudPlan
, refineNelderPlan
# read in a shapefile with demographic data suffolk.map <- importBardShape( file.path(system.file("shapefiles", package="BARD"),"suffolk_tracts") ) # choose number of districts ndists <- 5 # create some initial plans kplan <- createKmeansPlan(suffolk.map,ndists) ## Not run: if (require("iplots",quietly=TRUE)) { kplan<-editPlanInteractive(kplan, reportFUN=function(x)print(calcPopScore(x))) } ## End(Not run)