choroplotPlan {BARD}R Documentation

Create a choropleth (shaded thematic map) plot for a redistricting plan

Description

Plots a shaded thematic map on a plan, based on a set of schore

Usage

  choroplotPlan(plan,scores,numlevels=5,
        method=c("quant","equal","absolute"),
        main="choropleth map", absmin=0,absmax=1,ramplow="blue",ramphigh="red",...)

Arguments

plan plan to plot
scores vector of scores
method binning method
main main title of plot
numlevels number of bins
absmin if method is absolute minimum for absolute range
absmax if method is absolute maximum for absolute range
ramplow color ramp endpoint for negative values
ramphigh color ramp endpoint for positive values
... arguments to pass on to map plotting

Details

The scores should represent values for each district in the plan. Each score is assigned to one of numlevels bins. Districts are plotted according to the bin they are assigned to, using a color ramp (or a double color ramp for ranges that extend from negative to positive).

Three methods of bin construction are supported: - absolute: creates equally spaced bins from absmin to absmax - equal: creates equally spaced bins from min(scores) to max(scores) - quant: bins are created using quantiles

Value

Nothing. The function is used for printing and plotting effect.

Author(s)

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

See Also

Scoring functions: calcContiguityScore

Examples

  suffolk.map <- importBardShape(
    system.file("shapefiles/suffolk_tracts.shp", package="BARD"))
    
  # choose number of districts
  ndists <- 5

  # create some initial plans
  kplan <- createKmeansPlan(suffolk.map,ndists)
  choroplotPlan(kplan,calcPopScore(kplan),numlevels=3)


[Package BARD version 1.09 Index]