Used This Libraries

library(readxl)
library(tidyverse)
## ── Attaching packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.1.0     ✔ purrr   0.2.5
## ✔ tibble  1.4.2     ✔ dplyr   0.7.7
## ✔ tidyr   0.8.2     ✔ stringr 1.3.1
## ✔ readr   1.1.1     ✔ forcats 0.3.0
## ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(ggplot2)
dat <- readRDS("car_data_aggregate.rds")

head and tail of excel data

head(dat)
## # A tibble: 6 x 12
##   brand_name auto_dom auto_imp auto_total comm_dom comm_imp comm_total
##   <chr>         <dbl>    <dbl>      <dbl>    <dbl>    <dbl>      <dbl>
## 1 ALFA ROMEO        0       12         12        0        0          0
## 2 ASTON MAR…        0        2          2        0        0          0
## 3 AUDI              0      911        911        0        0          0
## 4 BENTLEY           0        0          0        0        0          0
## 5 BMW               0      496        496        0        0          0
## 6 CHERY             0       30         30        0        0          0
## # ... with 5 more variables: total_dom <dbl>, total_imp <dbl>,
## #   total_total <dbl>, year <dbl>, month <dbl>
tail(dat)
## # A tibble: 6 x 12
##   brand_name auto_dom auto_imp auto_total comm_dom comm_imp comm_total
##   <chr>         <dbl>    <dbl>      <dbl>    <dbl>    <dbl>      <dbl>
## 1 SUZUKI            0      143        143        0        0          0
## 2 TOYOTA         1254      413       1667        0      451        451
## 3 VOLKSWAGEN        0     4903       4903        0     1599       1599
## 4 VOLVO             0      213        213        0        0          0
## 5 <NA>              0        0          0        0        0          0
## 6 "ODD, ver…        0        0          0        0        0          0
## # ... with 5 more variables: total_dom <dbl>, total_imp <dbl>,
## #   total_total <dbl>, year <dbl>, month <dbl>

Time to make some analysis

Firstly, we should learn brand names.

dat %>% 
  select(brand_name) 
## # A tibble: 1,400 x 1
##    brand_name  
##    <chr>       
##  1 ALFA ROMEO  
##  2 ASTON MARTÄ°N
##  3 AUDI        
##  4 BENTLEY     
##  5 BMW         
##  6 CHERY       
##  7 CITROEN     
##  8 DACIA       
##  9 DS          
## 10 FERRARI     
## # ... with 1,390 more rows

On the below, automobiles which sold more than others in 2016,2017,2018.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% 
  arrange(desc(auto_total)) %>% filter(brand_name != 'TOPLAM:')
## # A tibble: 1,389 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 RENAULT         18490    11492        0      9586     11492  2016    12
##  2 RENAULT         16240    11420        0      7634     11420  2017    12
##  3 VOLKSWAGEN      14539        0        0     18082         0  2016    12
##  4 VOLKSWAGEN      13003        0        0     16293         0  2017    12
##  5 RENAULT         11975     7692        0      6292      7692  2017    11
##  6 RENAULT         11275     7292        0      5449      7292  2016     5
##  7 RENAULT         11135     7905        0      4328      7905  2017     6
##  8 RENAULT         10831     6905        0      5855      6905  2016    11
##  9 RENAULT         10633     7297        0      4778      7297  2016     4
## 10 VOLKSWAGEN      10587        0        0     14359         0  2016    11
## # ... with 1,379 more rows
result1 <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% 
  arrange(desc(auto_total)) %>% filter(brand_name != 'TOPLAM:')

Analysis for ALFA ROMEO

Most automobile sales for Alfa Romeo.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'ALFA ROMEO') %>% arrange(desc(auto_total))
## # A tibble: 30 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 ALFA ROMEO        149        0        0       149         0  2016     3
##  2 ALFA ROMEO         75        0        0        75         0  2016     2
##  3 ALFA ROMEO         68        0        0        68         0  2016     5
##  4 ALFA ROMEO         59        0        0        59         0  2017     3
##  5 ALFA ROMEO         58        0        0        58         0  2016     4
##  6 ALFA ROMEO         53        0        0        53         0  2016    11
##  7 ALFA ROMEO         43        0        0        43         0  2017     2
##  8 ALFA ROMEO         38        0        0        38         0  2016    12
##  9 ALFA ROMEO         33        0        0        33         0  2016     7
## 10 ALFA ROMEO         32        0        0        32         0  2016     9
## # ... with 20 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'ALFA ROMEO') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 ALFA ROMEO         32        0        0        32         0  2018     4
## 2 ALFA ROMEO         25        0        0        25         0  2018     5
## 3 ALFA ROMEO         15        0        0        15         0  2018     8
## 4 ALFA ROMEO         14        0        0        14         0  2018     7
## 5 ALFA ROMEO         14        0        0        14         0  2018     2
## 6 ALFA ROMEO         13        0        0        13         0  2018     9
## 7 ALFA ROMEO         10        0        0        10         0  2018     6
## 8 ALFA ROMEO          5        0        0         5         0  2018     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'ALFA ROMEO') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'ALFA ROMEO') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 ALFA ROMEO         59        0        0        59         0  2017     3
##  2 ALFA ROMEO         43        0        0        43         0  2017     2
##  3 ALFA ROMEO         27        0        0        27         0  2017    12
##  4 ALFA ROMEO         27        0        0        27         0  2017     4
##  5 ALFA ROMEO         26        0        0        26         0  2017    11
##  6 ALFA ROMEO         24        0        0        24         0  2017     6
##  7 ALFA ROMEO         24        0        0        24         0  2017     5
##  8 ALFA ROMEO         21        0        0        21         0  2017    10
##  9 ALFA ROMEO         19        0        0        19         0  2017     8
## 10 ALFA ROMEO         18        0        0        18         0  2017     7
## 11 ALFA ROMEO         17        0        0        17         0  2017     1
## 12 ALFA ROMEO         15        0        0        15         0  2017     9
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'ALFA ROMEO') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'ALFA ROMEO') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 10 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 ALFA ROMEO        149        0        0       149         0  2016     3
##  2 ALFA ROMEO         75        0        0        75         0  2016     2
##  3 ALFA ROMEO         68        0        0        68         0  2016     5
##  4 ALFA ROMEO         58        0        0        58         0  2016     4
##  5 ALFA ROMEO         53        0        0        53         0  2016    11
##  6 ALFA ROMEO         38        0        0        38         0  2016    12
##  7 ALFA ROMEO         33        0        0        33         0  2016     7
##  8 ALFA ROMEO         32        0        0        32         0  2016     9
##  9 ALFA ROMEO         31        0        0        31         0  2016     8
## 10 ALFA ROMEO         12        0        0        12         0  2016     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'ALFA ROMEO') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for ASTON MARTIN

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'ASTON MARTÄ°N') %>% arrange(desc(auto_total))
## # A tibble: 1 x 8
##   brand_name   auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>             <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 ASTON MARTÄ°N          2        0        0         2         0  2016     1

Only, was done sale in 2016-Jan for Aston Martin.

Analysis for AUDI

Most automobile sales for Audi.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'AUDI') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 AUDI             3785        0        0      3785         0  2017    10
##  2 AUDI             3189        0        0      3189         0  2016    11
##  3 AUDI             3124        0        0      3124         0  2017    12
##  4 AUDI             2992        0        0      2992         0  2016    12
##  5 AUDI             2448        0        0      2448         0  2016    10
##  6 AUDI             2352        0        0      2352         0  2016     5
##  7 AUDI             2326        0        0      2326         0  2017    11
##  8 AUDI             2177        0        0      2177         0  2017     6
##  9 AUDI             2148        0        0      2148         0  2016     4
## 10 AUDI             2109        0        0      2109         0  2017     5
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'AUDI') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 AUDI             1630        0        0      1630         0  2018     5
## 2 AUDI             1625        0        0      1625         0  2018     4
## 3 AUDI             1033        0        0      1033         0  2018     2
## 4 AUDI             1013        0        0      1013         0  2018     1
## 5 AUDI              840        0        0       840         0  2018     7
## 6 AUDI              737        0        0       737         0  2018     8
## 7 AUDI              668        0        0       668         0  2018     6
## 8 AUDI              350        0        0       350         0  2018     9
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'AUDI') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'AUDI') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 AUDI             3785        0        0      3785         0  2017    10
##  2 AUDI             3124        0        0      3124         0  2017    12
##  3 AUDI             2326        0        0      2326         0  2017    11
##  4 AUDI             2177        0        0      2177         0  2017     6
##  5 AUDI             2109        0        0      2109         0  2017     5
##  6 AUDI             1673        0        0      1673         0  2017     4
##  7 AUDI             1370        0        0      1370         0  2017     7
##  8 AUDI             1352        0        0      1352         0  2017     9
##  9 AUDI             1287        0        0      1287         0  2017     3
## 10 AUDI             1055        0        0      1055         0  2017     8
## 11 AUDI              702        0        0       702         0  2017     2
## 12 AUDI              625        0        0       625         0  2017     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'AUDI') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for BENTLEY

Most automobile sales for BENTLEY.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BENTLEY') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 BENTLEY             4        0        0         4         0  2017    12
##  2 BENTLEY             3        0        0         3         0  2016     9
##  3 BENTLEY             3        0        0         3         0  2018     2
##  4 BENTLEY             3        0        0         3         0  2017     9
##  5 BENTLEY             2        0        0         2         0  2017     8
##  6 BENTLEY             2        0        0         2         0  2016    11
##  7 BENTLEY             2        0        0         2         0  2017     2
##  8 BENTLEY             1        0        0         1         0  2018     8
##  9 BENTLEY             1        0        0         1         0  2018     6
## 10 BENTLEY             1        0        0         1         0  2018     5
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BENTLEY') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 BENTLEY             3        0        0         3         0  2018     2
## 2 BENTLEY             1        0        0         1         0  2018     8
## 3 BENTLEY             1        0        0         1         0  2018     6
## 4 BENTLEY             1        0        0         1         0  2018     5
## 5 BENTLEY             0        0        0         0         0  2018     9
## 6 BENTLEY             0        0        0         0         0  2018     7
## 7 BENTLEY             0        0        0         0         0  2018     4
## 8 BENTLEY             0        0        0         0         0  2018     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BENTLEY') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BENTLEY') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 BENTLEY             4        0        0         4         0  2017    12
##  2 BENTLEY             3        0        0         3         0  2017     9
##  3 BENTLEY             2        0        0         2         0  2017     8
##  4 BENTLEY             2        0        0         2         0  2017     2
##  5 BENTLEY             1        0        0         1         0  2017    10
##  6 BENTLEY             1        0        0         1         0  2017     6
##  7 BENTLEY             1        0        0         1         0  2017     5
##  8 BENTLEY             1        0        0         1         0  2017     4
##  9 BENTLEY             1        0        0         1         0  2017     1
## 10 BENTLEY             0        0        0         0         0  2017    11
## 11 BENTLEY             0        0        0         0         0  2017     7
## 12 BENTLEY             0        0        0         0         0  2017     3
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BENTLEY') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BENTLEY') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 BENTLEY             3        0        0         3         0  2016     9
##  2 BENTLEY             2        0        0         2         0  2016    11
##  3 BENTLEY             1        0        0         1         0  2016    10
##  4 BENTLEY             1        0        0         1         0  2016     7
##  5 BENTLEY             1        0        0         1         0  2016     5
##  6 BENTLEY             1        0        0         1         0  2016     2
##  7 BENTLEY             0        0        0         0         0  2016     1
##  8 BENTLEY             0        0        0         0         0  2016    12
##  9 BENTLEY             0        0        0         0         0  2016     8
## 10 BENTLEY             0        0        0         0         0  2016     4
## 11 BENTLEY             0        0        0         0         0  2016     3
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BENTLEY') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for BMW

Most automobile sales for BMW.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BMW') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 BMW              4611        0        0      4611         0  2016    11
##  2 BMW              3498        0        0      3498         0  2017    12
##  3 BMW              3174        0        0      3174         0  2016     5
##  4 BMW              2399        0        0      2399         0  2017    11
##  5 BMW              2332        0        0      2332         0  2016     4
##  6 BMW              2230        0        0      2230         0  2016     8
##  7 BMW              2205        0        0      2205         0  2016    10
##  8 BMW              2080        0        0      2080         0  2016     3
##  9 BMW              2075        0        0      2075         0  2017    10
## 10 BMW              2042        0        0      2042         0  2016     2
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BMW') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 BMW              1910        0        0      1910         0  2018     5
## 2 BMW              1386        0        0      1386         0  2018     6
## 3 BMW              1270        0        0      1270         0  2018     4
## 4 BMW              1005        0        0      1005         0  2018     8
## 5 BMW              1003        0        0      1003         0  2018     2
## 6 BMW               760        0        0       760         0  2018     7
## 7 BMW               626        0        0       626         0  2018     1
## 8 BMW               158        0        0       158         0  2018     9
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BMW') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BMW') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 BMW              3498        0        0      3498         0  2017    12
##  2 BMW              2399        0        0      2399         0  2017    11
##  3 BMW              2075        0        0      2075         0  2017    10
##  4 BMW              1904        0        0      1904         0  2017     7
##  5 BMW              1814        0        0      1814         0  2017     5
##  6 BMW              1487        0        0      1487         0  2017     9
##  7 BMW              1409        0        0      1409         0  2017     6
##  8 BMW              1346        0        0      1346         0  2017     3
##  9 BMW              1285        0        0      1285         0  2017     8
## 10 BMW               900        0        0       900         0  2017     2
## 11 BMW               877        0        0       877         0  2017     4
## 12 BMW               570        0        0       570         0  2017     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BMW') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BMW') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 BMW              4611        0        0      4611         0  2016    11
##  2 BMW              3174        0        0      3174         0  2016     5
##  3 BMW              2332        0        0      2332         0  2016     4
##  4 BMW              2230        0        0      2230         0  2016     8
##  5 BMW              2205        0        0      2205         0  2016    10
##  6 BMW              2080        0        0      2080         0  2016     3
##  7 BMW              2042        0        0      2042         0  2016     2
##  8 BMW              1856        0        0      1856         0  2016     7
##  9 BMW              1806        0        0      1806         0  2016     9
## 10 BMW              1694        0        0      1694         0  2016    12
## 11 BMW               496        0        0       496         0  2016     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'BMW') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for CHERY

Most automobile sales for CHERY.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CHERY') %>% arrange(desc(auto_total))
## # A tibble: 25 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 CHERY              30        0        0        30         0  2016     1
##  2 CHERY              23        0        0        23         0  2016     2
##  3 CHERY              22        0        0        22         0  2016     7
##  4 CHERY              22        0        0        22         0  2016     5
##  5 CHERY              12        0        0        12         0  2016     3
##  6 CHERY               9        0        0         9         0  2016     4
##  7 CHERY               1        0        0         1         0  2016     8
##  8 CHERY               0        0        0         0         0  2016     9
##  9 CHERY               0        0        0         0         0  2018     2
## 10 CHERY               0        0        0         0         0  2018     1
## # ... with 15 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CHERY') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 2 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 CHERY               0        0        0         0         0  2018     2
## 2 CHERY               0        0        0         0         0  2018     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CHERY') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CHERY') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 CHERY               0        0        0         0         0  2017    12
##  2 CHERY               0        0        0         0         0  2017    11
##  3 CHERY               0        0        0         0         0  2017    10
##  4 CHERY               0        0        0         0         0  2017     9
##  5 CHERY               0        0        0         0         0  2017     8
##  6 CHERY               0        0        0         0         0  2017     7
##  7 CHERY               0        0        0         0         0  2017     6
##  8 CHERY               0        0        0         0         0  2017     5
##  9 CHERY               0        0        0         0         0  2017     4
## 10 CHERY               0        0        0         0         0  2017     3
## 11 CHERY               0        0        0         0         0  2017     1
## 12 CHERY               0        0        0         0         0  2017     2
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CHERY') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CHERY') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 CHERY              30        0        0        30         0  2016     1
##  2 CHERY              23        0        0        23         0  2016     2
##  3 CHERY              22        0        0        22         0  2016     7
##  4 CHERY              22        0        0        22         0  2016     5
##  5 CHERY              12        0        0        12         0  2016     3
##  6 CHERY               9        0        0         9         0  2016     4
##  7 CHERY               1        0        0         1         0  2016     8
##  8 CHERY               0        0        0         0         0  2016     9
##  9 CHERY               0        0        0         0         0  2016    12
## 10 CHERY               0        0        0         0         0  2016    11
## 11 CHERY               0        0        0         0         0  2016    10
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CHERY') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for CITROEN

Most automobile sales for CITROEN.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CITROEN') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 CITROEN          2275        0      241      3285       241  2016    12
##  2 CITROEN          2017        0      274      2728       274  2016    11
##  3 CITROEN          1929        0       99      2327        99  2016     5
##  4 CITROEN          1765        0        1      2189         1  2017     3
##  5 CITROEN          1684        0       95      2354        95  2016     4
##  6 CITROEN          1654        0        0      2461         0  2017     4
##  7 CITROEN          1562        0      127      2314       127  2016     3
##  8 CITROEN          1544        0        0      2277         0  2017    10
##  9 CITROEN          1519        0       88      2047        88  2016     9
## 10 CITROEN          1504        0        0      2651         0  2017     5
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CITROEN') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 CITROEN          1128        0        0      1419         0  2018     2
## 2 CITROEN           980        0        0      1614         0  2018     5
## 3 CITROEN           922        0        0      1392         0  2018     7
## 4 CITROEN           615        0        0      1021         0  2018     4
## 5 CITROEN           499        0        0      1019         0  2018     6
## 6 CITROEN           495        0        0       693         0  2018     8
## 7 CITROEN           407        0        0       501         0  2018     1
## 8 CITROEN           134        0        0       331         0  2018     9
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CITROEN') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CITROEN') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 CITROEN          1765        0        1      2189         1  2017     3
##  2 CITROEN          1654        0        0      2461         0  2017     4
##  3 CITROEN          1544        0        0      2277         0  2017    10
##  4 CITROEN          1504        0        0      2651         0  2017     5
##  5 CITROEN          1473        0        1      2649         1  2017     6
##  6 CITROEN          1433        0        0      1913         0  2017     9
##  7 CITROEN          1339        0        0      1818         0  2017     7
##  8 CITROEN          1321        0        0      2003         0  2017     8
##  9 CITROEN           761        0       20      1430        20  2017     2
## 10 CITROEN           745        0        0      1039         0  2017    11
## 11 CITROEN           655        0        0      1349         0  2017    12
## 12 CITROEN           515        0        3       953         3  2017     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CITROEN') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CITROEN') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 CITROEN          2275        0      241      3285       241  2016    12
##  2 CITROEN          2017        0      274      2728       274  2016    11
##  3 CITROEN          1929        0       99      2327        99  2016     5
##  4 CITROEN          1684        0       95      2354        95  2016     4
##  5 CITROEN          1562        0      127      2314       127  2016     3
##  6 CITROEN          1519        0       88      2047        88  2016     9
##  7 CITROEN          1381        0      126      2017       126  2016    10
##  8 CITROEN          1221        0      100      1698       100  2016     7
##  9 CITROEN          1080        0      131      1672       131  2016     8
## 10 CITROEN           394        0       41       601        41  2016     1
## 11 CITROEN           366        0       40       579        40  2016     2
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'CITROEN') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for DACIA

Most automobile sales for DACIA.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DACIA') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 DACIA            6685        0        0      7449         0  2017    12
##  2 DACIA            6324        0        0      7197         0  2016    12
##  3 DACIA            4745        0        0      5492         0  2016    11
##  4 DACIA            4238        0        0      4724         0  2017    11
##  5 DACIA            4179        0        0      4751         0  2016     5
##  6 DACIA            3989        0        0      4238         0  2016    10
##  7 DACIA            3933        0        0      4575         0  2017     7
##  8 DACIA            3557        0        0      4172         0  2017     4
##  9 DACIA            3555        0        0      4067         0  2016     4
## 10 DACIA            3534        0        0      4057         0  2017     3
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DACIA') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 DACIA            3199        0        0      3536         0  2018     4
## 2 DACIA            3193        0        0      3521         0  2018     5
## 3 DACIA            2343        0        0      2602         0  2018     7
## 4 DACIA            2254        0        0      2547         0  2018     6
## 5 DACIA            1298        0        0      1600         0  2018     2
## 6 DACIA            1220        0        0      1687         0  2018     8
## 7 DACIA            1141        0        0      1460         0  2018     9
## 8 DACIA             937        0        0      1191         0  2018     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DACIA') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DACIA') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 DACIA            6685        0        0      7449         0  2017    12
##  2 DACIA            4238        0        0      4724         0  2017    11
##  3 DACIA            3933        0        0      4575         0  2017     7
##  4 DACIA            3557        0        0      4172         0  2017     4
##  5 DACIA            3534        0        0      4057         0  2017     3
##  6 DACIA            3521        0        0      4063         0  2017    10
##  7 DACIA            3467        0        0      4005         0  2017     8
##  8 DACIA            3356        0        0      4014         0  2017     5
##  9 DACIA            2933        0        0      3583         0  2017     6
## 10 DACIA            2916        0        0      3371         0  2017     9
## 11 DACIA            2303        0        0      2651         0  2017     2
## 12 DACIA            1471        0        0      1706         0  2017     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DACIA') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DACIA') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 DACIA            6324        0        0      7197         0  2016    12
##  2 DACIA            4745        0        0      5492         0  2016    11
##  3 DACIA            4179        0        0      4751         0  2016     5
##  4 DACIA            3989        0        0      4238         0  2016    10
##  5 DACIA            3555        0        0      4067         0  2016     4
##  6 DACIA            3402        0        0      3782         0  2016     3
##  7 DACIA            3120        0        0      3509         0  2016     8
##  8 DACIA            3116        0        0      3618         0  2016     9
##  9 DACIA            2680        0        0      3000         0  2016     7
## 10 DACIA            1963        0        0      2191         0  2016     2
## 11 DACIA            1235        0        0      1456         0  2016     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DACIA') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for DS

Most automobile sales for DS.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DS') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 DS                 99        0        0        99         0  2016    12
##  2 DS                 64        0        0        64         0  2018     8
##  3 DS                 42        0        0        42         0  2016    11
##  4 DS                 42        0        0        42         0  2016     3
##  5 DS                 38        0        0        38         0  2017     7
##  6 DS                 35        0        0        35         0  2016     4
##  7 DS                 34        0        0        34         0  2016     8
##  8 DS                 34        0        0        34         0  2016     2
##  9 DS                 32        0        0        32         0  2016     9
## 10 DS                 30        0        0        30         0  2017    12
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DS') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 DS                 64        0        0        64         0  2018     8
## 2 DS                 20        0        0        20         0  2018     4
## 3 DS                 10        0        0        10         0  2018     7
## 4 DS                  9        0        0         9         0  2018     9
## 5 DS                  9        0        0         9         0  2018     6
## 6 DS                  9        0        0         9         0  2018     5
## 7 DS                  0        0        0         0         0  2018     2
## 8 DS                  0        0        0         0         0  2018     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DS') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DS') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 DS                 38        0        0        38         0  2017     7
##  2 DS                 30        0        0        30         0  2017    12
##  3 DS                 21        0        0        21         0  2017     9
##  4 DS                 13        0        0        13         0  2017     4
##  5 DS                  9        0        0         9         0  2017     1
##  6 DS                  5        0        0         5         0  2017     5
##  7 DS                  1        0        0         1         0  2017     8
##  8 DS                  1        0        0         1         0  2017     6
##  9 DS                  1        0        0         1         0  2017     3
## 10 DS                  0        0        0         0         0  2017    11
## 11 DS                  0        0        0         0         0  2017    10
## 12 DS                  0        0        0         0         0  2017     2
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DS') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DS') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 DS                 99        0        0        99         0  2016    12
##  2 DS                 42        0        0        42         0  2016    11
##  3 DS                 42        0        0        42         0  2016     3
##  4 DS                 35        0        0        35         0  2016     4
##  5 DS                 34        0        0        34         0  2016     8
##  6 DS                 34        0        0        34         0  2016     2
##  7 DS                 32        0        0        32         0  2016     9
##  8 DS                 24        0        0        24         0  2016     5
##  9 DS                 19        0        0        19         0  2016     7
## 10 DS                 17        0        0        17         0  2016    10
## 11 DS                  8        0        0         8         0  2016     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'DS') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for FERRARI

Most automobile sales for FERRARI.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FERRARI') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 FERRARI             4        0        0         4         0  2016     4
##  2 FERRARI             3        0        0         3         0  2016     1
##  3 FERRARI             3        0        0         3         0  2018     9
##  4 FERRARI             3        0        0         3         0  2018     4
##  5 FERRARI             3        0        0         3         0  2017    12
##  6 FERRARI             3        0        0         3         0  2017     8
##  7 FERRARI             3        0        0         3         0  2017     3
##  8 FERRARI             3        0        0         3         0  2016     5
##  9 FERRARI             2        0        0         2         0  2018     8
## 10 FERRARI             2        0        0         2         0  2018     7
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FERRARI') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 FERRARI             3        0        0         3         0  2018     9
## 2 FERRARI             3        0        0         3         0  2018     4
## 3 FERRARI             2        0        0         2         0  2018     8
## 4 FERRARI             2        0        0         2         0  2018     7
## 5 FERRARI             1        0        0         1         0  2018     6
## 6 FERRARI             1        0        0         1         0  2018     5
## 7 FERRARI             1        0        0         1         0  2018     2
## 8 FERRARI             1        0        0         1         0  2018     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FERRARI') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FERRARI') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 FERRARI             3        0        0         3         0  2017    12
##  2 FERRARI             3        0        0         3         0  2017     8
##  3 FERRARI             3        0        0         3         0  2017     3
##  4 FERRARI             2        0        0         2         0  2017    11
##  5 FERRARI             2        0        0         2         0  2017    10
##  6 FERRARI             1        0        0         1         0  2017     6
##  7 FERRARI             1        0        0         1         0  2017     4
##  8 FERRARI             1        0        0         1         0  2017     2
##  9 FERRARI             0        0        0         0         0  2017     9
## 10 FERRARI             0        0        0         0         0  2017     7
## 11 FERRARI             0        0        0         0         0  2017     5
## 12 FERRARI             0        0        0         0         0  2017     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FERRARI') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FERRARI') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 FERRARI             4        0        0         4         0  2016     4
##  2 FERRARI             3        0        0         3         0  2016     1
##  3 FERRARI             3        0        0         3         0  2016     5
##  4 FERRARI             2        0        0         2         0  2016    12
##  5 FERRARI             2        0        0         2         0  2016    11
##  6 FERRARI             1        0        0         1         0  2016     9
##  7 FERRARI             1        0        0         1         0  2016    10
##  8 FERRARI             1        0        0         1         0  2016     2
##  9 FERRARI             0        0        0         0         0  2016     8
## 10 FERRARI             0        0        0         0         0  2016     7
## 11 FERRARI             0        0        0         0         0  2016     3
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FERRARI') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

## Analysis for FIAT

Most automobile sales for FIAT.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FIAT') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 FIAT             8348     7947     8821      1424     16768  2017    12
##  2 FIAT             7944     7522     7680      1496     15202  2016    12
##  3 FIAT             6946     6638     5595       996     12233  2016    11
##  4 FIAT             6543     6398     3767       525     10165  2017     6
##  5 FIAT             6512     6334     3384       583      9718  2017     5
##  6 FIAT             5664     5547     4562       643     10109  2017     7
##  7 FIAT             5487     5309     2731       540      8040  2018     5
##  8 FIAT             5474     5358     5006       642     10364  2017    10
##  9 FIAT             5358     5160     6076       830     11236  2017    11
## 10 FIAT             5065     4881     3885       861      8766  2017     8
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FIAT') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 FIAT             5487     5309     2731       540      8040  2018     5
## 2 FIAT             4305     4175     3183       379      7358  2018     4
## 3 FIAT             3832     3720     1787       360      5507  2018     7
## 4 FIAT             3245     3106     1689       362      4795  2018     6
## 5 FIAT             2377     2275     2500       354      4775  2018     2
## 6 FIAT             2035     1979     1962       219      3941  2018     1
## 7 FIAT             1681     1602     1090       315      2692  2018     8
## 8 FIAT              689      632      789       256      1421  2018     9
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FIAT') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FIAT') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 FIAT             8348     7947     8821      1424     16768  2017    12
##  2 FIAT             6543     6398     3767       525     10165  2017     6
##  3 FIAT             6512     6334     3384       583      9718  2017     5
##  4 FIAT             5664     5547     4562       643     10109  2017     7
##  5 FIAT             5474     5358     5006       642     10364  2017    10
##  6 FIAT             5358     5160     6076       830     11236  2017    11
##  7 FIAT             5065     4881     3885       861      8766  2017     8
##  8 FIAT             4885     4700     3752       787      8452  2017     4
##  9 FIAT             4803     4692     4274       727      8966  2017     9
## 10 FIAT             4622     4393     4271       719      8664  2017     3
## 11 FIAT             2469     2282     2317       635      4599  2017     2
## 12 FIAT             1621     1515     1988       363      3503  2017     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FIAT') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FIAT') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 FIAT             7944     7522     7680      1496     15202  2016    12
##  2 FIAT             6946     6638     5595       996     12233  2016    11
##  3 FIAT             4818     4540     4370       611      8910  2016     4
##  4 FIAT             4597     4390     4036       702      8426  2016    10
##  5 FIAT             4565     4299     4728       609      9027  2016     5
##  6 FIAT             4268     3932     3517       951      7449  2016     3
##  7 FIAT             3703     3491     2790       733      6281  2016     9
##  8 FIAT             3325     3063     3951       706      7014  2016     8
##  9 FIAT             2849     2678     2771       480      5449  2016     7
## 10 FIAT             2765     2518     2363       621      4881  2016     2
## 11 FIAT             1627     1465     1944       434      3409  2016     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'FIAT') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for RENAULT

Most automobile sales for RENAULT.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'RENAULT') %>% arrange(desc(auto_total))
## # A tibble: 31 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 RENAULT         18490    11492        0      9586     11492  2016    12
##  2 RENAULT         16240    11420        0      7634     11420  2017    12
##  3 RENAULT         11975     7692        0      6292      7692  2017    11
##  4 RENAULT         11275     7292        0      5449      7292  2016     5
##  5 RENAULT         11135     7905        0      4328      7905  2017     6
##  6 RENAULT         10831     6905        0      5855      6905  2016    11
##  7 RENAULT         10633     7297        0      4778      7297  2016     4
##  8 RENAULT         10320     6690        0      4898      6690  2017     5
##  9 RENAULT         10310     6280        0      5013      6280  2016     3
## 10 RENAULT         10141     6468        0      5172      6468  2017     7
## # ... with 21 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'RENAULT') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 RENAULT         10034     7417        0      3744      7417  2018     4
## 2 RENAULT          9280     6586        0      3663      6586  2018     5
## 3 RENAULT          7427     5657        0      2475      5657  2018     6
## 4 RENAULT          6552     5000        0      2345      5000  2018     2
## 5 RENAULT          6485     4774        0      2371      4774  2018     7
## 6 RENAULT          4650     3637        0      1525      3637  2018     1
## 7 RENAULT          3634     2592        0      1510      2592  2018     8
## 8 RENAULT          2751     1969        0      1217      1969  2018     9
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'RENAULT') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'RENAULT') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 12 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 RENAULT         16240    11420        0      7634     11420  2017    12
##  2 RENAULT         11975     7692        0      6292      7692  2017    11
##  3 RENAULT         11135     7905        0      4328      7905  2017     6
##  4 RENAULT         10320     6690        0      4898      6690  2017     5
##  5 RENAULT         10141     6468        0      5172      6468  2017     7
##  6 RENAULT          9919     7357        0      4259      7357  2017    10
##  7 RENAULT          8866     5718        0      4475      5718  2017     3
##  8 RENAULT          8666     5787        0      4117      5787  2017     4
##  9 RENAULT          8531     4817        0      5089      4817  2017     8
## 10 RENAULT          7869     5094        0      4035      5094  2017     9
## 11 RENAULT          5437     3975        0      2180      3975  2017     2
## 12 RENAULT          4355     3511        0      1363      3511  2017     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'RENAULT') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'RENAULT') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 RENAULT         18490    11492        0      9586     11492  2016    12
##  2 RENAULT         11275     7292        0      5449      7292  2016     5
##  3 RENAULT         10831     6905        0      5855      6905  2016    11
##  4 RENAULT         10633     7297        0      4778      7297  2016     4
##  5 RENAULT         10310     6280        0      5013      6280  2016     3
##  6 RENAULT          7399     4325        0      4557      4325  2016    10
##  7 RENAULT          6589     2516        0      4937      2516  2016     8
##  8 RENAULT          5560     3553        0      2609      3553  2016     2
##  9 RENAULT          5513     2006        0      4268      2006  2016     7
## 10 RENAULT          5277     2806        0      3660      2806  2016     9
## 11 RENAULT          4068     2810        0      1709      2810  2016     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'RENAULT') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

Analysis for VOLKSWAGEN

Most automobile sales for VOLKSWAGEN.

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'VOLKSWAGEN') %>% arrange(desc(auto_total))
## # A tibble: 27 x 8
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 VOLKSWAGEN      14539        0        0     18082         0  2016    12
##  2 VOLKSWAGEN      13003        0        0     16293         0  2017    12
##  3 VOLKSWAGEN      10587        0        0     14359         0  2016    11
##  4 VOLKSWAGEN      10228        0        0     12937         0  2017    11
##  5 VOLKSWAGEN       9597        0        0     12436         0  2016     5
##  6 VOLKSWAGEN       9211        0        0     12229         0  2016    10
##  7 VOLKSWAGEN       8438        0        0     11167         0  2016     8
##  8 VOLKSWAGEN       8197        0        0     11293         0  2016     3
##  9 VOLKSWAGEN       8028        0        0     10312         0  2016     9
## 10 VOLKSWAGEN       7811        0        0     10485         0  2016     4
## # ... with 17 more rows

For 2018,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'VOLKSWAGEN') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 VOLKSWAGEN       5913        0        0      7844         0  2018     5
## 2 VOLKSWAGEN       5801        0        0      7790         0  2018     4
## 3 VOLKSWAGEN       4428        0        0      5521         0  2018     6
## 4 VOLKSWAGEN       4217        0        0      5515         0  2018     7
## 5 VOLKSWAGEN       3763        0        0      5279         0  2018     2
## 6 VOLKSWAGEN       2567        0        0      3585         0  2018     8
## 7 VOLKSWAGEN       2497        0        0      4127         0  2018     1
## 8 VOLKSWAGEN       1763        0        0      2239         0  2018     9
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'VOLKSWAGEN') %>% filter(year==2018) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2017,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'VOLKSWAGEN') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 8 x 9
##   brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##   <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
## 1 VOLKSWAGEN      13003        0        0     16293         0  2017    12
## 2 VOLKSWAGEN      10228        0        0     12937         0  2017    11
## 3 VOLKSWAGEN       7213        0        0      9431         0  2017     6
## 4 VOLKSWAGEN       7006        0        0      9382         0  2017     7
## 5 VOLKSWAGEN       6957        0        0      9362         0  2017     8
## 6 VOLKSWAGEN       6729        0        0      8850         0  2017     3
## 7 VOLKSWAGEN       4903        0        0      6502         0  2017     2
## 8 VOLKSWAGEN       3059        0        0      4314         0  2017     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'VOLKSWAGEN') %>% filter(year==2017) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))

For 2016,

dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'VOLKSWAGEN') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))
## # A tibble: 11 x 9
##    brand_name auto_total auto_dom comm_dom total_imp total_dom  year month
##    <chr>           <dbl>    <dbl>    <dbl>     <dbl>     <dbl> <dbl> <dbl>
##  1 VOLKSWAGEN      14539        0        0     18082         0  2016    12
##  2 VOLKSWAGEN      10587        0        0     14359         0  2016    11
##  3 VOLKSWAGEN       9597        0        0     12436         0  2016     5
##  4 VOLKSWAGEN       9211        0        0     12229         0  2016    10
##  5 VOLKSWAGEN       8438        0        0     11167         0  2016     8
##  6 VOLKSWAGEN       8197        0        0     11293         0  2016     3
##  7 VOLKSWAGEN       8028        0        0     10312         0  2016     9
##  8 VOLKSWAGEN       7811        0        0     10485         0  2016     4
##  9 VOLKSWAGEN       7239        0        0      9084         0  2016     7
## 10 VOLKSWAGEN       5763        0        0      8154         0  2016     2
## 11 VOLKSWAGEN       2792        0        0      4528         0  2016     1
## # ... with 1 more variable: meanOfAutoTotal <dbl>
tabl <- dat %>% 
  select(brand_name,auto_total,auto_dom,comm_dom,total_imp,total_dom,year,month) %>% filter(brand_name == 'VOLKSWAGEN') %>% filter(year==2016) %>% mutate(meanOfAutoTotal = mean(auto_total))  %>% arrange(desc(auto_total))