Skip to content

matthewstern/peeracs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

peeracs

peeracs is an R package that wraps around the tidycensus get_acs() function to cleanly obtain time series data for a region of counties, peer MSAs, and the nation. Currently, it provides the function assemble_peer_acs() and a function manual that explains how to employ it.

To install from github:

install.packages("devtools")
library(devtools)
install_github("tallishmatt/peeracs")
library(peeracs)

assemble_peer_acs) repeatedly and somewhat intelligently calls get_acs() to quietly collect 1-year ACS data for a set of counties, a set of peer MSAs, and the country. It collects data for a range of years, and if asked can iterate through racially-specific detailed census tables. It tracks suppressed data, and attempts to replace suppressed 1-year data with data from the 5-year ACS. Finally, it sums or calculates a weighted average for the set of counties. It defaults to CMAP's 7 county region, but this can be overridden for use by other regions.

assemble_peer_acs arguments

assemble_peer_acs(table = NULL, variables = NULL, years = 2018,
  peers = NULL, racial = FALSE, race = NULL, try_suppressed = TRUE,
  avg_weight = NULL, state_fips = "17",
  counties = c("031", "043", "089", "093", "097", "111", "197")))
}

I'm new to this!

Please feel free to suggest any edits to code for style or efficiency best practices.

About

Wraps tidycensus get_acs to provide county, MSA, and US ACS data for a range of years

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages