I'm trying to split my graph so into +/- on the x axis... meaning show negatives to the left of zero and positive comments to the right. Right now, they are all lumped together. When we do this it's important that the "count of occurrences" is still reflected like in the original graph.
Here is my head(df)
> head(df)
Journey.Area Experience.Framework Postive.or.Negative
1 Installing People/Associate 1
2 Using Product Execution -1
3 Installing People/Associate 1
4 Delivery Execution -1
5 Installing People/Associate -1
6 Delivery People/Associate 1
Here is my put(head(df))
> dput(head(df))
structure(list(Journey.Area = c("Installing", "Using Product",
"Installing", "Delivery", "Installing", "Delivery"), Experience.Framework = c("People/Associate",
"Execution", "People/Associate", "Execution", "People/Associate",
"People/Associate"), Postive.or.Negative = c(1L, -1L, 1L, -1L,
-1L, 1L)), row.names = c(NA, 6L), class = "data.frame")
Here is my code for the current graph. How do I change it so that it graphs the Positive.or.Negative one direction of zero or the other as applicable:
library(ggplot2)
library(dplyr)
df %>%
mutate(Journey.Area = factor(Journey.Area,
levels = c("Getting Assistance", "Returning", "Using Product", "Installing",
"Delivery", "Pickup", "Anticipating", "Buying",
"Deciding How to Buy", "Browsing"))) %>%
count(Journey.Area,Experience.Framework) %>%
ggplot(aes(Journey.Area,n,fill=Experience.Framework)) +
geom_col(position = "dodge") +
coord_flip() +
labs(fill="", x="Customer Journey Area", y="User Experience Framework") +
theme(legend.position = "bottom") + ggtitle("Customer Sentiment Matrix") +
theme(plot.title = element_text(hjust = 0.5))


