In the this assignment we will try to plot the Performance of Sachin in ODIs till 2010 where he made his highest score of 200 runs
16 April 2017
In the this assignment we will try to plot the Performance of Sachin in ODIs till 2010 where he made his highest score of 200 runs
The data has been saved in an excel sheet from stored it in the Working directory
Data <- read.csv("SachinStats.csv")
library(plotly)
## Warning: package 'plotly' was built under R version 3.3.3
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 3.3.2
## ## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2': ## ## last_plot
## The following object is masked from 'package:stats': ## ## filter
## The following object is masked from 'package:graphics': ## ## layout
p<- plot_ly(data=Data, x = ~Year, y = ~ Matches, color=~ Average, type="bar")%>% add_bars(data=Data,x =~Year, y =~ X100.s)%>% layout(title="Performance of Sachin Tendulkar from 1989 to 2010", xaxis=list(title="Year"), yaxis=list(title="Matches,Average and Centuries")) p
## Warning in arrange_impl(.data, dots): '.Random.seed' is not an integer ## vector but of type 'NULL', so ignored
We see that Tendulkar had was in his peak during 1996,1998 and 2000. And he kind of got back to his peak form towards the end of 2009.