- Used the assignment 2 file.
- Cleaned the data and changed some titles, changed the file name to “kickstart” to make it easy in encoding, them read the csv’s file.
- Created a visualization that displays the information from the first graph or First version of the visualization.
- The first graph including (Crowdfunded, Launched, Successful, Money. Pledged, Success. Rate, Average. Pledge)
- 4.Based on the first graph there are three bars of columns, first bar is visualizing the money pledged in dollars on the different categories, and the third bar visualizing the success rate. The bar in the middle shows as scale to the average pledge in dollar.
- Installed all the packages were required for the assignment.
- Called the libraries for our program.
- Mapped the Money. Pledged as y variable to the Launched as x variable. divided the Money. Pledged by 1000000 and add M$ = million dollar to the y axis label.
- Used the geom_point as aesthetics to scale the average. Pledge to the color and success. Rate to the size.
- Faceting by use the facet_wrap to show our categories.
- Used the “theme” buy installing the library(ggthemes) to give us the control or the text color and background of the plot and panel.
- Using the scale to format the unites by install the library(scales)
- Using the labs to label our graph.
- I tried to put almost all the details from the first version and give it the best color to make it clear to the viewer.
setwd("C:/Users/YUSUF SULTAN/AppData/Roaming/SPB_Data")
kickstart <- read.csv("kickstart.csv", header = TRUE, stringsAsFactors = FALSE)
str(kickstart)
## 'data.frame': 13 obs. of 7 variables:
## $ Crowdfunded : chr "Games" "Film & Video" "Design" "Music" ...
## $ Launched : int 2796 9600 1882 9086 831 5634 1828 3783 1170 1787 ...
## $ Successful : int 911 3891 759 5067 312 1666 688 1837 542 1194 ...
## $ Money.pledged : int 83144565 57951876 50124041 34953600 29003932 15311251 11117486 10477939 9242233 7084968 ...
## $ Pledges : int 1378143 647361 536469 522441 270912 262738 138204 155782 177070 95225 ...
## $ Success.rate : num 32.6 40.5 40.3 55.8 37.5 29.6 37.6 48.6 46.3 66.8 ...
## $ Average.pledge: num 60.3 89.5 93.4 66.9 107.1 ...
library(ggthemes)
library(scales)
library(ggplot2)
CrowdfundedProjects <-ggplot(kickstart,aes(Launched , Money.pledged/1000000))+
geom_point(aes(colour = Average.pledge , size = Success.rate)) +
facet_wrap(~Crowdfunded)+
theme(axis.text.x=element_text(color = "black",angle = 90, hjust = 1, face="bold"),axis.text.y=element_text(color = "black", face="bold"), panel.background = element_rect(fill = "#F5D0A9", color = "black"), plot.background = element_rect(fill = "#F7BE81", color = "black"))+
scale_y_continuous(breaks = c(0, 20, 40,60,80))+
scale_x_continuous(breaks = c(3500, 6500, 10000),label=dollar_format())+
scale_color_continuous(label=dollar_format())
CrowdfundedProjects+labs(title = "Crowdfunded Projects on Kickstarter in 2012" ,x = "Crowdfunded Launched",y = "Money.pledged in Million($)", size = "Success.Rate (%)", color = "Average.pledge ($)", face="bold",subtitle = "Source :Company reports, based on First version of the visulization",caption = "(*Fully funded projects as % of all projects)")
