Data visualization with large Data ( more than 50000 observation of sales data with 49 variable)



I want Help regarding Data Visualization by ggplot2 or other code

I have more than 50000 observation of sales data
here 49 variable
I want to prepare pie chat and % pie chart with name and waterfall chart with the name in R programming
I tried pie chart but categories overlapped
I want to prepare % pie chart with name Item (more than 30 categories of Items) between Quantity of Item's sale and also want waterfall Chart or bar Chart in R.

please help

# install.packages("ggplot2")

#1st methods 
myfreq <- table(hh$Item)
cols <- rainbow(nrow(hh))


#2nd cols <- rainbow(nrow(hh))
myfreq <- table(hh$Qty,hh$Item)

#3rd Method
df <- data.frame(group = (Item), value = (Qty))
bp<- ggplot(df, aes(x="group", y=value, fill=group),color=cols)
bp<- ggplot(df, aes(x="group", y=value),color=cols)
pie <- bp + coord_polar(theta='y')

# I also tried a syntax but syntax is not running 
pie(myfreq,labels=paste0(round(myfreq/sum(myfreq)*100,2),'%'),col=cols, legend('bottom',legend=Qty,Item,pch='???',ncol=nrow(hh),bty='n',col=cols))


This post was flagged by the community and is temporarily hidden.


Hi @puneetg061! Thanks very much for providing your code; it makes helping a lot easier. Instead of using file.choose(), could you also please give us some sample data? Or, if you can't share your acetal data for confidentiality reasons, some synthetic data that looks similar? That makes understanding your code much easier for us :smile: