Using ggplot2 I am trying to create a grouped AND stacked barchart without using faceting. I want to avoid faceting, because I need to facet on years once I have a grouped and stacked barchart for the variables provided in the example.
This is the best solution so far:
df <- data.frame("industry"=c("A","A", "B", "B", "C", "C",
"A","A", "B", "B", "C", "C"),
"value"=c(4,6,7,1, 5,9,8,3, 5,5,6,7),
"woman"=c(1,0,1,0,1,0,1,0,1,0,1,0),
"disabled"=c(1,1,1,1,1,1,0,0,0,0,0,0))
ggplot(df,aes(paste(industry,disabled),value))+
geom_col(aes(fill=factor(woman)))+
coord_flip()
This is basically what I want (see link above), but the bars should be grouped within each industry, using just one label for industry for both values of disabled. No label needed for disabled. The disabled=0 bars should have a faded color compared to the disabled=1 bars.
The intention of the chart is to display the distribution of employment across industries for the disabled population, compared to the general population (faded) and to show gender proportions for each population. (Values in example just for illustration).