Introduction

Research Questions

Loading libraries

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(readr)
library(tidyr)
library(ggplot2)
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ tibble  3.1.4     ✓ stringr 1.4.0
## ✓ purrr   0.3.4     ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()

Data

The dataset to be analyzing contians 185 different 2021 electric cars from various manufacturers. The meta-data attributed to each vehicle includes: top speed (km/h), range (km), efficiency (wh/km), fastcharge speed (km/h), and price in uero and pound. For this analysis I will mainly be focusing on vehicles from three of the top electric vehicle manufacturers, Tesla, Hyundai and Volkswagon. In order to evaluate performance of each, data will be drawn from range, efficiency and price.

-Data: Describe your dataset, and include the code that generated the data import and cleaning.

Reading in data

car_data <- read.csv("electric_cars.csv", header=TRUE, stringsAsFactors=FALSE)

head(car_data)
##                                   title topspeed_km.h range_km efficiency_Wh.km
## 1   Tesla Model 3 Long Range Dual Motor           233      455              154
## 2      Renault Megane E-Tech EV60 220hp           160      360              167
## 3   Tesla Model Y Long Range Dual Motor           217      410              171
## 4                            Kia EV6 GT           260      395              196
## 5                     Skoda Enyaq iV 80           160      420              183
## 6 Tesla Model 3 Standard Range Plus LFP           225      350              150
##   fastcharge_speed_km.h price_de_euro price_nl_euro price_uk_pound
## 1                   650            NA            NA          48490
## 2                   520         40000         40000          35000
## 3                   590         59965         65010          54000
## 4                   920         65990         63595          58295
## 5                   510         43950         47780          39365
## 6                   630         43560         49990          40990

Observing variables

str(car_data)
## 'data.frame':    185 obs. of  8 variables:
##  $ title                : chr  "Tesla Model 3 Long Range Dual Motor" "Renault Megane E-Tech EV60 220hp" "Tesla Model Y Long Range Dual Motor" "Kia EV6 GT" ...
##  $ topspeed_km.h        : int  233 160 217 260 160 225 125 144 160 185 ...
##  $ range_km             : int  455 360 410 395 420 350 170 225 535 385 ...
##  $ efficiency_Wh.km     : int  154 167 171 196 183 150 158 164 168 189 ...
##  $ fastcharge_speed_km.h: num  650 520 590 920 510 630 120 230 680 890 ...
##  $ price_de_euro        : num  NA 40000 59965 65990 43950 ...
##  $ price_nl_euro        : num  NA 40000 65010 63595 47780 ...
##  $ price_uk_pound       : num  48490 35000 54000 58295 39365 ...

Data Wrangling

The first steps of cleaning will be breaking down the data into three seperate dataframes: the most expensive vehicles, mid-priced vehicles and the least expensive vehicles.

# Arranging the vehicles by price 
top_price <- arrange(car_data, desc(`price_uk_pound`))
# Dataset for hgihest priced vehicles 
top_price <- top_price %>% slice(1:10)
top_price
##                                   title topspeed_km.h range_km efficiency_Wh.km
## 1                       Tesla Roadster            410      970              206
## 2  Porsche Taycan Turbo S Cross Turismo           250      380              220
## 3                Porsche Taycan Turbo S           260      390              215
## 4           Mercedes EQS AMG 53 4MATIC+           250      565              191
## 5               Lucid Air Grand Touring           270      660              167
## 6                   Tesla Model S Plaid           322      535              168
## 7    Porsche Taycan Turbo Cross Turismo           250      385              217
## 8                  Porsche Taycan Turbo           260      400              209
## 9               Mercedes EQS 580 4MATIC           210      610              177
## 10                  Tesla Model X Plaid           262      455              198
##    fastcharge_speed_km.h price_de_euro price_nl_euro price_uk_pound
## 1                    920        215000        215000         189000
## 2                    790        187746        193200         139910
## 3                    860        186336        191700         138830
## 4                    740        175000        175000         135000
## 5                   1380        140000        140000         125000
## 6                    800        126990        131000         118980
## 7                    800        154444        159300         116950
## 8                    840        153016        157900         115860
## 9                    800        135529        154949         115000
## 10                   680        116990        121000         110980
# Arranging vehicles by lowest price 
low_price <- arrange(car_data, `price_uk_pound`)
low_price
##                                      title topspeed_km.h range_km
## 1                    Smart EQ fortwo coupe           130      100
## 2                        Smart EQ forfour            130       95
## 3               Fiat 500e Hatchback 24 kWh           135      165
## 4                        Volkswagen e-Up!            130      205
## 5                   Smart EQ fortwo cabrio           130       95
## 6               Fiat 500e Hatchback 42 kWh           150      250
## 7                                MG MG5 EV           185      295
## 8                             Nissan Leaf            144      225
## 9                                 MG ZS EV           140      220
## 10                         Mini Cooper SE            150      185
## 11                             Mazda MX-30           140      170
## 12                    MG MG5 EV Long Range           185      340
## 13                        Fiat 500e Cabrio           150      245
## 14                   Renault Zoe ZE50 R110           135      315
## 15        Volkswagen ID.3 Pure Performance           160      275
## 16                           Opel Corsa-e            150      275
## 17                           Peugeot e-208           150      275
## 18                                Honda e            145      170
## 19            Hyundai Kona Electric 39 kWh           155      250
## 20                     Volkswagen ID.3 Pro           160      350
## 21              CUPRA Born 110 kW - 55 kWh           160      275
## 22                   Renault Zoe ZE50 R135           140      310
## 23         Volkswagen ID.3 Pro Performance           160      350
## 24                         Honda e Advance           145      170
## 25                   Nissan e-NV200 Evalia           123      170
## 26                       Kia e-Niro 39 kWh           155      235
## 27        Peugeot e-Rifter Standard 50 kWh           135      200
## 28                          Nissan Leaf e+           157      325
## 29              CUPRA Born 150 kW - 62 kWh           160      350
## 30                           Opel Mokka-e            150      255
## 31                  Hyundai IONIQ Electric           165      250
## 32                      Peugeot e-2008 SUV           150      250
## 33                            Citroen e-C4           150      250
## 34                           BMW i3 120 Ah           150      235
## 35                  DS 3 Crossback E-Tense           150      250
## 36              CUPRA Born 170 kW - 62 kWh           160      345
## 37               Renault Kangoo Maxi ZE 33           130      160
## 38          Citroen e-SpaceTourer M 50 kWh           130      180
## 39                       Skoda Enyaq iV 60           160      330
## 40                    Volkswagen ID.4 Pure           160      285
## 41                          BMW i3s 120 Ah           160      230
## 42                       Kia e-Niro 64 kWh           167      370
## 43            Peugeot e-Rifter Long 50 kWh           135      195
## 44        Renault Megane E-Tech EV40 130hp           160      245
## 45            Hyundai Kona Electric 64 kWh           167      395
## 46        Renault Megane E-Tech EV60 220hp           160      360
## 47        Volkswagen ID.4 Pure Performance           160      285
## 48      Hyundai IONIQ 5 Standard Range 2WD           185      310
## 49                       Kia e-Soul 64 kWh           167      370
## 50                      Nissan Ariya 63kWh           160      335
## 51         Volkswagen ID.3 Pro S - 4 Seats           160      450
## 52           Tesla Cybertruck Single Motor           180      390
## 53                       Skoda Enyaq iV 80           160      420
## 54  Polestar 2 Standard Range Single Motor           160      350
## 55              Nissan Ariya e-4ORCE 63kWh           200      325
## 56                       Audi Q4 e-tron 35           160      280
## 57                     Volkswagen ID.4 1st           160      410
## 58              Kia EV6 Standard Range 2WD           185      320
## 59   Tesla Model 3 Standard Range Plus LFP           225      350
## 60       Tesla Model 3 Standard Range Plus           225      350
## 61              Ford Mustang Mach-E SR RWD           180      345
## 62         Volkswagen ID.4 Pro Performance           160      410
## 63          Hyundai IONIQ 5 Long Range 2WD           185      385
## 64              CUPRA Born 170 kW - 82 kWh           160      450
## 65             Audi Q4 Sportback e-tron 35           160      295
## 66      Polestar 2 Long Range Single Motor           160      425
## 67            Skoda Enyaq iV Sportline 80x           160      400
## 68                        Mercedes EQA 250           160      355
## 69                           Lexus UX 300e           160      260
## 70                       Audi Q4 e-tron 40           160      405
## 71                      Nissan Ariya 87kWh           160      445
## 72          Hyundai IONIQ 5 Long Range AWD           185      375
## 73        Polestar 2 Long Range Dual Motor           205      395
## 74                       Skoda Enyaq iV RS           180      395
## 75              Ford Mustang Mach-E SR AWD           180      330
## 76              Hyundai IONIQ 5 Project 45           185      370
## 77                  Kia EV6 Long Range 2WD           185      420
## 78             Tesla Cybertruck Dual Motor           190      460
## 79              Nissan Ariya e-4ORCE 87kWh           200      420
## 80     Tesla Model 3 Long Range Dual Motor           233      455
## 81     Peugeot e-Traveller Standard 50 kWh           130      185
## 82             Opel Zafira-e Life L 50 kWh           130      175
## 83         Peugeot e-Traveller Long 50 kWh           130      185
## 84  Volvo XC40 Recharge Twin Pure Electric           180      340
## 85              Ford Mustang Mach-E ER RWD           180      440
## 86                 Mercedes EQB 350 4MATIC           160      340
## 87                 Byton M-Byte 72 kWh 2WD           190      325
## 88               Audi Q4 e-tron 50 quattro           180      385
## 89                         BMW i4 eDrive40           190      475
## 90                  Kia EV6 Long Range AWD           185      410
## 91  Nissan Ariya e-4ORCE 87kWh Performance           200      385
## 92     Audi Q4 Sportback e-tron 50 quattro           180      400
## 93     Tesla Model Y Long Range Dual Motor           217      410
## 94                     Volkswagen ID.4 GTX           180      400
## 95              Ford Mustang Mach-E ER AWD           180      420
## 96                      Volvo C40 Recharge           180      340
## 97                 Byton M-Byte 95 kWh 2WD           190      400
## 98                              Kia EV6 GT           260      395
## 99                                 BMW iX3           180      385
## 100              Tesla Model 3 Performance           261      470
## 101                       Mercedes EQE 350           160      535
## 102              Tesla Model Y Performance           241      430
## 103                Byton M-Byte 95 kWh 4WD           190      390
## 104                 Audi e-tron 50 quattro           190      280
## 105                             BMW i4 M50           225      450
## 106                    Jaguar I-Pace EV400           200      380
## 107                Mercedes EQC 400 4MATIC           180      370
## 108                 Ford Mustang Mach-E GT           200      410
## 109             Tesla Cybertruck Tri Motor           210      750
## 110       Audi e-tron Sportback 50 quattro           190      295
## 111                        BMW iX xDrive40           200      350
## 112                         Lucid Air Pure           200      540
## 113                  Mercedes EQV 300 Long           160      320
## 114                        Porsche Taycan            230      395
## 115                 Audi e-tron 55 quattro           200      365
## 116                    Porsche Taycan Plus           230      460
## 117         Porsche Taycan 4 Cross Turismo           220      405
## 118                 Audi e-tron GT quattro           245      420
## 119       Audi e-tron Sportback 55 quattro           200      375
## 120                      Porsche Taycan 4S           250      375
## 121               Tesla Model S Long Range           250      555
## 122               Audi e-tron S 55 quattro           210      320
## 123        Porsche Taycan 4S Cross Turismo           240      405
## 124                 Porsche Taycan 4S Plus           250      435
## 125     Audi e-tron S Sportback 55 quattro           210      335
## 126                      Lucid Air Touring           250      530
## 127               Tesla Model X Long Range           250      475
## 128                        BMW iX xDrive50           200      505
## 129                      Mercedes EQS 450+           210      640
## 130                      Audi e-tron GT RS           250      405
## 131                    Tesla Model X Plaid           262      455
## 132                Mercedes EQS 580 4MATIC           210      610
## 133                   Porsche Taycan Turbo           260      400
## 134     Porsche Taycan Turbo Cross Turismo           250      385
## 135                    Tesla Model S Plaid           322      535
## 136                Lucid Air Grand Touring           270      660
## 137            Mercedes EQS AMG 53 4MATIC+           250      565
## 138                 Porsche Taycan Turbo S           260      390
## 139   Porsche Taycan Turbo S Cross Turismo           250      380
## 140                        Tesla Roadster            410      970
## 141                  Dacia Spring Electric           125      170
## 142           Hyundai Kona Electric 64 kWh           167      395
## 143                              Aiways U5           150      335
## 144    Tesla Model 3 Long Range Dual Motor           233      490
## 145                MG Marvel R Performance           200      330
## 146                      Skoda Enyaq iV 50           160      295
## 147                         Lightyear One            150      575
## 148           Hyundai Kona Electric 39 kWh           155      250
## 149                  Renault Zoe ZE40 R110           135      255
## 150                Renault Twingo Electric           135      130
## 151            Audi Q4 Sportback e-tron 40           160      425
## 152        Volkswagen ID.3 Pro S - 5 Seats           160      450
## 153                         Opel Ampera-e            150      335
## 154      Volvo XC40 Recharge Pure Electric           160      315
## 155                                Seres 3           155      270
## 156                Mercedes EQA 350 4MATIC           160      350
## 157                     SEAT Mii Electric            130      205
## 158              Audi Q4 e-tron 45 quattro           180      385
## 159                        MG MG5 Electric           180      340
## 160                          Fiat 500e 3+1           150      245
## 161                             Sono Sion            140      260
## 162                           MG Marvel R            200      340
## 163                Mercedes EQA 300 4MATIC           160      350
## 164                              JAC iEV7s           132      225
## 165     Hyundai IONIQ 5 Standard Range AWD           185      305
## 166                      Kia e-Soul 64 kWh           167      370
## 167                 Audi e-tron 55 quattro           200      365
## 168                      Kia e-Soul 39 kWh           157      230
## 169            Mercedes EQV 300 Extra-Long           160      320
## 170           Toyota PROACE Verso M 75 kWh           130      250
## 171       Audi e-tron Sportback 55 quattro           200      375
## 172            Opel Zafira-e Life L 75 kWh           130      250
## 173           Toyota PROACE Verso L 75 kWh           130      250
## 174        Peugeot e-Traveller Long 75 kWh           130      270
## 175    Peugeot e-Traveller Standard 75 kWh           130      270
## 176         Citroen e-SpaceTourer M 75 kWh           130      250
## 177           Toyota PROACE Verso M 50 kWh           130      185
## 178        Citroen e-SpaceTourer XL 75 kWh           130      250
## 179     Peugeot e-Traveller Compact 50 kWh           130      185
## 180            Opel Zafira-e Life M 75 kWh           130      250
## 181           Toyota PROACE Verso L 50 kWh           130      180
## 182            Opel Zafira-e Life M 50 kWh           130      180
## 183        Citroen e-SpaceTourer XS 50 kWh           130      185
## 184            Opel Zafira-e Life S 50 kWh           130      185
## 185        Citroen e-SpaceTourer XL 50 kWh           130      175
##     efficiency_Wh.km fastcharge_speed_km.h price_de_euro price_nl_euro
## 1                167                    NA         18460         23995
## 2                176                    NA         19120         23995
## 3                144                   260         23560         24900
## 4                158                   170            NA         25850
## 5                176                    NA         21720         26995
## 6                149                   420         27560         28600
## 7                165                   340            NA            NA
## 8                164                   230         29990         34990
## 9                193                   260         31990         30985
## 10               156                   260         32500         36200
## 11               176                   180         34490         33990
## 12               168                   340            NA            NA
## 13               152                   410         30560         31600
## 14               165                   230         31990         33990
## 15               164                   410            NA         33490
## 16               164                   370         29000         30599
## 17               164                   370         30450         34900
## 18               168                   190         33850         35820
## 19               157                   210         35650         37000
## 20               166                   490         35460         36240
## 21               164                   440         32700         33000
## 22               168                   230         33990         35590
## 23               166                   490         36960         37740
## 24               168                   190         38000         39080
## 25               218                   170         43433         45173
## 26               167                   230         35290         35995
## 27               225                   270         37590            NA
## 28               172                   390         38350         41940
## 29               166                   440         37220         37990
## 30               176                   340         34110         34399
## 31               153                   220         35350         37015
## 32               180                   330         35450         40930
## 33               180                   330         34640         33990
## 34               161                   270         39000         39995
## 35               180                   330         30040         39990
## 36               168                   430         39000         39000
## 37               194                    NA            NA         38801
## 38               250                   240         51440         53011
## 39               176                   420         38850         40780
## 40               182                   410         36950         40690
## 41               165                   260         42600         43690
## 42               173                   350         39090         38995
## 43               231                   260         42590            NA
## 44               163                   510         35000         35000
## 45               162                   370         41850         41000
## 46               167                   520         40000         40000
## 47               182                   410         38450         42190
## 48               187                   720         41900         43500
## 49               173                   350            NA            NA
## 50               188                   450         45000         44000
## 51               171                   550         42460            NA
## 52               256                   740         45000         45000
## 53               183                   510         43950         47780
## 54               174                   430         46500         45900
## 55               194                   440         50000         46000
## 56               184                   390         41900         48295
## 57               188                   500            NA            NA
## 58               181                   740         44990         44595
## 59               150                   630         43560         49990
## 60               146                   700         43560         49990
## 61               197                   380         46900         50425
## 62               188                   500         44450         47790
## 63               189                   890         45100         46500
## 64               171                   550         43000         43000
## 65               175                   410         43900         50345
## 66               176                   550         49500         49900
## 67               193                   490         47000         50000
## 68               187                   420         47541         49995
## 69               192                   150         47550         39990
## 70               189                   500         47500         52815
## 71               196                   530         50000         52000
## 72               194                   870         48900         54500
## 73               190                   510         52500         53900
## 74               195                   480         50000         55000
## 75               206                   360         54000         58165
## 76               196                   860         59550         58995
## 77               184                   980         48990         52095
## 78               261                   710         55000         56000
## 79               207                   500         57500         55000
## 80               154                   650            NA            NA
## 81               243                   250         55900            NA
## 82               257                   230         54625         54196
## 83               243                   250         56690            NA
## 84               221                   440         59250         56495
## 85               200                   430         54475         58575
## 86               196                   400         60000         60000
## 87               222                   420         53500         55000
## 88               199                   470         53600         64815
## 89               170                   660         58300         60697
## 90               189                   950         52850         54595
## 91               226                   460         65000         60000
## 92               192                   490         55600         66865
## 93               171                   590         59965         65010
## 94               193                   490         50415         52190
## 95               210                   410         62900         67640
## 96               221                   440         62050         57995
## 97               238                   480         62000         62500
## 98               196                   920         65990         63595
## 99               192                   520         67300         69000
## 100              162                   790         58560         64990
## 101              168                   680         70000         70000
## 102              177                   720         66965         71010
## 103              244                   460         64000         65000
## 104              231                   470         69100         62700
## 105              179                   630         69900         73496
## 106              223                   360         77300         83072
## 107              216                   440         66069         77935
## 108              215                   400            NA         75490
## 109              267                   710         75000         78000
## 110              219                   490         71350         65100
## 111              203                   470         77300         86972
## 112              157                  1410         80000         80000
## 113              281                   280         71388         74609
## 114              180                   790         83520         87200
## 115              237                   590            NA            NA
## 116              182                   960         89244         93244
## 117              207                   850         93635         97399
## 118              202                   840         99800        104895
## 119              231                   600            NA            NA
## 120              189                   750        106487        110600
## 121              162                   830         86990         91000
## 122              270                   510         93800        104540
## 123              207                   850        111842        116000
## 124              192                   910        113008        116431
## 125              258                   540         96050        106940
## 126              160                  1390         95000        100000
## 127              189                   710         95990        101000
## 128              208                   620         98000        105472
## 129              168                   840        106374        118891
## 130              210                   810        138200        146295
## 131              198                   680        116990        121000
## 132              177                   800        135529        154949
## 133              209                   840        153016        157900
## 134              217                   800        154444        159300
## 135              168                   800        126990        131000
## 136              167                  1380        140000        140000
## 137              191                   740        175000        175000
## 138              215                   860        186336        191700
## 139              220                   790        187746        193200
## 140              206                   920        215000        215000
## 141              158                   120         20490         17890
## 142              162                   370         41850         41595
## 143              188                   350         35993         39950
## 144              155                   820         53560         57990
## 145              197                   380         50000         50000
## 146              176                   240         33800         35000
## 147              104                   540        149000        149990
## 148              157                   210         34850         36795
## 149              161                   230         29990            NA
## 150              164                    NA         24790         20690
## 151              180                   520         49500         54865
## 152              171                   550         42620         41990
## 153              173                   210         42990            NA
## 154              213                   400            NA         45995
## 155              193                   390            NA         37995
## 156              190                   420         56216            NA
## 157              158                   170         24650            NA
## 158              199                   470         50900         58065
## 159              168                   440         35000         35000
## 160              152                   410         29560         30600
## 161              181                   310         25500         26000
## 162              191                   390         40000         40000
## 163              190                   420         53538            NA
## 164              173                   160            NA         32210
## 165              190                   710         45700            NA
## 166              173                   350         37790         36495
## 167              237                   590         81500         71500
## 168              170                   220         33990         33495
## 169              281                   280         72281         75674
## 170              260                   290         64530         58995
## 171              231                   600         83750         73900
## 172              260                   290         60625         63150
## 173              260                   290         65385         60195
## 174              252                   290         58230            NA
## 175              252                   290         57440            NA
## 176              260                   290         57440         62026
## 177              243                   250         58530            NA
## 178              260                   290         58230         63962
## 179              243                   250         50880            NA
## 180              260                   290         59800         62061
## 181              250                   240         59385            NA
## 182              250                   240         53800         53107
## 183              243                   250         50880            NA
## 184              243                   250         56700            NA
## 185              257                   230         52230         54947
##     price_uk_pound
## 1            19200
## 2            19795
## 3            20495
## 4            21055
## 5            21620
## 6            23995
## 7            25095
## 8            25995
## 9            25995
## 10           26000
## 11           26045
## 12           26495
## 13           26645
## 14           26795
## 15           27135
## 16           27140
## 17           27225
## 18           27660
## 19           27950
## 20           28435
## 21           28500
## 22           28795
## 23           29755
## 24           30160
## 25           30255
## 26           30345
## 27           30375
## 28           30445
## 29           30500
## 30           30540
## 31           30550
## 32           30730
## 33           30895
## 34           31305
## 35           31500
## 36           31500
## 37           31680
## 38           31995
## 39           32010
## 40           32150
## 41           32305
## 42           32445
## 43           32455
## 44           32500
## 45           32550
## 46           35000
## 47           36030
## 48           36995
## 49           37545
## 50           38000
## 51           38815
## 52           39000
## 53           39365
## 54           39900
## 55           40000
## 56           40750
## 57           40800
## 58           40985
## 59           40990
## 60           40990
## 61           41330
## 62           41570
## 63           41945
## 64           42000
## 65           42250
## 66           42900
## 67           42915
## 68           43495
## 69           43900
## 70           44990
## 71           45000
## 72           45145
## 73           45900
## 74           46000
## 75           46650
## 76           48000
## 77           48000
## 78           48000
## 79           48000
## 80           48490
## 81           49065
## 82           49465
## 83           49905
## 84           49950
## 85           49980
## 86           50000
## 87           50000
## 88           51370
## 89           51905
## 90           52000
## 91           52000
## 92           52870
## 93           54000
## 94           55540
## 95           57030
## 96           57400
## 97           57500
## 98           58295
## 99           59730
## 100          59990
## 101          60000
## 102          60000
## 103          60000
## 104          60600
## 105          63905
## 106          65195
## 107          65720
## 108          67225
## 109          68000
## 110          69100
## 111          69905
## 112          70000
## 113          70665
## 114          70690
## 115          71500
## 116          74739
## 117          79340
## 118          79900
## 119          79900
## 120          83580
## 121          83980
## 122          87000
## 123          87820
## 124          88193
## 125          88700
## 126          90000
## 127          90980
## 128          91905
## 129          95000
## 130         110950
## 131         110980
## 132         115000
## 133         115860
## 134         116950
## 135         118980
## 136         125000
## 137         135000
## 138         138830
## 139         139910
## 140         189000
## 141             NA
## 142             NA
## 143             NA
## 144             NA
## 145             NA
## 146             NA
## 147             NA
## 148             NA
## 149             NA
## 150             NA
## 151             NA
## 152             NA
## 153             NA
## 154             NA
## 155             NA
## 156             NA
## 157             NA
## 158             NA
## 159             NA
## 160             NA
## 161             NA
## 162             NA
## 163             NA
## 164             NA
## 165             NA
## 166             NA
## 167             NA
## 168             NA
## 169             NA
## 170             NA
## 171             NA
## 172             NA
## 173             NA
## 174             NA
## 175             NA
## 176             NA
## 177             NA
## 178             NA
## 179             NA
## 180             NA
## 181             NA
## 182             NA
## 183             NA
## 184             NA
## 185             NA
# Isolating low price
low_price <- low_price %>% slice(1:10)
# Re-arranging vehicles to find mid-priced
car_data <- arrange(car_data, `price_uk_pound`)
# calculating median price
median(car_data$price_uk_pound, na.rm = TRUE)
## [1] 44995
# Isolating mid_price
mid_price <- car_data %>% slice(66:74)
mid_price
##                                title topspeed_km.h range_km efficiency_Wh.km
## 1 Polestar 2 Long Range Single Motor           160      425              176
## 2       Skoda Enyaq iV Sportline 80x           160      400              193
## 3                   Mercedes EQA 250           160      355              187
## 4                      Lexus UX 300e           160      260              192
## 5                  Audi Q4 e-tron 40           160      405              189
## 6                 Nissan Ariya 87kWh           160      445              196
## 7     Hyundai IONIQ 5 Long Range AWD           185      375              194
## 8   Polestar 2 Long Range Dual Motor           205      395              190
## 9                  Skoda Enyaq iV RS           180      395              195
##   fastcharge_speed_km.h price_de_euro price_nl_euro price_uk_pound
## 1                   550         49500         49900          42900
## 2                   490         47000         50000          42915
## 3                   420         47541         49995          43495
## 4                   150         47550         39990          43900
## 5                   500         47500         52815          44990
## 6                   530         50000         52000          45000
## 7                   870         48900         54500          45145
## 8                   510         52500         53900          45900
## 9                   480         50000         55000          46000

Visualizations

# Plotting 
ggplot(car_data, aes(range_km)) +
  geom_histogram() +
  labs(title = "Scope of Vehicle Range", x = "Range (km)")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

As for the first visualization, I just wanted to get a sense of scope for the range of the all vehicles. As displayed, the range of most vehicles falls between 250 and 450 kilometers, with a few extreme high-end outliers.

# Plotting the spread of Vehicle Efficiencies 
ggplot(car_data, aes(title, efficiency_Wh.km)) + geom_point() +
  labs(title = "Efficiency of Models", x = "Model" , y = "Efficiency (wh/km)")

Similar to my first visualization, I wanted to take a broad look at the efficiencies of all the models. This vizualization shows that most vehicles have efficiencies between 150 and 200 wh/km.

Price Range Visualizations

# Most expensive price vs range facet wrap 
ggplot(top_price, aes(efficiency_Wh.km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Price vs Efficiency of Most Expensive Vehicles", y = "Price (UK pound)", x = "Efficiency (wh/km)") +
  facet_wrap(vars(title))

# Least expensive price vs efficiency facet wrap 
ggplot(low_price, aes(efficiency_Wh.km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Price vs Efficiency of Least Expensive Vehicles", y = "Price (UK pound)", x = "Efficiency (wh/km)") +
  facet_wrap(vars(title))

# Mid priced price vs efficiency facet wrap 
ggplot(mid_price, aes(efficiency_Wh.km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Price vs Efficiency Mid-Priced Vehicles", y = "Price (UK pound)", x = "Efficiency (wh/km)") +
  facet_wrap(vars(title))

This set of price based visualizations offer an explicit look at how efficiencies of specific vehicles compare at different price levels. I found the clearest way of visualisizing this data was through facet wrap, where the efficiencies of each model can be presented for comparison. The first thing that struck me about these three vizualizations are the discrepensies in price range at each level. At the least expensive level prices vary between 19,000 and 26,000 euros, a difference of 7,000 euros. Mid-priced vehicles range from 43,000 to 46,000, a differenence of just 3,000 euros. At the most expensive level, prices vary greatly from 111,000 to 189,000 eruos, an astounding 78,000 euros difference. This is all due to the Tesla Roadster, which is a supercar and one of the fastest in the world being compared to regular commerical vehicles. There are also discrepensies among efficiencies at all levels. Some vehicle efficiencies in the low and mid price perform better than their most expensive counterparts while costing tens of thousands of dollars less.

Brand Visualizations

In order to further narrow down the dataset I've specified my visualizations by brand, those being Tesla, Hyundai and Volkswagon. By plotting price vs efficiency and price vs range I can evaluate perfomance within and amongst each brand.

Tesla

# Pulling all Tesla rows and creating dataframe
tesla_data <- car_data[c(52,59,60,78,80,93,11,102,109,121,127,131,135,140,144),]
tesla_data
##                                     title topspeed_km.h range_km
## 52          Tesla Cybertruck Single Motor           180      390
## 59  Tesla Model 3 Standard Range Plus LFP           225      350
## 60      Tesla Model 3 Standard Range Plus           225      350
## 78            Tesla Cybertruck Dual Motor           190      460
## 80    Tesla Model 3 Long Range Dual Motor           233      455
## 93    Tesla Model Y Long Range Dual Motor           217      410
## 11                            Mazda MX-30           140      170
## 102             Tesla Model Y Performance           241      430
## 109            Tesla Cybertruck Tri Motor           210      750
## 121              Tesla Model S Long Range           250      555
## 127              Tesla Model X Long Range           250      475
## 131                   Tesla Model X Plaid           262      455
## 135                   Tesla Model S Plaid           322      535
## 140                       Tesla Roadster            410      970
## 144   Tesla Model 3 Long Range Dual Motor           233      490
##     efficiency_Wh.km fastcharge_speed_km.h price_de_euro price_nl_euro
## 52               256                   740         45000         45000
## 59               150                   630         43560         49990
## 60               146                   700         43560         49990
## 78               261                   710         55000         56000
## 80               154                   650            NA            NA
## 93               171                   590         59965         65010
## 11               176                   180         34490         33990
## 102              177                   720         66965         71010
## 109              267                   710         75000         78000
## 121              162                   830         86990         91000
## 127              189                   710         95990        101000
## 131              198                   680        116990        121000
## 135              168                   800        126990        131000
## 140              206                   920        215000        215000
## 144              155                   820         53560         57990
##     price_uk_pound
## 52           39000
## 59           40990
## 60           40990
## 78           48000
## 80           48490
## 93           54000
## 11           26045
## 102          60000
## 109          68000
## 121          83980
## 127          90980
## 131         110980
## 135         118980
## 140         189000
## 144             NA
# Arranging in order of least expensive to most
tesla_data <- arrange(tesla_data, `price_uk_pound`)
tesla_data
##                                    title topspeed_km.h range_km
## 1                            Mazda MX-30           140      170
## 2          Tesla Cybertruck Single Motor           180      390
## 3  Tesla Model 3 Standard Range Plus LFP           225      350
## 4      Tesla Model 3 Standard Range Plus           225      350
## 5            Tesla Cybertruck Dual Motor           190      460
## 6    Tesla Model 3 Long Range Dual Motor           233      455
## 7    Tesla Model Y Long Range Dual Motor           217      410
## 8              Tesla Model Y Performance           241      430
## 9             Tesla Cybertruck Tri Motor           210      750
## 10              Tesla Model S Long Range           250      555
## 11              Tesla Model X Long Range           250      475
## 12                   Tesla Model X Plaid           262      455
## 13                   Tesla Model S Plaid           322      535
## 14                       Tesla Roadster            410      970
## 15   Tesla Model 3 Long Range Dual Motor           233      490
##    efficiency_Wh.km fastcharge_speed_km.h price_de_euro price_nl_euro
## 1               176                   180         34490         33990
## 2               256                   740         45000         45000
## 3               150                   630         43560         49990
## 4               146                   700         43560         49990
## 5               261                   710         55000         56000
## 6               154                   650            NA            NA
## 7               171                   590         59965         65010
## 8               177                   720         66965         71010
## 9               267                   710         75000         78000
## 10              162                   830         86990         91000
## 11              189                   710         95990        101000
## 12              198                   680        116990        121000
## 13              168                   800        126990        131000
## 14              206                   920        215000        215000
## 15              155                   820         53560         57990
##    price_uk_pound
## 1           26045
## 2           39000
## 3           40990
## 4           40990
## 5           48000
## 6           48490
## 7           54000
## 8           60000
## 9           68000
## 10          83980
## 11          90980
## 12         110980
## 13         118980
## 14         189000
## 15             NA
# Facet wraping tesla price vs efficiency
tesla_data <- tesla_data
ggplot(tesla_data, aes(efficiency_Wh.km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Telsa Price vs Efficiency", y = "Price (UK pound)", x = "Efficiency (wh/km)") +
  facet_wrap(vars(title))
## Warning: Removed 1 rows containing missing values (geom_point).

# Facet wraping tesla price vs range 
ggplot(tesla_data, aes(range_km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Telsa Price vs Range", y = "Price (UK pound)", x = "Range (km)") +
  facet_wrap(vars(title))
## Warning: Removed 1 rows containing missing values (geom_point).

Hyundai

# Pulling all hyundai rows and creaing dataframe
hyun_data <- car_data[c(10,12,18,19,28,63,81,83,134,149),]
hyun_data
##                                   title topspeed_km.h range_km efficiency_Wh.km
## 10                      Mini Cooper SE            150      185              156
## 12                 MG MG5 EV Long Range           185      340              168
## 18                             Honda e            145      170              168
## 19         Hyundai Kona Electric 39 kWh           155      250              157
## 28                       Nissan Leaf e+           157      325              172
## 63       Hyundai IONIQ 5 Long Range 2WD           185      385              189
## 81  Peugeot e-Traveller Standard 50 kWh           130      185              243
## 83      Peugeot e-Traveller Long 50 kWh           130      185              243
## 134  Porsche Taycan Turbo Cross Turismo           250      385              217
## 149               Renault Zoe ZE40 R110           135      255              161
##     fastcharge_speed_km.h price_de_euro price_nl_euro price_uk_pound
## 10                    260         32500         36200          26000
## 12                    340            NA            NA          26495
## 18                    190         33850         35820          27660
## 19                    210         35650         37000          27950
## 28                    390         38350         41940          30445
## 63                    890         45100         46500          41945
## 81                    250         55900            NA          49065
## 83                    250         56690            NA          49905
## 134                   800        154444        159300         116950
## 149                   230         29990            NA             NA
# Arranging in order of least expensive to most
hyun_data <- arrange(hyun_data, `price_uk_pound`)
hyun_data
##                                  title topspeed_km.h range_km efficiency_Wh.km
## 1                      Mini Cooper SE            150      185              156
## 2                 MG MG5 EV Long Range           185      340              168
## 3                             Honda e            145      170              168
## 4         Hyundai Kona Electric 39 kWh           155      250              157
## 5                       Nissan Leaf e+           157      325              172
## 6       Hyundai IONIQ 5 Long Range 2WD           185      385              189
## 7  Peugeot e-Traveller Standard 50 kWh           130      185              243
## 8      Peugeot e-Traveller Long 50 kWh           130      185              243
## 9   Porsche Taycan Turbo Cross Turismo           250      385              217
## 10               Renault Zoe ZE40 R110           135      255              161
##    fastcharge_speed_km.h price_de_euro price_nl_euro price_uk_pound
## 1                    260         32500         36200          26000
## 2                    340            NA            NA          26495
## 3                    190         33850         35820          27660
## 4                    210         35650         37000          27950
## 5                    390         38350         41940          30445
## 6                    890         45100         46500          41945
## 7                    250         55900            NA          49065
## 8                    250         56690            NA          49905
## 9                    800        154444        159300         116950
## 10                   230         29990            NA             NA
# Hyundai price vs efficiency facet wrap
ggplot(hyun_data, aes(efficiency_Wh.km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Hyundai Price vs Efficiency", y = "Price (UK pound)", x = "Efficiency (wh/km)") +
  facet_wrap(vars(title))
## Warning: Removed 1 rows containing missing values (geom_point).

# Hyundai price vs range facet wrap 
ggplot(hyun_data, aes(range_km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Hyundai Price vs Range", y = "Price (UK pound)", x = "Range (km)") +
  facet_wrap(vars(title))
## Warning: Removed 1 rows containing missing values (geom_point).

Volkswagon

# Pulling all volkswagon rows and creaing dataframe
volks_data <- car_data[c(17,27,47,57,58,73,88,95,103,125,133),]
volks_data
##                                  title topspeed_km.h range_km efficiency_Wh.km
## 17                       Peugeot e-208           150      275              164
## 27    Peugeot e-Rifter Standard 50 kWh           135      200              225
## 47    Volkswagen ID.4 Pure Performance           160      285              182
## 57                 Volkswagen ID.4 1st           160      410              188
## 58          Kia EV6 Standard Range 2WD           185      320              181
## 73    Polestar 2 Long Range Dual Motor           205      395              190
## 88           Audi Q4 e-tron 50 quattro           180      385              199
## 95          Ford Mustang Mach-E ER AWD           180      420              210
## 103            Byton M-Byte 95 kWh 4WD           190      390              244
## 125 Audi e-tron S Sportback 55 quattro           210      335              258
## 133               Porsche Taycan Turbo           260      400              209
##     fastcharge_speed_km.h price_de_euro price_nl_euro price_uk_pound
## 17                    370         30450         34900          27225
## 27                    270         37590            NA          30375
## 47                    410         38450         42190          36030
## 57                    500            NA            NA          40800
## 58                    740         44990         44595          40985
## 73                    510         52500         53900          45900
## 88                    470         53600         64815          51370
## 95                    410         62900         67640          57030
## 103                   460         64000         65000          60000
## 125                   540         96050        106940          88700
## 133                   840        153016        157900         115860
# Arranging in order of least expensive to most
volks_data <- arrange(volks_data, `price_uk_pound`)
volks_data
##                                 title topspeed_km.h range_km efficiency_Wh.km
## 1                       Peugeot e-208           150      275              164
## 2    Peugeot e-Rifter Standard 50 kWh           135      200              225
## 3    Volkswagen ID.4 Pure Performance           160      285              182
## 4                 Volkswagen ID.4 1st           160      410              188
## 5          Kia EV6 Standard Range 2WD           185      320              181
## 6    Polestar 2 Long Range Dual Motor           205      395              190
## 7           Audi Q4 e-tron 50 quattro           180      385              199
## 8          Ford Mustang Mach-E ER AWD           180      420              210
## 9             Byton M-Byte 95 kWh 4WD           190      390              244
## 10 Audi e-tron S Sportback 55 quattro           210      335              258
## 11               Porsche Taycan Turbo           260      400              209
##    fastcharge_speed_km.h price_de_euro price_nl_euro price_uk_pound
## 1                    370         30450         34900          27225
## 2                    270         37590            NA          30375
## 3                    410         38450         42190          36030
## 4                    500            NA            NA          40800
## 5                    740         44990         44595          40985
## 6                    510         52500         53900          45900
## 7                    470         53600         64815          51370
## 8                    410         62900         67640          57030
## 9                    460         64000         65000          60000
## 10                   540         96050        106940          88700
## 11                   840        153016        157900         115860
# Volkswagon price vs range facet wrap 
ggplot(volks_data, aes(efficiency_Wh.km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Volkswagon Price vs Efficiency", y = "Price (UK pound)", x = "Efficiency (wh/km)") +
  facet_wrap(vars(title))

# Volkswagon price vs range facet wrap 
ggplot(volks_data, aes(range_km, price_uk_pound)) + geom_point() +
  theme_bw() +
  labs(title = "Volkswagon Price vs Range", y = "Price (UK pound)", x = "Range (km)") +
  facet_wrap(vars(title))

There are some valuable pieces of information to be taken away from these visualizations. In general, Tesla outperforms both Hyundai and Volkswagon, especially in terms of range, most of which being above 400 km. However, Tesla efficiency levels are comprable to Hyundai and volkswagon, despite costing half the price in some cases.

Visualizing Brands Together

# cleaning dataframes to present title, efficiency, range and price of  10 vehicles from each brand
volks_preff <- volks_data %>% select(title, efficiency_Wh.km, range_km, price_uk_pound)
volks_preff <- volks_preff %>% slice(1:10)

tesla_preff <- tesla_data %>% select(title, efficiency_Wh.km, range_km, price_uk_pound)
tesla_preff <- tesla_preff %>% slice(1:10)

hyun_preff <- hyun_data %>% select(title, efficiency_Wh.km, range_km, price_uk_pound)
hyun_preff <- hyun_preff %>% slice(1:10)
# plotting price vs efficiency based on three dataframes
cars_preff <- ggplot(NULL, aes(price_uk_pound, efficiency_Wh.km)) + 
  geom_line(data = tesla_preff, col = "red") +
  geom_line(data = hyun_preff, col = "blue") + 
  geom_line(data = volks_preff, col = "green") +
  labs(x = "Price (Pound)",
         y = "Efficiency (wh/km)",
         color = "Legend") +
    scale_color_manual(values = colors) +
  labs(title = "Price vs Efficiency of Tesla, Hyundai and Volkswagon") +
  scale_color_manual(labels = c("Tesla", "Hyundai", "Volkswagon"), values = c("red", "blue", "green"))
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
cars_preff
## Warning: Removed 1 row(s) containing missing values (geom_path).

Tesla = Red Hyundai = Blue Volkswagon = Green

# plotting price vs range based on three dataframes
cars_pran <- ggplot(NULL, aes(range_km, price_uk_pound)) + 
  geom_line(data = tesla_preff, col = "red") +
  geom_line(data = hyun_preff, col = "blue") + 
  geom_line(data = volks_preff, col = "green") +
  labs(x = "Range (km)",
         y = "Price (pound)",
         color = "Legend") +
    scale_color_manual(values = colors) +
  labs(title = "Price vs Range of Tesla, Hyundai and Volkswagon" )
cars_pran

Tesla = Red Hyundai = Blue Volkswagon = Green

My intention with this set of visualizations was to plot brand price vs performance head to head. While my previous visualizations effectively displayed the performance of specific vehicles in their own right, I needed a way to clearly present the different manufactures together at the same time. What I've taken away from these plots is that Hyudai and Volkswagon perform similarly steadily in terms of price and performance. They both produce lower to mid-price range vehicles that gradually perform better as they get more expensive. Tesla on the other hand dominates the most expensive price range, though their performance deviates more than the other brands as models get more expensive, specifically regarding efficiency that changes drastically.

Visualizing Range vs Efficiency Volkswagon and Tesla with labels

# Assigning title row 
rownames(volks_preff) <- volks_preff$title
volks_preff
##                                                                 title
## Peugeot e-208                                           Peugeot e-208
## Peugeot e-Rifter Standard 50 kWh     Peugeot e-Rifter Standard 50 kWh
## Volkswagen ID.4 Pure Performance     Volkswagen ID.4 Pure Performance
## Volkswagen ID.4 1st                               Volkswagen ID.4 1st
## Kia EV6 Standard Range 2WD                 Kia EV6 Standard Range 2WD
## Polestar 2 Long Range Dual Motor     Polestar 2 Long Range Dual Motor
## Audi Q4 e-tron 50 quattro                   Audi Q4 e-tron 50 quattro
## Ford Mustang Mach-E ER AWD                 Ford Mustang Mach-E ER AWD
## Byton M-Byte 95 kWh 4WD                       Byton M-Byte 95 kWh 4WD
## Audi e-tron S Sportback 55 quattro Audi e-tron S Sportback 55 quattro
##                                    efficiency_Wh.km range_km price_uk_pound
## Peugeot e-208                                   164      275          27225
## Peugeot e-Rifter Standard 50 kWh                225      200          30375
## Volkswagen ID.4 Pure Performance                182      285          36030
## Volkswagen ID.4 1st                             188      410          40800
## Kia EV6 Standard Range 2WD                      181      320          40985
## Polestar 2 Long Range Dual Motor                190      395          45900
## Audi Q4 e-tron 50 quattro                       199      385          51370
## Ford Mustang Mach-E ER AWD                      210      420          57030
## Byton M-Byte 95 kWh 4WD                         244      390          60000
## Audi e-tron S Sportback 55 quattro              258      335          88700
# Plotting range vs efficiency with labels 
ggplot(volks_preff, aes(x=efficiency_Wh.km, y=range_km)) +
  geom_point() + # Show dots
  geom_label(
    label=rownames(volks_preff)) + 
    labs(x = "Efficiency (wh/km)",
         y = "Range (km)",
         color = "Legend") +
    scale_color_manual(values = colors) +
  labs(title = "Range vs Efficiency of Volkswagon" )

# Assigning title row 
rownames(tesla_preff) <- tesla_preff$title
tesla_preff
##                                                                       title
## Mazda MX-30                                                     Mazda MX-30
## Tesla Cybertruck Single Motor                 Tesla Cybertruck Single Motor
## Tesla Model 3 Standard Range Plus LFP Tesla Model 3 Standard Range Plus LFP
## Tesla Model 3 Standard Range Plus         Tesla Model 3 Standard Range Plus
## Tesla Cybertruck Dual Motor                     Tesla Cybertruck Dual Motor
## Tesla Model 3 Long Range Dual Motor     Tesla Model 3 Long Range Dual Motor
## Tesla Model Y Long Range Dual Motor     Tesla Model Y Long Range Dual Motor
## Tesla Model Y Performance                         Tesla Model Y Performance
## Tesla Cybertruck Tri Motor                       Tesla Cybertruck Tri Motor
## Tesla Model S Long Range                           Tesla Model S Long Range
##                                       efficiency_Wh.km range_km price_uk_pound
## Mazda MX-30                                        176      170          26045
## Tesla Cybertruck Single Motor                      256      390          39000
## Tesla Model 3 Standard Range Plus LFP              150      350          40990
## Tesla Model 3 Standard Range Plus                  146      350          40990
## Tesla Cybertruck Dual Motor                        261      460          48000
## Tesla Model 3 Long Range Dual Motor                154      455          48490
## Tesla Model Y Long Range Dual Motor                171      410          54000
## Tesla Model Y Performance                          177      430          60000
## Tesla Cybertruck Tri Motor                         267      750          68000
## Tesla Model S Long Range                           162      555          83980
# Plotting range vs efficiency with labels 
ggplot(tesla_preff, aes(x=efficiency_Wh.km, y=range_km)) +
  geom_point() + # Show dots
  geom_label(
    label=rownames(tesla_preff)) +
  labs(x = "Efficiency (wh/km)",
         y = "Range (km)",
         color = "Legend") +
    scale_color_manual(values = colors) +
  labs(title = "Range vs Efficiency of Tesla" )

The purpose of these two visualizations was to precisely identify specifically which Teslas and Volkswagons outperform other models. They are meant to build upon the earlier facet wraps, consolidating the information and displaying it in a distinct way. From Volkswagen there are a few vehicles that stand out, the Volkswagen ID.4 GTX, ID.4 Pro Performance and the 3.1 S Pro - 4 seater. From Tesla, the various Cybertrucks outperform other models by a large margin with the exception of the Model S Long Range.

Reflection

With electric vehicles becoming more and more prominent among car manufacturers and as states move towards banning the manufacturing of gas cars I sought to delve into the current market. The most challenging aspect of this project was trying to draw valuable information and visualizations from the fairly limited initial dataset. This meant a lot of data wrangling and narrowing to create more focused dataframes and visualizations through price range manfucacturer. I identified efficiency, range and price as the most relevant variables in terms of performance. Also, in my opinion, these are the most important variables when it comes to comparing electric vehicles to gas alternatives. In order to improve this project I would have like to have more data regarding the market sales of each vehicle and how they are rated among comsumers. This would allow me to ask more specific questions and judge the how each manufacturer fucntions within the market. While I find my project is insightful for those interested in researching the electric car market, I struggled to find ways of presenting powerful information to a general audience.

Conclusion

How does efficiency differentiate among the most expensive electric vehicles? - The efficiencies of the most expensive vehicles vary minutely, from around 190 to 220. However, there os not a strong correlation between price and efficiency, espeically since plently of less expensive vehicles have greater efficiencies.

How does efficiency differentiate among the least expensive electric vehicles? - The efficiencies and prices among the least expensive vehicels differentiate less than with the most expensive, most falling around 160 wh/km.

How does efficiency differentiate among mid-priced electric vehicles? - Similar to the least expensive, the prices and efficiencies of mid-priced vehicles don't deviate greatly, most falling around 190 wh/km. The price vs efficiency performances are comprable to the most expensiv vehicels.

How does price affect efficiency and range among Teslas - As Teslas get more expensive, efficiency and range tend to improve, with the exeption of Cybertrucks which are less expensive but with outstanding efficiencies.

How does price affect efficiency and range among Volkswagens? - As Volkswagen get more expensive, efficiency and range improve more steadily than Tesla, presenting a strong correlation between price, efficiency and range.

How does price affect efficiency and range among Hyundai? - Similar to Volkswagen, Hyundai models present a very strong correlation between price, efficiency and range, as performance improves in a positve linear way as price increases.

How does price and performance compare among Tesla, Volkswagen and Hyundai? - While price strongly implicates the performance of Volkswagen and Hyundai, Teslas present more inconsistencies with cheaper vehicles performing better than some of the most expensive. The price of Volkswagens and Hyudais correlate more with their perfomance.

Unanswered Questions - How do Tesla, Volkswagen and Hyundai compare to other manufacturers included in the dataset? - How does the performance of certain vehicles compare to their popularity among the public?

Bibliography

RStudio Team (2020). RStudio: Integrated Development for R. RStudio, PBC, Boston, MA URL http://www.rstudio.com/

Wickham, H., & Grolemund, G. (2016). R for data science: Visualize, model, transform, tidy, and import data. OReilly Media.

Yo Han Joo. (October, 2021). Electric Cars 2021, Version 1. Retrieved June, 2021 from https://www.kaggle.com/datasets/searoll/electric-cars-2021.