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")
library("ggplot2")
hh<-read.csv(file.choose(),header=T)
attach(hh)

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

barplot(myfreq)

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

#3rd Method
df <- data.frame(group = (Item), value = (Qty))
head(df)
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')
print(pie)

# 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))

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:

okay, I want to share dummy data of my real data but a file is not uploading

You can use datapasta package for sharing dummy data, and this is how to do it

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.