An R package for programmatic access to archived County Health Rankings & Roadmaps (CHR&R) data, inspired by the simplicity of the tidycensus package.
The current version of countyhealthR includes four functions to interact with CHR&R data:
install.packages("countyhealthR")
# install.packages("devtools") # if needed
# devtools::install_github("countyhealthrankings/countyhealthR")
install.packages("countyhealthR", repos = c('https://countyhealthrankings.r-universe.dev', 'https://cloud.r-project.org'))
library(countyhealthR)
# Example: Load county-level premature death data for the 2024 release
get_chrr_measure_data(
geography = "county",
measure = "premature death",
release_year = 2024
)