R language and R studio

DATA MANAGEMENT
In my data management and analytics, we have been lead to use the R language. R is a free software environment for statistical computing and graphics. It compiles and runs with Windows and MacOS. To get initiated to it, we have been invited by our lecturer to do a learning trial “Try R”. This course powered by Code School, help us to listening how the R language works. But also, gives us some examples and some uses of R. with for example the history with the pirates what lets us the way we can use statistical functions as the median and the average function.
To confirm that I have complete all the steps of the tutorial of using R, here is a picture of the end of the course.

This course makes us, want to explore more the Rstudio, programme what let us, use R and even if we erase the code we have wright it will not erase the console neither the saved data and values. That is very useful and productive to fallow in real time what you are doing.

So, to use Rstudio, I have use some data I have fond on the internet. I love cars so I have chosen some data concerning automobiles. In it case, I chose Volkswagen or VW for the lovers. VW is one of the most knows companies I automobile, business but also one of the biggest conglomerates in the sector.
Make a little of history, VW was founded by Ferdinand PORSCHE, father of Ferry PORSCHE the creator of Porsche. VW is also known by the car of the people’s car during the 2-world war during the reign of Hitler.
Today VW regroup different brands in the automobile sector: Porsche, Bugatti, Lamborghini, Audi, Seat, Skoda, Bentley. VW is presents in all the sector of the automobile industries from the super luxe to the low-cost ones. But the brand is also presents in the truck and the motorbike sector with Scania, MAN and Ducati.
But for my study I will just take be concerned about Volkswagen as a brand. Using R I have make appear the sales of Volkswagen for the last 6 years 2010 to 2016. I have found this data in a French magazine I use to read. Who give me the sales of the brands in Europe per year.

Marque Ventes 2010 Ventes 2011 Ventes 2012 Ventes 2013 Ventes 2014 Ventes 2015 Ventes 2016
Volkswagen 1 543 227 1 683 244 1 605 212 1 547 235 1 616 234 1 728 388 1 720 829
Renault 1 147 436 1 045 203 816 866 801 795 874 998 975 453 1 100 880
Ford 1 125 674 1 089 816 947 738 918 539 960 292 1 013 894 1 043 295
Opel 1 007 068 990 150 834 202 822 560 885 990 942 148 993 494
Peugeot 1 005 992 911 825 793 383 740 786 785 243 856 194 865 374
Mercedes 591 558 593 525 597 476 622 835 659 092 737 278 839 779
Audi 623 634 679 812 703 464 692 844 725 436 768 629 830 956
BMW 610 077 645 547 644 418 640 887 675 939 748 525 821 525
Fiat 827 373 683 916 581 997 572 937 585 775 656 638 746 126
Skoda 466 935 494 518 490 593 510 464 581 411 617 616 663 230
Toyota 608 433 559 607 541 834 543 115 532 986 565 906 606 301
Nissan 403 311 459 340 432 814 422 036 477 740 556 914 550 412

Has you can see Volkswagen is the first brand in Europe for the last 6 years. I have chosen this brand because of the polemic of the DIESELGATE that the company had been confronted to in September 2015. This polemic who have chocked the automobile world by is amplitude and who have seen the shares of Volkswagen passing from 250 dollars to 90 in 5 months. So, to see if the size of the impact for the VW sales, I have decided to use R and package “ggplot2” to show me it.

This what I have wright in Rstudio:

dat<-data.frame(
Year= factor(c(“Sales_2010″,”Sales_2011″,”Sales_2012″,”Sales_2013″,”Sales_2014″,”Sales_2015″,”Sales_2016”),
levels = c(“Sales_2010″,”Sales_2011″,”Sales_2012″,”Sales_2013″,”Sales_2014″,”Sales_2015″,”Sales_2016”)),
Volkswagen=c(1543227,1683244,1605212,1547235,1616234,1728388,1720829)
)
dat
install.packages(“ggplot2”)
library(“ggplot2″)
ggplot(data=dat, aes(x=Year, y=Volkswagen)) +
geom_bar(stat=”identity”)+ggtitle(“Sales of Volkswagen between 2010 and 2016”)

As you can see in the previous graphic the sales of the brand had not been really affected by this crisis. Here you can see that the difference between the last 2 plots is not very impressive. The difference is under 8000. Yes 8000 can be a big number but for a group as Volkswagen is a grain of sand in the dessert. So, this crisis doesn’t have affect the sales. But what about the turnover???
That could be an interesting new study.

Leave a Reply

Your email address will not be published. Required fields are marked *