Powering the Future: An Analytical Journey Through the 2024 Electric Vehicle Population Data with Python
Background
As the entire world shifts to more environmentally friendly modes of transportation, electric cars, or EVs, are becoming essential tools in the fight against global warming. Global governments’ from every single country efforts to reduce carbon emissions have resulted in a notable increase in the use of electric vehicles. This change heralds a revolutionary period in consumer behavior and technical growth in addition to having an impact on environmental regulations.
The electric vehicle market is still developing actively in various regions in 2024. Knowing where and how quickly this change is happening at the county level can help with future development projections, existing trends, and the efficacy of policies meant to encourage the use of electric vehicles. It also draws attention to the economic and infrastructural adjustments towns are making in order to facilitate this shift.
The “Electric Vehicle Population by County (2024)” dataset provides in-depth examination of the distribution and density of electric vehicles in different counties, allowing for a deeper dive into this topic. Policymakers, companies, and researchers involved in the design and promotion of sustainable practices need to know this data.
Using Python — especially modules such as Matplotlib and Seaborn for data visualization, and Pandas for data manipulation — this project attempts to do an extensive Exploratory Data Analysis (EDA). Finding hidden trends, identifying abnormalities, and deriving significant insights that can educate stakeholders and the general public about the direction of the electric car market are the objectives.
This article will present the current status of electric vehicle adoption, examine distributional differences, and talk about possible causes affecting these trends using statistical and visual analysis. Come along as author examine the statistics from 2024 to see how transportation will develop in the future and lead to a more environmentally friendly and clean world.
Objectives
Using the extensive 2024 Electric Vehicle Population by County dataset, this research attempts to analyze and display the patterns and distributions of electric vehicles (EVs) across U.S. counties. Using Python’s robust data manipulation and visualization modules, the main goals of this study are as follows:
- Finding the Top Counties for EV Adoption:
The primary goal is to identify the ten counties with the greatest proportion of electric vehicles.
Sub-Objective: Segment the data according to the types of electric vehicles: plug-in hybrid electric vehicles (PHEVs) and battery electric vehicles (BEVs). This distinction will enable to determine which kind of electric vehicle is more common in these top counties. - Analysis of EV Growth Trends, 2017–2024:
Keep tabs on and chart the overall quantity of electric cars from 2017 to 2024 to see trends and the acceleration of EV adoption over time. This trend study will provide light on how quickly the switch to electric vehicles is happening. - Examine the correlation between the overall number of electric vehicles and the numbers of BEVs and PHEVs in particular using correlation analysis. This study will make it easier to comprehend how the expansion of these subcategories affects the EV market as a whole.
- Comparative Analysis of EV Penetration:
To get a better understanding of EV penetration, compute and display the proportion of electric versus non-electric vehicles.
Sub-Objective: To determine which electric models are most popular across all vehicle types, further break down these percentages by vehicle type (BEV and PHEV).
By achieving these goals, the essay hopes to give readers a thorough overview of the adoption of electric vehicles as it stands today and insightful information on the various roles that EVs play in the larger transition to more environmentally friendly modes of transportation. Policymakers, companies, and EV aficionados alike will gain from this investigation of the changing dynamics of the EV sector.
Dataset
An exploration of data starts with the ‘Electric Vehicle Population by County (2024)’ dataset, a comprehensive set of data that sheds light on the distribution of electric vehicle (EV) ownership in different U.S. counties. This dataset offers a thorough analysis of car registrations as of 2024, revealing which kinds of vehicles are moving the automotive industry in the direction of sustainability. Let’s pause to comprehend the columns that constitute the core of author analysis:
- Date: Indicates the day the data was collected and shows the total number of cars that were registered at the end of the month.
- County: Provides a more granular perspective on the distribution of electric vehicles by identifying the area in a state where the owner of the car resides.
- State: Enables to compare statewide trends by indicating the larger geographic area of the nation linked to the car registration.
- Vehicle Primary Use: Explains the vehicle’s intended primary use while making a suggestion about the environment in which EV adoption is occurring.
- Battery Electric Vehicles (BEVs): A clear indicator of the transition to fully electric mobility, BEVs are automobiles that are exclusively powered by an onboard electric battery.
- Plug-in hybrid electric vehicles (PHEVs): An automobiles that run on a combination of electricity and a different energy source. They represent a new development in the EV ecosystem.
- Electric Vehicle (EV) Total: Presents a comprehensive picture of the adoption of electric vehicles by totaling the number of BEVs and PHEVs.
- Non-Electric Vehicles: This category includes cars without electric propulsion, providing a comparison to determine the extent of EV adoption.
- Total Vehicles: Used as a denominator to calculate the EV market share, this term refers to all vehicles registered in the county.
- Percentage of Electric Vehicles: Provides a direct percentage for evaluating the prevalence of electric vehicles by comparing electric and non-electric vehicles.
The author will examine the characteristics of owning an electric vehicle and identify any patterns that emerge from the data using this dataset as a guide. The author’s analysis will cover county-by-county distributions, the evolution of EVs in the past few years, and the interrelationships among various electric vehicle kinds. In order to assess how well integrated electric vehicles are into the larger automotive scene, the author will also look at the percentage of electric vehicles.
EDA
Loading the Data
#importing the libraries needed
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
#read data using pandas
ev_data = pd.read_csv('/Users/anpabelt/Downloads/Electric_Vehicle_Population_Size_History_By_County_.csv')
ev_data

Parse the Date Column
#reload the data but change the Date column to date data type
ev_data = pd.read_csv('/Users/anpabelt/Downloads/Electric_Vehicle_Population_Size_History_By_County_.csv', parse_dates=['Date'])
ev_data.head()

# Extract the day from the 'Date' column and create a new column 'day' in 'ev_data'
ev_data['day'] = ev_data['Date'].dt.day
# Extract the month from the 'Date' column and create a new column 'month' in 'ev_data'
ev_data['month'] = ev_data['Date'].dt.month
# Extract the year from the 'Date' column and create a new column 'year' in 'ev_data'
ev_data['year'] = ev_data['Date'].dt.year
# Display the DataFrame to view the changes
ev_data

Replace String
# Remove commas and periods from the 'Battery Electric Vehicles (BEVs)' column to clean numeric data stored as strings
ev_data["Battery Electric Vehicles (BEVs)"] = ev_data["Battery Electric Vehicles (BEVs)"].str.replace(",", "").str.replace(".", "")
# Remove commas and periods from the 'Plug-In Hybrid Electric Vehicles (PHEVs)' column for similar reasons
ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"] = ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"].str.replace(",", "").str.replace(".", "")
# Clean the 'Electric Vehicle (EV) Total' column by removing commas and periods, preparing it for numeric analysis
ev_data["Electric Vehicle (EV) Total"] = ev_data["Electric Vehicle (EV) Total"].str.replace(",", "").str.replace(".", "")
# Remove commas and periods from 'Non-Electric Vehicle Total' to ensure the data can be treated as numeric
ev_data["Non-Electric Vehicle Total"] = ev_data["Non-Electric Vehicle Total"].str.replace(",", "").str.replace(".", "")
# Similarly, clean the 'Total Vehicles' column by removing commas and periods
ev_data["Total Vehicles"] = ev_data["Total Vehicles"].str.replace(",", "").str.replace(".", "")
# Display the DataFrame to view the changes
ev_data

Convert String to Numeric
# Convert 'Battery Electric Vehicles (BEVs)' column to a numeric data type
ev_data["Battery Electric Vehicles (BEVs)"] = pd.to_numeric(ev_data["Battery Electric Vehicles (BEVs)"])
# Convert 'Plug-In Hybrid Electric Vehicles (PHEVs)' column to a numeric data type
ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"] = pd.to_numeric(ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"])
# Convert 'Electric Vehicle (EV) Total' column to a numeric data type
ev_data["Electric Vehicle (EV) Total"] = pd.to_numeric(ev_data["Electric Vehicle (EV) Total"])
# Convert 'Non-Electric Vehicle Total' to a numeric data type
ev_data["Non-Electric Vehicle Total"] = pd.to_numeric(ev_data["Non-Electric Vehicle Total"])
# Convert 'Total Vehicles' column to a numeric data type
ev_data["Total Vehicles"] = pd.to_numeric(ev_data["Total Vehicles"])
# Display the DataFrame to view the changes
ev_data


Fill Null Value
# Replace missing values in the 'County' column with 'Unknown'
ev_data['County'] = ev_data['County'].fillna('Unknown')
# Replace missing values in the 'State' column with 'Unknown'
ev_data['State'] = ev_data['State'].fillna('Unknown')

Removing Outlier
- Check Describe Data

As is evident, a number of columns — including Battery Electric Vehicles (BEVs), Plug-In Hybrid Electric Vehicles (PHEVs), Electric Vehicle (EV) Total, Non-Electric Vehicle Total, Total Vehicles, and Percent Electric Vehicles — have warning signs indicating they contain outliers.
- Removing BEV Outlier
# Calculate IQR
Q1 = ev_data["Battery Electric Vehicles (BEVs)"].quantile(0.25)
Q3 = ev_data["Battery Electric Vehicles (BEVs)"].quantile(0.75)
IQR = Q3 - Q1
# Calculate the upper limit for outliers
BEV_max_limit = Q3 + 1.5 * IQR
# Calculate the median
BEV_median = ev_data["Battery Electric Vehicles (BEVs)"].median()
# Replace outliers with the median
ev_data.loc[ev_data["Battery Electric Vehicles (BEVs)"] > BEV_max_limit, "Battery Electric Vehicles (BEVs)"] = BEV_median
# Plot the boxplot again using the updated dataset
sns.boxplot(x=ev_data["Battery Electric Vehicles (BEVs)"])
plt.show()
- Removing PHEVs Outlier
# Calculate IQR
Q1 = ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"].quantile(0.25)
Q3 = ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"].quantile(0.75)
IQR = Q3 - Q1
# Calculate the upper limit for outliers
plugin_max_limit = Q3 + 1.5 * IQR
# Calculate the median
plugin_median = ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"].median()
# Replace outliers with the median
ev_data.loc[ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"] > plugin_max_limit, "Plug-In Hybrid Electric Vehicles (PHEVs)"] = plugin_median
# Plot the boxplot again using the updated dataset
sns.boxplot(x=ev_data["Plug-In Hybrid Electric Vehicles (PHEVs)"])
plt.show()
- Removing Electric Vehicle (EV) Total Outlier
# Calculate IQR
Q1 = ev_data["Electric Vehicle (EV) Total"].quantile(0.25)
Q3 = ev_data["Electric Vehicle (EV) Total"].quantile(0.75)
IQR = Q3 - Q1
# Calculate the upper limit for outliers
elect_vehicle_max_limit = Q3 + 1.5 * IQR
# Calculate the median
elect_vehicle_median = ev_data["Electric Vehicle (EV) Total"].median()
# Replace outliers with the median
ev_data.loc[ev_data["Electric Vehicle (EV) Total"] > elect_vehicle_max_limit, "Electric Vehicle (EV) Total"] = elect_vehicle_median
# Plot the boxplot again using the updated dataset
sns.boxplot(x=ev_data["Electric Vehicle (EV) Total"])
plt.show()
- Removing Non-Electric Vehicle Total Outlier
# Calculate IQR
Q1 = ev_data["Non-Electric Vehicle Total"].quantile(0.25)
Q3 = ev_data["Non-Electric Vehicle Total"].quantile(0.75)
IQR = Q3 - Q1
# Calculate the upper limit for outliers
non_ev_max_limit = Q3 + 1.5 * IQR
# Calculate the median
non_ev_median = ev_data["Non-Electric Vehicle Total"].median()
# Replace outliers with the median
ev_data.loc[ev_data["Non-Electric Vehicle Total"] > non_ev_max_limit, "Non-Electric Vehicle Total"] = non_ev_median
# Plot the boxplot again using the updated dataset
sns.boxplot(x=ev_data["Non-Electric Vehicle Total"])
plt.show()
- Removing Total Vehicles Outlier
# Calculate IQR
Q1 = ev_data["Total Vehicles"].quantile(0.25)
Q3 = ev_data["Total Vehicles"].quantile(0.75)
IQR = Q3 - Q1
# Calculate the upper limit for outliers
vehicle_max_limit = Q3 + 1.5 * IQR
# Calculate the median
vehicle_median = ev_data["Total Vehicles"].median()
# Replace outliers with the median
ev_data.loc[ev_data["Total Vehicles"] > vehicle_max_limit, "Total Vehicles"] = vehicle_median
# Plot the boxplot again using the updated dataset
sns.boxplot(x=ev_data["Total Vehicles"])
plt.show()
- Remove Percent Electric Vehicles Outlier
# Calculate IQR
Q1 = ev_data["Percent Electric Vehicles"].quantile(0.25)
Q3 = ev_data["Percent Electric Vehicles"].quantile(0.75)
IQR = Q3 - Q1
# Calculate the upper limit for outliers
percent_max_limit = Q3 + 1.5 * IQR
# Calculate the median
percent_median = ev_data["Percent Electric Vehicles"].median()
# Replace outliers with the median
ev_data.loc[ev_data["Percent Electric Vehicles"] > percent_max_limit, "Percent Electric Vehicles"] = percent_median
# Plot the boxplot again using the updated dataset
sns.boxplot(x=ev_data["Percent Electric Vehicles"])
plt.show()
Group By
# Group data by 'County' and aggregate specified columns
ev_groupby_county = ev_data.groupby(["County"]).agg({
"Electric Vehicle (EV) Total": "sum", # Sum of electric vehicles per county
"Total Vehicles": "sum", # Sum of all vehicles per county
"Non-Electric Vehicle Total": "sum", # Sum of non-electric vehicles per county
"Plug-In Hybrid Electric Vehicles (PHEVs)": "sum", # Sum of plug-in hybrids per county
"Battery Electric Vehicles (BEVs)": "sum", # Sum of battery electric vehicles per county
"Percent Electric Vehicles": "mean" # Average percentage of electric vehicles per county
}).reset_index()
# Calculate the ratio of electric vehicles to total vehicles within each county
ev_groupby_county["Electric Vehicle Ratio"] = ev_groupby_county["Electric Vehicle (EV) Total"] / ev_groupby_county["Total Vehicles"]
# Display the resulting DataFrame
ev_groupby_county
Visualization and Insight
- Finding the Top Counties for EV Adoption
# Sort the DataFrame based on the total electric vehicles in descending order
ev_groupby_county = ev_groupby_county.sort_values(by="Electric Vehicle (EV) Total", ascending=False)
# Set up the figure size and title for better visibility and aesthetics
plt.figure(figsize=(12, 8))
plt.title("Top 10 Counties by Electric Vehicle (EV) Total")
# Rotate the x-axis labels to prevent overlap and make them easier to read
plt.xticks(rotation=90)
# Create a bar plot of the top 10 counties by electric vehicle totals
sns.barplot(data=ev_groupby_county.head(10), x="County", y="Electric Vehicle (EV) Total")
# Adjust the layout to make sure none of the plot elements are cut off
plt.tight_layout()
# Display the plot
plt.show()

Sub-Objective:
Segment the data according to the types of electric vehicles: plug-in hybrid electric vehicles (PHEVs) and battery electric vehicles (BEVs).
- BEVs
# Sort the DataFrame based on the number of Battery Electric Vehicles (BEVs) in descending order
ev_groupby_county = ev_groupby_county.sort_values(by="Battery Electric Vehicles (BEVs)", ascending=False)
# Set up the figure size and title for the plot
plt.figure(figsize=(12, 8))
plt.title("Top 10 Counties by Battery Electric Vehicles (BEVs)")
# Rotate the x-axis labels to prevent overlap and make them readable
plt.xticks(rotation=90)
# Plot the top 10 counties for Battery Electric Vehicles using seaborn's barplot
sns.barplot(data=ev_groupby_county.head(10), x="County", y="Battery Electric Vehicles (BEVs)")
# Adjust the layout to ensure all plot elements are visible and not cut off
plt.tight_layout()
# Display the plot
plt.show()

- PHEVs
# Sort the DataFrame by the number of Plug-In Hybrid Electric Vehicles (PHEVs) in descending order
ev_groupby_county = ev_groupby_county.sort_values(by="Plug-In Hybrid Electric Vehicles (PHEVs)", ascending=False)
# Initialize the plot with a specified figure size and title
plt.figure(figsize=(12, 8))
plt.title("Top 10 Counties by Plug-In Hybrid Electric Vehicles (PHEVs)")
# Rotate x-axis labels for better legibility
plt.xticks(rotation=90)
# Create a bar plot for the top 10 counties with the most PHEVs using seaborn's barplot function
sns.barplot(data=ev_groupby_county.head(10), x="County", y="Plug-In Hybrid Electric Vehicles (PHEVs)")
# Adjust the layout to ensure there are no layout issues such as clipping or overlapping
plt.tight_layout()
# Display the visualized plot
plt.show()

Examining current statistics reveals which counties are leading the charge in moving away from gasoline and toward an electric dawn. The top ten counties’ bar charts, which are arranged according to EV totals, PHEV totals, and BEV totals, provide an intriguing story about regional adoption patterns and preferences that are influencing transportation in the future.
Montgomery County stands out as a leader in electric mobility, taking the top ranks on two separate adoption lists for BEVs and EVs. This suggests that there is a strong demand for all-electric alternatives, which may be fueled by extensive charging infrastructure or progressive local incentives.
Counties that choose battery electric vehicles (BEVs) over plug-in hybrid electric vehicles (PHEVs) are clearly distinguished from one another. Even while PHEVs provide consumers switching from conventional combustion engines with a bridge technology, some counties’ choice for BEVs indicates a commitment to fully electric futures. The fact that counties like Orange and Clark rank highly for both PHEV and EV adoption demonstrates the regional disparities in infrastructural preparedness and customer confidence.
The different county leaders in each category highlight the heterogeneous adoption landscape of electric vehicles. Certain places might give preference to BEVs and other short-range urban mobility solutions, while others might adopt a hybrid strategy to accommodate longer commutes with less reliable charging alternatives.
One graphic is particularly intriguing because it has a ‘Unknown’ category, which tells us a lot about the difficulties in classifying and gathering data when tracking the spread of electric vehicles. This raises the possibility that the electric wave is even more widespread than is indicated by the underreported numbers.
The information seems to indicate that municipal policies have an effect on the rates of EV adoption. Counties that appear on these maps most often have policies that encourage charging, such as tax benefits, rebates, and infrastructure expenditures. This suggests that policies can have a significant influence on consumer behavior.
It is evident from the variations in the top 10 counties for the adoption of EV, PHEV, and BEV that there is no one-size-fits-all strategy for electrification. The different ways that counties appear in these charts show a complex environment where policy, economic, and geographic factors interact to influence the adoption of electric vehicles in novel ways.
It is evident that the road to electrification is both colorful and varied. Stakeholders hoping to speed the EV adoption curve nationally will need to understand the drivers driving these regions forward. The future is electric, and these counties are paving the way for a cleaner, greener future by setting the standard.
2. Analysis of EV Growth Trends, 2017–2024
# Group data by year and aggregate the sum of Electric Vehicle (EV) totals
ev_groupby_year = ev_data.groupby('year').agg({
"Electric Vehicle (EV) Total": "sum",
# Assuming "Total Vehicles" is the correct column name for the sum of all vehicles
"Total Vehicles": "sum"
}).reset_index()
# Plot the Electric Vehicle (EV) totals over the years
plt.plot(ev_groupby_year['year'], ev_groupby_year['Electric Vehicle (EV) Total'], color='blue', label='Electric Vehicle (EV) Total')
# Include labels and legend for clarity
plt.xlabel('Year')
plt.ylabel('Electric Vehicle (EV) Total')
plt.title('Annual Growth of Electric Vehicle Adoption')
plt.legend()
# Show the plot
plt.show()

The line chart illustrates the adoption of electric vehicles (EVs) from 2017 to early 2024. It shows a trend of increasing growth followed by what looks to be a first decline in 2024. It is important to interpret this apparent decline with caution, though, given the data for 2024 is probably not full and only covers the first few months of the year.
The adoption of EVs has a steady rising trajectory from 2017 to 2023. Increased consumer environmental consciousness, a more expansive network of charging stations, technology developments that have enhanced car performance and range, and a supportive governmental framework that offers incentives for EV customers are some of the factors contributing to this expansion.
It would be premature to declare the apparent 2024 dip to be a reversal of the increasing trend. The lower numbers could be explained by seasonal purchasing patterns, first slow production ramp-ups, or transient market swings, as the data only covers the first few months of the year. In the past, car sales have shown cyclical trends over the course of a year, frequently impacted by variables including the introduction of new models, economic cycles, and customer behavior.
Optimism is bolstered by the EV market’s fundamental strength, as demonstrated in prior years. The future of EVs looks bright as long as the growth-promoting elements — such as government incentives, public acceptance of green technologies, and technological progress in EVs — remain in place.
To obtain a better understanding of 2024’s performance, it will be essential to keep an eye on the data as it becomes available. More trustworthy indicators of the market’s trajectory and the influence of outside forces on EV adoption will come from any persistent trends, whether they be upward or downward.
It is important for investors, legislators, and automakers to understand that the early 2024 statistics are preliminary. Rather than making snap decisions in response to short-term variations, strategic decisions should be based on at least a full year’s worth of data in order to comprehend and address long-term trends.
The market for electric vehicles is renowned for being dynamic due to the quick improvements and changing tastes of consumers. The data from early 2024 provide us a chance to reflect on the greater picture: a prolonged expansionary phase that portends a more environmentally friendly future. Stakeholders should keep flexible to adapt to any new market realities while preserving the elements that have contributed to the EV surge thus far as the year goes on.
3. Examine the correlation between the overall number of electric vehicles and the numbers of BEVs and PHEVs
# Create a 9x9 figure and axes for the heatmap with a set figure size
f, ax = plt.subplots(figsize=(9, 9))
# Set the title of the heatmap
ax.set_title('EV Sales Correlation Heat Map')
# Create a heatmap to visualize the correlation matrix of the ev_corr DataFrame
# 'annot=True' adds the numerical value inside each cell for better readability
# 'robust=True' accounts for outliers and ensures they do not skew the color palette
# 'linewidths=.1' adds a thin line to separate the cells
# 'fmt= '.2f'' formats the correlation values to two decimal points
# 'ax=ax' assigns the created ax as the axes on which to plot the heatmap
sns.heatmap(ev_corr.corr(), annot=True, robust=True, linewidths=.1, fmt='.2f', ax=ax)
# Display the heatmap
plt.show()

The overall number of EVs and PHEVs has a relatively strong positive connection (0.48), according to the heatmap. This implies that the overall number of EVs tends to expand along with the number of PHEVs. Perhaps because of their versatility with both electric and combustion engines, PHEVs appear to be a viable electric option in the eyes of consumers, as seen by their large contribution to the overall EV industry.
Comparably, although not as strongly as with PHEVs, there is a positive connection (0.33) between BEVs and the total number of EVs. This suggests that while the relationship between BEVs and the expansion of the EV market as a whole is less direct than it is for PHEVs. It’s possible that BEV adoption is more susceptible to variables like car range or charging infrastructure, or that BEVs are more common in particular markets or demographic groups.
4. Comparative Analysis of EV Penetration
# Set the figure size to 8x8 inches for the pie chart
plt.figure(figsize=(8, 8))
# Define the categories for the pie chart
labels = ['Electric Vehicle (EV) Total', 'Non-Electric Vehicle Total']
# Calculate the sizes for each slice of the pie chart by summing the totals from the data
sizes = [ev_data['Electric Vehicle (EV) Total'].sum(), ev_data['Non-Electric Vehicle Total'].sum()]
# Create the pie chart with the sizes and labels defined above
# 'autopct' formats the percentage shown in each slice to one decimal place
# 'startangle' rotates the start of the pie chart to 140 degrees for better orientation
plt.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=140)
# Set the title of the pie chart
plt.title('Electric Vehicle vs Non-Electric Vehicle')
# 'plt.axis('equal')' ensures that the pie chart is drawn as a circle rather than an ellipse
plt.axis('equal')
# Adjust the layout to ensure that the pie chart fits into the figure area neatly
plt.tight_layout()
# Display the pie chart
plt.show()

The pie chart illustrates a sobering truth despite the fervor and expanding trends in the adoption of electric vehicles (EVs). With just 0.1% of the market, electric vehicles are tiny compared to non-electric vehicles, which account for 99.9% of the market.
The graph illustrates how the EV market is still in its infancy inside the larger automotive sector. Even though electric vehicles (EVs) are generating a lot of excitement due to their potential, their market share is still very small when compared to cars.
The little percentage of EVs further highlights the enormous growth potential. Electric technologies are still mostly unexplored in the automobile sector, which offers significant opportunity for manufacturers, governments, and the energy sector to invest and increase the EV footprint.
Inquiries about obstacles to EV adoption are also raised by this image. It’s possible that barriers to a quicker adoption of electric vehicles include consumer behavior, charging infrastructure, range anxiety, and vehicle pricing.
Aggressive legislative interventions, creative business models, and technological advancements will be required to alter the makeup of this pie. Stakeholders are urged by the chart to step up their efforts to increase the popularity and accessibility of EVs.
Even with EVs’ benefits to the environment and technology, the market still views them as an alternative rather than a standard choice. Increased public awareness campaigns, aggressive marketing, and improved customer confidence and experience with EVs could all lead to a shift in this.
In addition to providing a progress report, the pie chart’s stark visualization acts as a strategic road map for the next steps. It is clear that although the road toward electric vehicles has started, more work is ahead and requires coordinated effort. The little portion of the automobile industry that currently represents electric vehicles (EVs) has the potential to increase significantly in the future with the correct combination of infrastructure, incentives, and innovation.
Sub-Objective:
To determine which electric models are most popular across all vehicle types, further break down these percentages by vehicle type (BEV and PHEV).
# Initialize a square figure with 8x8 dimensions to ensure the pie chart is circular
plt.figure(figsize=(8, 8))
# Define the two categories to be displayed in the pie chart
labels = ['Battery Electric Vehicles (BEVs)', 'Plug-In Hybrid Electric Vehicles (PHEVs)']
# Calculate the size of each pie slice by summing up the respective vehicle counts from the dataset
sizes = [ev_data['Battery Electric Vehicles (BEVs)'].sum(), ev_data['Plug-In Hybrid Electric Vehicles (PHEVs)'].sum()]
# Create the pie chart with the calculated sizes and the defined labels
# The 'autopct' parameter allows displaying the percentage on the pie slices with one decimal point
# The 'startangle' parameter sets the starting angle of the first slice; this is often used for better visual distribution of the slices
plt.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=140)
# Set the title of the pie chart to indicate what is being compared
plt.title('Battery Electric Vehicles (BEVs) vs Plug-In Hybrid Electric Vehicles (PHEVs)')
# Set the aspect of the axis scaling to 'equal' to ensure the pie chart is drawn as a circle
plt.axis('equal')
# Use 'plt.tight_layout()' to automatically adjust the subplot parameters for the figure to fit into the display area
plt.tight_layout()
# Display the final pie chart
plt.show()

The market share of Plug-In Hybrid Electric Vehicles (PHEVs) and Battery Electric Vehicles (BEVs) is nearly equal, with PHEVs having a little advantage. This intriguing equilibrium in the electric car landscape is seen in the pie chart. This balancing offers many perspectives on customer inclinations and the current status of electric vehicle advancements.
The distribution indicates that consumers’ preferences for fully electric BEVs and the adaptability of PHEVs are nearly evenly split. This may point to a changing market where a variety of factors, such as range anxiety, the availability of charging infrastructure, environmental concerns, and vehicle performance, are impacting consumer choices.
The similar statistics show that both BEVs and PHEVs have reached a level of technological maturity where they are now practical options. It highlights how well PHEVs solve range issues while providing a “best of both worlds” option for individuals who aren’t ready to go entirely to electric vehicles.
The popularity of PHEVs as a transitional technology that provides a hybrid solution in places where EV charging infrastructure is still emerging may be the reason for their minor advantage. On the other hand, areas with superior charging infrastructure and greater rates of consumer uptake are probably seeing a surge in the use of BEVs.
Policies and incentives from the government that favor one kind of vehicle over another may also have an impact on these figures. A balanced split implies that existing policies might be technology-neutral, encouraging the adoption of electric vehicles generally rather to giving preference to BEVs or PHEVs in particular.
This equilibrium requires manufacturers to tackle both sectors strategically. The data serves as a reminder to policymakers to think about how incentives and infrastructure improvements can help EV adoption. The graph shows investors that there is a consistent demand for electric vehicles and that there are a variety of BEV and PHEV technology investment options.
With BEVs and PHEVs taking center stage, the pie chart illustrates a pivotal point in the history of electric mobility. Stakeholders need to be aware of changes in the market that could tilt the scales and make sure their strategies take into account new developments. The market for electric vehicles is expected to rise further with sustained innovation and encouraging legislation, which might usher in a new era of mobility.
Conclusion
By combining knowledge from the available data visualizations, the author is able to draw the conclusion that the market for electric vehicles (EVs) displays a varied landscape of choice and acceptance. The adoption of various EV models varies greatly throughout counties; counties such as Montgomery and Clark show notable overall trends, indicating either specific customer preferences or regional activities that support EV adoption. The sharp contrast in the pie chart showing the totals of EVs and non-EVs contrasts this with the much larger national car market, where EVs still make up a small portion of all vehicles.
Plug-in hybrid electric vehicles (PHEVs) and battery electric vehicles (BEVs) share the market equally, suggesting that consumers are evenly divided between the advantages of both product categories. The correlation heatmap provides more insight into how various vehicle types interact. It shows that there are moderately positive correlations among BEVs, PHEVs, and total EVs, indicating that a growth in one type’s adoption has a favorable impact on the existence of other types.
Last but not least, the trendline illustrating the development of EV totals throughout time indicates a generally upward direction, with the exception of the first data for 2024, which is difficult to evaluate without a full year’s worth of data. Despite their tiny market share at the moment, EVs are becoming more and more popular as a viable and expanding part of the automotive industry, one that is expected to grow as long as infrastructure and technology advancements keep up.