pull_peers: Subset a data frame containing MSA or county data to peer...

View source: R/peer_utils.R

pull_peersR Documentation

Subset a data frame containing MSA or county data to peer cities and add current and baseline peer data.

Description

Subset a data frame containing MSA or county data to peer cities and add current and baseline peer data.

Usage

pull_peers(
  df,
  add_info = F,
  subset_to_peers = T,
  geog = "",
  additional_geogs = ""
)

Arguments

df

A data frame containing the column MSA or FIPS

add_info

Either TRUE or FALSE. Add information columns (city, baseline, and current) to data frame? Defaults to TRUE.

subset_to_peers

Either TRUE or FALSE. Subset the data to peer geographies? Defaults to TRUE.

geog

Level of gegraphy to use for adding information and filtering. Can be FIPS or MSA Defaults to the MSA if present, followed by the FIPS column if present. (To keep MSA-level data using FIPS as the ID column, geog should be MSA.)

additional_geogs

A vector of additional MSA or FIPS codes to include.


greaterlouisvilleproject/glptools documentation built on Feb. 9, 2025, 11:21 a.m.