% Generated by roxygen2: do not edit by hand % Please edit documentation in R/peers.R \name{cog_find_peers} \alias{cog_find_peers} \title{Find peer governments by similarity criteria} \usage{ cog_find_peers( target_govid, same_type = TRUE, same_state = FALSE, pop_range = c(0.7, 1.3), is_ratio = TRUE, pop_year = NULL, max_peers = 10L ) } \arguments{ \item{target_govid}{Character scalar — `canonical_govid` of the target.} \item{same_type}{If `TRUE` (default) restrict peers to the target's `govs_type`.} \item{same_state}{If `TRUE` restrict peers to the target's `fips_state`. Default `FALSE`.} \item{pop_range}{Length-2 numeric vector giving lower/upper bounds.} \item{is_ratio}{If `TRUE` (default) `pop_range` is multiplied by the target's `population_acs` to produce absolute bounds. If `FALSE`, `pop_range` is interpreted as absolute population counts.} \item{pop_year}{Reserved for future use (selecting ACS vintage). Currently the corpus has a single snapshot so this argument has no effect.} \item{max_peers}{Integer cap on the number of peers returned.} } \value{ Tibble with columns `canonical_govid`, `gov_name`, `fips_state`, `population_acs`, `pop_ratio`, `rank`. } \description{ Selects peer governments from `canonical_fips_xwalk` by combinations of government type, state, and population range. Peers are ordered by `|log(pop_ratio)|` ascending (closest to the target's population first). }