I have a dictionary of dictionaries called data
. I want to plot a bar chart so that each of A
, B
, C
, and D
have a value for the pos
and neg
.
I don't want the pos
and neg
bars to be stacked on top of each other. I want them side by side.
Additionally, I want the categories to be sorted by descending order of their total frequency (pos + neg
)
data = {'A': {'pos': 289794, 'neg': 515063},
'B': {'pos': 174790, 'neg': 292551},
'C': {'pos': 375574, 'neg': 586616},
'D': {'pos': 14932, 'neg': 8661}}