State level data on population by race.
Format
A data frame with 2820 rows and 4 variables.
- state
State as 2 letter abbreviation.
- state_name
State name.
- race
race cohort for population.
- hispanic
indicates whether population is Hispanic or Latino
- population
Population of race cohort.
- state_total_population
total estimated state population in 2019
Examples
library(dplyr)
# List race population for each state with percent of total
pop_race_2019 |>
group_by(state_name, race, hispanic) |>
mutate(percent = population / state_total_population * 100) |>
select(state_name, race, hispanic, population, percent)
#> # A tibble: 408 × 5
#> # Groups: state_name, race, hispanic [408]
#> state_name race hispanic population percent
#> <chr> <chr> <chr> <dbl> <dbl>
#> 1 Alabama American Indian or Alaska Native Hispanic or L… 7823 0.160
#> 2 Alabama American Indian or Alaska Native Not Hispanic … 30433 0.621
#> 3 Alabama Asian or Pacific Islander Hispanic or L… 4833 0.0986
#> 4 Alabama Asian or Pacific Islander Not Hispanic … 80310 1.64
#> 5 Alabama Black or African American Hispanic or L… 17693 0.361
#> 6 Alabama Black or African American Not Hispanic … 1324613 27.0
#> 7 Alabama White Hispanic or L… 192929 3.93
#> 8 Alabama White Not Hispanic … 3244551 66.2
#> 9 Alaska American Indian or Alaska Native Hispanic or L… 7912 1.08
#> 10 Alaska American Indian or Alaska Native Not Hispanic … 120349 16.5
#> # ℹ 398 more rows
pop_race_2019 |>
select(state_name, state_total_population) |>
distinct() |>
arrange(desc(state_total_population))
#> # A tibble: 52 × 2
#> state_name state_total_population
#> <chr> <dbl>
#> 1 California 39512223
#> 2 Texas 28995881
#> 3 Florida 21477737
#> 4 Pennsylvania 12801989
#> 5 Illinois 12671821
#> 6 Ohio 11689100
#> 7 Georgia 10617423
#> 8 Michigan 9986857
#> 9 New Jersey 8882190
#> 10 Washington 7614893
#> # ℹ 42 more rows