Skip to content

Commit

Permalink
updated description
Browse files Browse the repository at this point in the history
  • Loading branch information
dinglucy committed Mar 27, 2024
1 parent 94d7e41 commit 84b9760
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
4 changes: 4 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ Suggests:
RSpectra,
testthat (>= 3.0.0),
spelling
censable
PL94171
lpSolve
geomander
LinkingTo: Rcpp, RcppArmadillo, RcppThread, cli, redistmetrics
License: GPL (>= 2)
SystemRequirements: C++17, python
Expand Down
5 changes: 2 additions & 3 deletions R/parity.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ min_move_parity <- function(map, plan, counties = NULL, penalty = 0.2) {
#' how much population should be moved from/to each district
#'
#' @examples
#' library(alarmdata)
#' map_ar <- alarmdata::alarm_50state_map("AR")
#' optimal_transfer(map_ar, map_ar$cd_2020)
#' data(iowa)
#' optimal_transfer(redist_map(iowa, existing_plan = cd_2010), iowa$cd_2010)
#'
#' @concept analyze
#' @md
Expand Down
10 changes: 5 additions & 5 deletions R/walnuts.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
#' precinct that the block belongs to, and the district that it is assigned to
#'
#' @examples
#' library(alarmdata)
#' map_ar <- alarmdata::alarm_50state_map("AR")
#' map_ar_blk <- get_block_map("AR", 4)
#' new_plan <- suppressWarnings(walnuts_blk(map_ar, map_ar_blk, map_ar$cd_2020))
#' data(iowa)
#' iowa <- redist_map(iowa, existing_plan = cd_2010)
#' iowa_blk <- get_block_map("IA", 4)
#' #new_plan <- suppressWarnings(walnuts_blk(iowa, iowa_blk, iowa$cd_2010))
#'
#' @concept analyze
#' @md
Expand Down Expand Up @@ -541,7 +541,7 @@ get_block_map <- function(state_abbr, ndists){
# Get adjacency for census blocks
adj <- geomander::adjacency(map_blk)

if (ccm(adj) != 1){
if (geomander::ccm(adj) != 1){
suggests <- suggest_component_connection(map_blk, adj)
adj <- adj %>% add_edge(v1 = suggests$x, v2 = suggests$y)
}
Expand Down
5 changes: 2 additions & 3 deletions man/optimal_transfer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/walnuts_blk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 84b9760

Please sign in to comment.