visualize_df_by_race_ethnicity_party: Create box plots to visualize race and ethnicity by party

View source: R/get_congressional_demographics.R

visualize_df_by_race_ethnicity_partyR Documentation

Create box plots to visualize race and ethnicity by party

Description

Requires a data.frame with specific column names. In practice, the data.frame is expected to come from a function like ?get_congressional_districts and then merged with a data.frame that has column "party".

Usage

visualize_df_by_race_ethnicity_party(df)

Arguments

df

A data.frame with columns "party", "percent_white", "percent_black", "percent_asian", "percent_hispanic"

Examples

data("df_congress116_demographics")
data("df_congress116_party")
df = merge(df_congress116_demographics, df_congress116_party)
# Race and Ethnicity of the 116th Congressional Districts using data from
# the 2018 5-year American Community Survey
visualize_df_by_race_ethnicity_party(df) 

choroplethr documentation built on May 29, 2024, 1:20 a.m.