Set options for redistio
Usage
redistio_options(
theme = "flatly",
panels = c("elections", "demographics", "integrity", "algorithms"),
select_color = "purple",
palette_pop = "Purples",
palette_pct = "PuOr",
palette_party = ggredist::ggredist$partisan,
map_tiles = "CartoDB.Positron",
leaflet_height = "91vh",
crs = 4326,
na_color = "#0000",
layer_weight = 1.5,
layer_color = "#000000",
locked_districts = NULL,
use_algorithms = TRUE,
alg_max_districts = 3,
alg_max_sims = 100,
use_planscore = TRUE,
save_assignment_path = "redistio.csv",
save_shape_path = "redistio.geojson",
...
)
Arguments
- theme
a name of a bootswatch preset theme or other
bslib::bs_theme()
object- panels
which panels to display in the app,
'draw'
is always shown.- select_color
a color to use for highlighting selected districts
- palette_pop
a color palette to use for whole people
- palette_pct
a color palette to use for percentages of people
- palette_party
a color palette to use for parties
- map_tiles
a tileset to use for the map background, from
leaflet::providers
- leaflet_height
height to pass to
leaflet::leafletOutput()
- crs
a coordinate reference system to use in
leaflet::leaflet()
- na_color
a color to use for unassigned precincts
- layer_weight
a stroke width to use for layers in
leaflet::leaflet()
- layer_color
colors to use for layers in
leaflet::leaflet()
- locked_districts
districts to lock on app start to stop edits
- use_algorithms
whether to use redistricting simulation algorithms
- alg_max_districts
maximum number of districts to use in algorithms
- alg_max_sims
maximum number of simulations to use in algorithms
- use_planscore
whether to use PlanScore to evaluate plans
- save_assignment_path
Output path to save assignment file to.
- save_shape_path
Output path to save shapefile to.
- ...
additional arguments (currently ignored)
Examples
redistio_options()
#> $theme
#> [1] "flatly"
#>
#> $panels
#> [1] "elections" "demographics" "integrity" "algorithms"
#>
#> $select_color
#> [1] "purple"
#>
#> $palette_pop
#> [1] "Purples"
#>
#> $palette_pct
#> [1] "PuOr"
#>
#> $palette_party
#> [1] "#A0442C" "#B25D4C" "#C27568" "#D18E84" "#DFA8A0" "#EBC2BC" "#F6DCD9"
#> [8] "#F9F9F9" "#DAE2F4" "#BDCCEA" "#9FB6DE" "#82A0D2" "#638BC6" "#3D77BB"
#> [15] "#0063B1"
#> attr(,"class")
#> [1] "palette" "character"
#>
#> $map_tiles
#> function (map)
#> leaflet::addProviderTiles(map, provider = mt)
#> <bytecode: 0x561e07d6f950>
#> <environment: 0x561e07d6f1e0>
#>
#> $leaflet_height
#> [1] "91vh"
#>
#> $crs
#> [1] 4326
#>
#> $na_color
#> [1] "#0000"
#>
#> $layer_weight
#> [1] 1.5
#>
#> $layer_color
#> [1] "#000000"
#>
#> $locked_districts
#> NULL
#>
#> $use_algorithms
#> [1] TRUE
#>
#> $alg_max_districts
#> [1] 3
#>
#> $alg_max_sims
#> [1] 100
#>
#> $use_planscore
#> [1] TRUE
#>
#> $save_assignment_path
#> [1] "redistio.csv"
#>
#> $save_shape_path
#> [1] "redistio.geojson"
#>