County Health Rankings Codebook

In support of Labs for 432

Author

Thomas E. Love, Ph.D.

Published

2025-01-06

R Packages and Data Ingest

library(gt)
library(naniar)
library(easystats)
library(tidyverse)

lovedist <- function(x) {
  tibble::tibble(
    n = length(x),
    miss = sum(is.na(x)),
    mean = mean(x, na.rm = TRUE),
    sd = sd(x, na.rm = TRUE),
    med = median(x, na.rm = TRUE),
    mad = mad(x, na.rm = TRUE),
    min = min(x, na.rm = TRUE),
    q25 = quantile(x, 0.25, na.rm = TRUE),
    q75 = quantile(x, 0.75, na.rm = TRUE),
    max = max(x, na.rm = TRUE),
  )
}
chr2015 <- read_csv("https://raw.githubusercontent.com/THOMASELOVE/432-data/refs/heads/master/data/chr_2015.csv", show_col_types = FALSE)
chr2024 <- read_csv("https://raw.githubusercontent.com/THOMASELOVE/432-data/refs/heads/master/data/chr_2024.csv", show_col_types = FALSE)

Data Source

The data come from County Health Rankings, specifically the 2024 and 2015 reports.

Variable Descriptions

Variable NHANES Summary Definition CHR 2024 describes CHR 2015 describes
FIPS_code fipscode with C- five-digit FIPS code unique five-digit FIPS code preceded by C- 3054 values 3054 values
state state USPS state abbreviation 50 states + District of Columbia (DC) 51 values 51 values
county county county name chr_2024 and chr_2015 contain the same counties 3054 counties 3054 counties
release year Release Year Date for CHR Data Release 2024 2015
prem_death v001_rawvalue x 0.01 Premature death Years of potential life lost before age 75 per 1,000 population (age-adjusted) 2019-2021 2010-2012
pf_health v002_rawvalue x 100 Poor or fair health Percentage of adults reporting fair or poor health (age-adjusted) 2021 2006-2012
poor_phys v036_rawvalue Poor physical health days Average number of physically unhealthy days reported in past 30 days (age-adjusted). 2021 2006-2012
poor_ment v042_rawvalue Poor mental health days Average number of mentally unhealthy days reported in past 30 days (age-adjusted). 2021 2006-2012
low_bwt v037_rawvalue x 100 Low birthweight Percentage of live births with low birthweight (< 2,500 grams) 2016-2022 2006-2012
smoking v009_rawvalue x 100 Adult smoking Percentage of adults who are current smokers (age-adjusted) 2021 2006-2012
obesity v011_rawvalue Adult obesity Percentage of the adult population (age 18 and older) that reports a body mass index (BMI) greater than or equal to 30 kg/m2 (age-adjusted) 2021 2011
food_env v133_rawvalue Food environment index Index of factors that contribute to a healthy food environment, from 0 (worst) to 10 (best) 2019 & 2021 2012
drinking v049_rawvalue x 100 Excessive drinking Percentage of adults reporting binge or heavy drinking (age-adjusted) 2021 2006-2012
sti_rate v045_rawvalue Sexually transmitted infections Number of newly diagnosed chlamydia cases per 100,000 population 2021 2012
unins v085_rawvalue x 100 Uninsured Percentage of population under age 65 without health insurance 2021 2012
pcp_rate 1 / v004_rawvalue Primary care physicians Ratio of population to primary care physicians 2021 2012
mammog v050_rawvalue x 100 Mammography screening Percentage of female Medicare enrollees ages 65-74 who received an annual mammography screening 2021 2012
hsgrad v021_rawvalue x 100 High school graduation Percentage of ninth-grade cohort that graduates in four years 2020-2021 2011-2012
unemp v023_rawvalue Unemployment x 100 Percentage of population ages 16 and older unemployed but seeking work 2022 2013
inc_ineq v044_rawvalue Income inequality Ratio of household income at the 80th percentile to income at the 20th percentile 2018-2022 2009-2013
social v140_rawvalue Social associations Number of membership associations per 10,000 population 2021 2012
med_inc v063_rawvalue x 0.001 Median household income The income (in thousands of dollars) where half of households in a county earn more and half of households earn less 2018-2022 2013
sev_hous v136_rawvalue x 100 Severe housing problems Percentage of households with at least 1 of 4 housing problems: overcrowding, high housing costs, lack of kitchen facilities, or lack of plumbing facilities 2016-2020 2007-2011
commute v137_rawvalue x 100 Long commute - driving alone Among workers who commute in their car alone, percentage that commute more than 30 minutes 2018-2022 2009-2013
popn v051_rawvalue Population Resident population (number of residents) 2022 2013
age65up v053_rawvalue x 100 Age 65 and older Percentage of population ages 65 and older 2022 2013
nh_white v126_rawvalue x 100 Non-Hispanic white Percentage of population identifying as non-Hispanic white 2022 2013
non_eng v059_rawvalue x 100 Not proficient in English Percentage of population aged 5 and over who reported speaking English less than well 2018-2022 2009-2013
female v057_rawvalue x 100 Female Percentage of population identifying as female 2022 2013
rural v058_rawvalue x 100 Rural Percentage of population living in a census-defined rural area 2020 2010

Numerical Summaries

Premature Death Rate

bind_rows(
  chr2015 |>
    reframe(lovedist(prem_death)),
  chr2024 |>
    reframe(lovedist(prem_death))) |>
  mutate(CHR = c(2015, 2024),
         var = c("prem_death", "prem_death")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 prem_death 3054 0 79.63296 24.01601 76.745 22.48363 21.01 62.9625 93.2600 238.80
2024 prem_death 3054 0 98.32840 34.26893 93.700 31.11977 24.18 74.4100 116.9675 411.52

Poor or Fair Health

bind_rows(
  chr2015 |>
    reframe(lovedist(pf_health)),
  chr2024 |>
    reframe(lovedist(pf_health))) |>
  mutate(CHR = c(2015, 2024),
         var = c("pf_health", "pf_health")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 pf_health 3054 347 17.32837 6.107532 16.6 6.07866 4.5 12.7 20.95 50.8
2024 pf_health 3054 0 17.78048 4.526644 17.0 4.59606 8.4 14.3 20.90 38.0

Poor physical health days

bind_rows(
  chr2015 |>
    reframe(lovedist(poor_phys)),
  chr2024 |>
    reframe(lovedist(poor_phys))) |>
  mutate(CHR = c(2015, 2024),
         var = c("poor_phys", "poor_phys")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 poor_phys 3054 285 3.840014 1.1382737 3.7 1.03782 1.2 3.1 4.4 10.0
2024 poor_phys 3054 0 3.904486 0.6452397 3.9 0.74130 2.3 3.4 4.3 6.4

Poor mental health days

bind_rows(
  chr2015 |>
    reframe(lovedist(poor_ment)),
  chr2024 |>
    reframe(lovedist(poor_ment))) |>
  mutate(CHR = c(2015, 2024),
         var = c("poor_ment", "poor_ment")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 poor_ment 3054 490 3.575156 1.0266347 3.5 0.88956 1.0 2.9 4.1 10.1
2024 poor_ment 3054 0 5.230354 0.6084771 5.2 0.59304 3.2 4.8 5.6 7.4

Low birthweight

bind_rows(
  chr2015 |>
    reframe(lovedist(low_bwt)),
  chr2024 |>
    reframe(lovedist(low_bwt))) |>
  mutate(CHR = c(2015, 2024),
         var = c("low_bwt", "low_bwt")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 low_bwt 3054 29 8.202347 2.083931 7.9 1.77912 2.9 6.8 9.2 18.0
2024 low_bwt 3054 29 8.361917 2.095554 8.1 1.77912 3.1 6.9 9.3 19.2

Adult smoking

bind_rows(
  chr2015 |>
    reframe(lovedist(smoking)),
  chr2024 |>
    reframe(lovedist(smoking))) |>
  mutate(CHR = c(2015, 2024),
         var = c("smoking", "smoking")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 smoking 3054 365 21.28442 6.287341 20.8 5.78214 3.1 17.0 24.9 51.1
2024 smoking 3054 0 19.08504 4.065791 18.8 3.70650 7.0 16.4 21.6 43.0

Adult obesity

bind_rows(
  chr2015 |>
    reframe(lovedist(obesity)),
  chr2024 |>
    reframe(lovedist(obesity))) |>
  mutate(CHR = c(2015, 2024),
         var = c("obesity", "obesity")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 obesity 3054 0 30.74096 4.352451 31.0 3.70650 12.0 28.5 33.4 48.1
2024 obesity 3054 0 37.39800 4.556928 37.7 3.85476 17.4 35.1 40.3 52.5

Food environment index

bind_rows(
  chr2015 |>
    reframe(lovedist(food_env)),
  chr2024 |>
    reframe(lovedist(food_env))) |>
  mutate(CHR = c(2015, 2024),
         var = c("food_env", "food_env")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 food_env 3054 0 7.110642 1.223480 7.3 1.03782 0 6.5 7.9 10
2024 food_env 3054 30 7.575595 1.161079 7.7 1.03782 0 6.9 8.4 10

Excessive drinking

bind_rows(
  chr2015 |>
    reframe(lovedist(drinking)),
  chr2024 |>
    reframe(lovedist(drinking))) |>
  mutate(CHR = c(2015, 2024),
         var = c("drinking", "drinking")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 drinking 3054 859 16.42579 5.098082 16.2 5.04084 3.2 12.8 19.5 56.2
2024 drinking 3054 0 16.84790 2.630048 16.9 2.52042 9.0 15.0 18.5 26.8

Sexually transmitted infections

bind_rows(
  chr2015 |>
    reframe(lovedist(sti_rate)),
  chr2024 |>
    reframe(lovedist(sti_rate))) |>
  mutate(CHR = c(2015, 2024),
         var = c("sti_rate", "sti_rate")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 sti_rate 3054 109 365.5041 263.4221 290.30 167.0890 39.2 197.500 449.700 2854.3
2024 sti_rate 3054 106 390.3388 262.2673 313.55 178.2085 26.0 217.075 497.125 3467.6

Uninsured

bind_rows(
  chr2015 |>
    reframe(lovedist(unins)),
  chr2024 |>
    reframe(lovedist(unins))) |>
  mutate(CHR = c(2015, 2024),
         var = c("unins", "unins")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 unins 3054 0 17.45337 5.296112 17.3 5.48562 2.9 13.5 20.8 38.6
2024 unins 3054 0 11.44751 5.192413 10.3 4.89258 2.4 7.4 14.5 38.7

Primary care physicians

bind_rows(
  chr2015 |>
    reframe(lovedist(pcp_rate)),
  chr2024 |>
    reframe(lovedist(pcp_rate))) |>
  mutate(CHR = c(2015, 2024),
         var = c("pcp_rate", "pcp_rate")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 pcp_rate 3054 143 2580.205 2129.174 1989 1036.337 210 1381 2922.5 20936
2024 pcp_rate 3054 167 2820.442 2463.584 2107 1217.215 172 1404 3266.0 29081

Mammography screening

bind_rows(
  chr2015 |>
    reframe(lovedist(mammog)),
  chr2024 |>
    reframe(lovedist(mammog))) |>
  mutate(CHR = c(2015, 2024),
         var = c("mammog", "mammog")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 mammog 3054 37 60.74147 8.150897 61 7.413 24 56 66 84
2024 mammog 3054 8 41.73539 7.991924 42 7.413 6 37 47 64

High school graduation

bind_rows(
  chr2015 |>
    reframe(lovedist(hsgrad)),
  chr2024 |>
    reframe(lovedist(hsgrad))) |>
  mutate(CHR = c(2015, 2024),
         var = c("hsgrad", "hsgrad")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 hsgrad 3054 389 83.15872 9.321982 85 8.8956 20 78 90 100
2024 hsgrad 3054 591 88.53187 6.707152 90 4.4478 22 85 93 100

Unemployment

bind_rows(
  chr2015 |>
    reframe(lovedist(unemp)),
  chr2024 |>
    reframe(lovedist(unemp))) |>
  mutate(CHR = c(2015, 2024),
         var = c("unemp", "unemp")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 unemp 3054 0 7.320563 2.627749 7 2.9652 1 6 9 28
2024 unemp 3054 0 3.603143 1.248518 3 1.4826 1 3 4 15

Income inequality

bind_rows(
  chr2015 |>
    reframe(lovedist(inc_ineq)),
  chr2024 |>
    reframe(lovedist(inc_ineq))) |>
  mutate(CHR = c(2015, 2024),
         var = c("inc_ineq", "inc_ineq")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 inc_ineq 3054 0 4.490596 0.7020046 4.39 0.607866 2.63 4.02 4.84 9.65
2024 inc_ineq 3054 0 4.535301 0.8488547 4.43 0.681996 0.00 4.02 4.94 9.51

Social associations

bind_rows(
  chr2015 |>
    reframe(lovedist(social)),
  chr2024 |>
    reframe(lovedist(social))) |>
  mutate(CHR = c(2015, 2024),
         var = c("social", "social")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 social 3054 0 13.74706 6.571020 12.585 5.070492 0 9.5150 16.5400 59.27
2024 social 3054 0 11.43965 5.515214 10.840 4.447800 0 8.0425 14.1275 48.22

Median household income

bind_rows(
  chr2015 |>
    reframe(lovedist(med_inc)),
  chr2024 |>
    reframe(lovedist(med_inc))) |>
  mutate(CHR = c(2015, 2024),
         var = c("med_inc", "med_inc")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 med_inc 3054 0 45.97718 11.71013 44.0 9.93342 21.6 38.1 51.475 117.7
2024 med_inc 3054 0 63.26847 16.35805 60.8 13.34340 29.0 52.4 70.500 167.6

Severe housing problems

bind_rows(
  chr2015 |>
    reframe(lovedist(sev_hous)),
  chr2024 |>
    reframe(lovedist(sev_hous))) |>
  mutate(CHR = c(2015, 2024),
         var = c("sev_hous", "sev_hous")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 sev_hous 3054 0 14.39659 4.648617 13.8 3.85476 2.5 11.3 16.7 62.4
2024 sev_hous 3054 0 12.84420 4.213573 12.2 3.26172 2.0 10.2 14.8 57.7

Long commute - driving alone

bind_rows(
  chr2015 |>
    reframe(lovedist(commute)),
  chr2024 |>
    reframe(lovedist(commute))) |>
  mutate(CHR = c(2015, 2024),
         var = c("commute", "commute")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 commute 3054 0 30.00891 11.99093 29.2 12.75036 0 20.9 38.400 70.5
2024 commute 3054 0 33.22642 12.61378 32.7 13.49166 0 23.7 41.975 73.3

Population

bind_rows(
  chr2015 |>
    reframe(lovedist(popn)),
  chr2024 |>
    reframe(lovedist(popn))) |>
  mutate(CHR = c(2015, 2024),
         var = c("popn", "popn")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 popn 3054 0 103463.3 326547.2 27150.0 27851.38 1179 12126.50 69767.25 10017068
2024 popn 3054 0 109078.6 336911.3 27033.5 28471.11 1057 11846.25 72145.00 9721138

Age 65 and older

bind_rows(
  chr2015 |>
    reframe(lovedist(age65up)),
  chr2024 |>
    reframe(lovedist(age65up))) |>
  mutate(CHR = c(2015, 2024),
         var = c("age65up", "age65up")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 age65up 3054 0 17.05972 4.284420 16.8 3.85476 3.8 14.3 19.4 51.6
2024 age65up 3054 0 20.35498 4.738572 20.0 4.15128 5.4 17.3 22.9 57.5

Non-Hispanic white

bind_rows(
  chr2015 |>
    reframe(lovedist(nh_white)),
  chr2024 |>
    reframe(lovedist(nh_white))) |>
  mutate(CHR = c(2015, 2024),
         var = c("nh_white", "nh_white")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 nh_white 3054 0 77.33101 19.75793 84.75 15.34491 3.2 65.8 93.3 98.2
2024 nh_white 3054 0 74.77685 20.21175 81.80 16.90164 2.8 63.0 91.2 97.5

Not proficient in English

bind_rows(
  chr2015 |>
    reframe(lovedist(non_eng)),
  chr2024 |>
    reframe(lovedist(non_eng))) |>
  mutate(CHR = c(2015, 2024),
         var = c("non_eng", "non_eng")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 non_eng 3054 0 1.810544 2.913281 0.8 0.88956 0 0.3 2.0 29.7
2024 non_eng 3054 0 1.574263 2.536232 0.7 0.74130 0 0.3 1.7 32.1

Female

bind_rows(
  chr2015 |>
    reframe(lovedist(female)),
  chr2024 |>
    reframe(lovedist(female))) |>
  mutate(CHR = c(2015, 2024),
         var = c("female", "female")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 female 3054 0 49.97472 2.214339 50.4 1.03782 29.9 49.6 51.0 57.0
2024 female 3054 0 49.55688 2.257926 49.9 1.18608 27.0 49.0 50.7 57.8

Rural

bind_rows(
  chr2015 |>
    reframe(lovedist(rural)),
  chr2024 |>
    reframe(lovedist(rural))) |>
  mutate(CHR = c(2015, 2024),
         var = c("rural", "rural")) |>
  relocate(CHR, var, everything()) |> gt()
CHR var n miss mean sd med mad min q25 q75 max
2015 rural 3054 0 57.48415 31.15573 58.3 37.80630 0 32.525 83.4 100
2024 rural 3054 0 63.03124 33.51602 64.7 52.33578 0 34.800 100.0 100