visualize_df_by_race_ethnicity_party {choroplethr} | R 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)
[Package choroplethr version 3.7.3 Index]