2025-11-2

The Dataset

- This project uses a 2025 Electric Vehicles specifications dataset from kaggle that contains 478 datapoints of EV models and trims.

  • The dataset has 22 columns, including battery capacity (kWh), range (km), efficiency (Wh/km), acceleration, drivetrain, segment, body type, and fast charging power.

Brief Overview

We are going to explore the data through different visualizations to better understand and analyze the dataset. The following is the layout:

-Bar Graph: Shows the average EV range by body type to compare which design have the highest and lowest ranges based on efficiency and battery capacity.

-Scatter plot: Shows key engineering factors that impact range. We plotted battery capacity, efficiency, and range together in 3D to visualize tradeoffs.

-Pie Chart: For three efficiency tiers (low, med, high), we show how average DC fast charge power is distributed across body types.

-Box Plot: Shows distribution of range across body types to compare spread and medians.

-Statistical Analysis: 5 number summary of range by body type.

Bar Graph

This bar graph represents the average EV range in kilometers across different body types. Each bar’s length indicates how far vehicles of that build can travel on a full charge. The graph provides insight into how vehicle design impacts energy efficiency and driving range in EVs. From the bar graph, Station/Estate, Liftback Sedan, and Sedan body types tend to have the highest average ranges, likely due to their designs and larger battery capacities. In contrast, Cabriolets and Small Passenger Vans have lower ranges, which could be due to their more compact builds.

Plotly 3D plot

The following is a 3D Scatter Plot of Battery Capacity, Efficiency, and Range.

3D plot Analysis

The 3D plot shows three variables and colored data points by vehicle segment to see what impacts range. Battery capacity generally increases range, while higher efficiency tends to decrease range. Segments cluster tend to cluster likely due to shared design constraints and aerodynamics.The cloud of points typically slopes upward with battery capacity and downward with efficiency values.

-Luxury and Executive segments seem to have the largest batteries and highest ranges, reflecting more performance-focused designs. Compact and Mini vehicles cluster lower on the plot with smaller batteries and shorter ranges as they are typically designed for efficiency and urban use.

-Outliers could reflect performance trims or unusually efficient designs.

Pie Charts

To compare electric vehicle performance, we used a pie chart where the dataset is divided into three tiers of efficiency based on energy consumption per kilometer: low efficiency, medium efficiency, and high efficiency. The low tier is more than 190 Wh/km, medium tier is 146-190 Wh/km. Anything less than or equal to 145 Wh/km high. Each pie chart represents the average DC fast charging power across different body types within each efficiency level. From the charts, we can see that sedans and SUVs dominate the low efficiency tier. As efficiency increases, the distribution becomes more balanced across body types.

Ggplot Boxplot Code

To compare the distribution of range across body types, a boxplot is used. The following is the code for the box plot of range by body type:

ggplot(EV, aes(x = car_body_type, y = range_km)) + 
  geom_boxplot(aes(color = car_body_type), fill = "white") +  
  labs(title = "Boxplot of EV Range by Body Type",
       x = "Body Type", 
       y =  "Range (km)")

Ggplot EV Range by Body Type

To find a correlation between body type and range, we use a boxplot to compare each body type. From the plot, Sedans and Station/Estate vehicles have the highest and most consistent ranges and Cabriolets and Small Passenger Vans are skewed toward the lower end. SUVs and hatchbacks fall in between, with a wider spread that suggests more variation among models.

Statistical Analysis

From the 5 number summary, Sedans and Station/Estate cars have the highest medians and widest ranges, showing that these body types tend to achieve higher and more variable driving distances. Liftback Sedans also show a high maximum, which could suggest strong performance. Cabriolets and Small Passenger Vans are more tightly distributed with lower medians, meaning most models have shorter ranges and little variation. SUVs and Hatchbacks fall near the middle, with moderate skew toward higher values. Overall, the data suggests that range tends to increase and spread out for larger or more aerodynamic designs, while smaller vehicles cluster toward lower medians.

## # A tibble: 7 × 6
##   car_body_type         Min    Q1 Median    Q3   Max
##   <chr>               <int> <dbl>  <dbl> <dbl> <int>
## 1 Cabriolet             135  159.   182.  206.   230
## 2 Hatchback             135  250    308.  352.   470
## 3 Liftback Sedan        320  460    482.  504.   610
## 4 SUV                   245  350    410   450    530
## 5 Sedan                 290  450    505   535    665
## 6 Small Passenger Van   180  195    260   295    370
## 7 Station/Estate        310  485    505   515    575

Conclusion

Based on the bar graph, box plot, pie charts, and 3D scatter plot, there is a clear relationship between vehicle design, efficiency, and range performance. Body type plays a significant role in determining range. Sedans and Station/Estate cars have higher medians and wider distributions, while smaller body types like Cabriolets and Vans show lower, more compact ranges. The 3D scatter plot further shows that higher battery capacity and better efficiency correlate with longer ranges. The pie charts demonstrate that less efficient vehicles tend to support higher DC fast charging power. Overall, the data indicates that efficiency, charging capability, and body design are closely related, showing how engineering design choices shape the performance EVs.