An overview of 14 years of buying pattern in Indian automobile industry
Sangamesh K S
March 14, 2018
Today in this article we will pick the dataset from Indian automobile industry and try to look at the overall sales and pattern of Indian automobile industry.
Introduction
The dataset is collected from the government website data.gov.in which is a free dataset provider and if you desire to get the dataset you can visit:https://data.gov.in/catalog/category-wise-automobile-production
With the dataset we will load the dataset, transform, plot and decompose the data. I am not going to cover the predictive modeling, if interested you can go for any regression or time series forecasting for the same.
This article also shows how economic slowdown and recession have impacted the Indian economy and automobile industry. Visa versa how economic growth have contributed to Indian automobile industry
We will load the dataset and look at the head
df<-read.csv("C:/Users/Sangmesh/Downloads/Table-20.6-All_India_SYB2016_1.csv")
head(df)
## Category Segment X2001.02
## 1 Passenger Vehicles (PVs) Passenger Cars 500301
## 2 Passenger Vehicles (PVs) Multi-Utility Vehicles 169418
## 3 Passenger Vehicles (PVs) Total Passenger Vehicles (PVs) 669719
## 4 Commercial Vehicles - M & HCVs Passenger Carriers 20283
## 5 Commercial Vehicles - M & HCVs Goods Carriers 76469
## 6 Commercial Vehicles - M & HCVs Total M & HCVs 96752
## X2002.03 X2003.04 X2004.05 X2005.06 X2006.07 X2007.08 X2008.09 X2009.10
## 1 557410 782562 960487 1046133 1238032 1426212 1516967 1932620
## 2 165920 206998 249389 263167 307202 351371 321626 424791
## 3 723330 989560 1209876 1309300 1545234 1777583 1838593 2357411
## 4 21156 27628 30419 28982 32828 46542 40995 46026
## 5 99346 138495 184388 190313 261438 248415 151288 204145
## 6 120502 166123 214807 219295 294266 294957 192283 250171
## X2010.2011 X2011.12 X2012.13 X2013.14 X2014.15
## 1 2453113 2775124 2668633 2519281 2590917
## 2 534183 370945 564928 568692 629255
## 3 2987296 3146069 3233561 3087973 3220172
## 4 54552 54156 50024 41175 49360
## 5 289990 330645 228536 180381 219193
## 6 344542 384801 278560 221556 268553
We will rename the column and remove the row 17 and 19 which are unnecessary
colnames(df)<-c("Category","Segment",2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014)
df<-df[-c(17,19),]
Three-wheeler Auto Sales Pattern in India from 2001 to 2014
Now let’s plot the data. We have select the data which is in 17th row and then transpose t() the data, remove the categorical names, convert it to numeric and then the data is good to plot.
auto<-t(df[11,])
auto<-as.numeric(auto[-c(1,2),])
plot(auto,type = "b",xlab = "Year",main = "Yearly sales of Passenger Auto")
We are able to see an upside trend in the auto sales data. Now let’s see is decomposed in time series. For which we will do a small trick we will decompose 2 years into one and plot 2001 to 2014 as 1 to 7 years. As we can’t decompose the dataset for single observation.
library(TTR)
plot(decompose(ts(auto,frequency = 2,start = c(1:14))))
Passanger cab Sales Pattern in India from 2001 to 2014
Now let’s plot the data. We have select the data which is in 7th row and then transpose t() the data, remove the categorical names, convert it to numeric and then the data is good to plot.
cab<-t(df[7,])
cab<-as.numeric(cab[-c(1,2),])
plot(cab,type = "b",xlab = "Year",main = "Yearly sales of Passenger cab")
Now let’s decompose the data as the previous one where we will merge 14 into 7 years
plot(decompose(ts(cab,frequency = 2,start = c(1:14))))
Passanger bike Sales Pattern in India from 2001 to 2014
Now let’s plot the data. We have select the data which is in 14th row and then transpose t() the data, remove the categorical names, convert it to numeric and then the data is good to plot.
bike<-t(df[14,])
bike<-as.numeric(bike[-c(1,2),])
plot(bike,type = "b",xlab = "Year",main = "Yearly sales of Passenger Bike")
Now let`s decompose the data as the previous one where we will merge 14 into 7 years
plot(decompose(ts(bike,frequency = 2,start = c(1:14))))
Passanger bike Sales Pattern in India from 2001 to 2014
Now let’s plot the data. We have select the data which is in 1st row and then transpose t() the data, remove the categorical names, convert it to numeric and then the data is good to plot.
car<-t(df[1,])
car<-as.numeric(car[-c(1,2),])
plot(car,type = "b",xlab = "Year",main = "Yearly sales of Passenger Car")
Now lets decompose the data as the previous one where we will merge 14 into 7 years
plot(decompose(ts(bike,frequency = 2,start = c(1:14))))
Conclusion
We have looked into only 4 segments i.e. Bike, cabs, Auto and car. If you are interested you can try various other segments and try out other combinations like predictive forecasting.
This article was able to demonstrate how coding and analytics can be used for understanding patterns in the time series.
In article also able to find a unique pattern in the data. Wherein when there was slowdown or recession the markets like auto, cab and car have shown a downtrend but two wheeler markets have shown an exponential growth.
No comments:
Post a Comment