16 April 2017

Performance of Sachin Tendulkar in ODIs

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

Dataset

The data has been saved in an excel sheet from stored it in the Working directory

Loading the dataset

Data <- read.csv("SachinStats.csv")

We shall be plotting Sachings performance over the years in terms of his average and no. of centuries.

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

">

Inference

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.