This report provides a descriptive analysis of electric and plug-in hybrid vehicle registrations in Maryland. The purpose of the analysis is to examine where electric vehicle registrations are concentrated across Maryland, how electric and plug-in hybrid registrations compare across counties, and how registration patterns have changed over time.
Five different visualization types are used in this report: a horizontal bar chart, scatterplot, multiple line chart, donut chart, and heatmap. Together, these visualizations provide different perspectives on the growth and geographic distribution of electric and plug-in hybrid vehicles in Maryland.
The dataset used in this analysis comes from the Maryland Department of Transportation Motor Vehicle Administration and contains monthly electric and plug-in hybrid vehicle registration counts. The original dataset includes the month, fuel category, county of residence, and number of registered vehicles.
Before creating the visualizations, the data were cleaned by standardizing the fuel category names, converting the year and month field into a date variable, removing missing county records, and limiting the analysis to Maryland counties and Baltimore City.
# Import Python libraries
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from matplotlib.ticker import FuncFormatter
# Import Maryland electric vehicle registration data
url = "https://opendata.maryland.gov/api/views/qtcv-n3tc/rows.csv?accessType=DOWNLOAD"
df = pd.read_csv(url)
# Prepare date and numeric variables
df["Count"] = pd.to_numeric(df["Count"], errors="coerce")
df["Date"] = pd.to_datetime(df["Year_Month"], format="%Y/%m")
df["Year"] = df["Date"].dt.year
df["Month"] = df["Date"].dt.month
# Remove missing records
df = df.dropna(subset=["County", "Count"])
# Standardize Plug-In Hybrid category name
df["Fuel_Category"] = df["Fuel_Category"].replace(
"Plug-in Hybrid", "Plug-In Hybrid"
)
# Maryland counties and Baltimore City
maryland_counties = [
"ALLEGANY", "ANNE ARUNDEL", "BALTIMORE", "BALTIMORE CITY",
"CALVERT", "CAROLINE", "CARROLL", "CECIL", "CHARLES",
"DORCHESTER", "FREDERICK", "GARRETT", "HARFORD", "HOWARD",
"KENT", "MONTGOMERY", "PRINCE GEORGES", "QUEEN ANNES",
"SAINT MARYS", "SOMERSET", "TALBOT", "WASHINGTON",
"WICOMICO", "WORCESTER"
]
# Keep Maryland records for the full study period
md_df = df[df["County"].isin(maryland_counties)].copy()
# Identify the latest month available
latest_month = md_df["Date"].max()
latest_md = md_df[md_df["Date"] == latest_month].copy()
# Format county names for display
latest_md["County_Display"] = latest_md["County"].str.title()
The cleaned dataset contains monthly registration records for Maryland’s 24 jurisdictions (23 counties and Baltimore City). The available data span from July 2020 through October 2026. The most recent month contains 161,641 combined electric and plug-in hybrid vehicle registrations.
# Create basic descriptive statistics
summary_stats = pd.DataFrame({
"Statistic": ["First Month", "Latest Month", "Maryland Jurisdictions", "Latest Registrations"],
"Value": [
md_df["Date"].min().strftime("%B %Y"),
latest_month.strftime("%B %Y"),
md_df["County"].nunique(),
f'{latest_md["Count"].sum():,}'
]
})
summary_stats
## Statistic Value
## 0 First Month July 2020
## 1 Latest Month October 2026
## 2 Maryland Jurisdictions 24
## 3 Latest Registrations 161,641
The following visualizations examine the geographic distribution, relationship between fuel types, and growth of electric and plug-in hybrid vehicle registrations in Maryland.
The first visualization compares the ten Maryland jurisdictions with the largest number of combined electric and plug-in hybrid vehicle registrations in the most recent month.
# Add registrations by jurisdiction
county_total = latest_md.groupby("County_Display")["Count"].sum().reset_index()
# Rank jurisdictions from highest to lowest
county_total = county_total.sort_values("Count", ascending=False)
top10 = county_total.head(10)
# Visualization 1: Top 10 Maryland jurisdictions
plt.figure(figsize=(10,6))
plt.barh(top10["County_Display"], top10["Count"], color="steelblue")
plt.gca().invert_yaxis()
plt.title("Top 10 Maryland Jurisdictions for Electric and Plug-In Hybrid Vehicles")
plt.xlabel("Number of Registered Vehicles")
plt.ylabel("Jurisdiction")
plt.xlim(0, top10["Count"].max() * 1.12);
plt.gca().xaxis.set_major_formatter(
FuncFormatter(lambda x, pos: f"{int(x):,}")
)
for i, value in enumerate(top10["Count"]):
plt.text(value + 100, i, f"{int(value):,}", va="center")
plt.tight_layout()
plt.show()
Montgomery County has the highest number of registered electric and
plug-in hybrid vehicles, with more than 50,000 registrations in the most
recent month. This is substantially higher than Prince George’s County,
Howard County, Baltimore County, and Anne Arundel County. The results
show that electrified vehicle registrations are concentrated most
heavily in several of Maryland’s larger jurisdictions rather than being
evenly distributed across the state.
The second visualization examines the relationship between electric and plug-in hybrid registrations across Maryland jurisdictions. Each point represents one jurisdiction. Larger and darker points represent jurisdictions with a greater total number of registered electric and plug-in hybrid vehicles.
# Prepare data for Visualization 2
electric = latest_md[latest_md["Fuel_Category"] == "Electric"][["County", "Count"]]
electric = electric.rename(columns={"Count": "Electric"})
hybrid = latest_md[latest_md["Fuel_Category"] == "Plug-In Hybrid"][["County", "Count"]]
hybrid = hybrid.rename(columns={"Count": "Plug_In_Hybrid"})
# Combine electric and plug-in hybrid totals by jurisdiction
county_scatter = pd.merge(electric, hybrid, on="County")
county_scatter["Total"] = county_scatter["Electric"] + county_scatter["Plug_In_Hybrid"]
county_scatter["County_Display"] = county_scatter["County"].str.title()
# Scale point size by total registrations
sizes = (county_scatter["Total"] / county_scatter["Total"].max()) * 1000 + 50
# Visualization 2: Electric vs. Plug-In Hybrid registrations
plt.figure(figsize=(10,7))
scatter = plt.scatter(
county_scatter["Electric"],
county_scatter["Plug_In_Hybrid"],
s=sizes,
c=county_scatter["Total"],
cmap="viridis",
alpha=0.7
)
plt.title("Electric vs. Plug-In Hybrid Registrations by Maryland Jurisdiction")
plt.xlabel("Electric Vehicle Registrations")
plt.ylabel("Plug-In Hybrid Registrations")
# Use log scales to make differences between jurisdictions easier to see
plt.xscale("log")
plt.yscale("log")
plt.gca().xaxis.set_major_formatter(
FuncFormatter(lambda x, pos: f"{int(x):,}")
)
plt.gca().yaxis.set_major_formatter(
FuncFormatter(lambda x, pos: f"{int(x):,}")
)
# Add color bar
cbar = plt.colorbar(scatter)
cbar.set_label("Total Registered Vehicles")
cbar.ax.yaxis.set_major_formatter(
FuncFormatter(lambda x, pos: f"{int(x):,}")
)
# Label jurisdictions with the four highest totals
top_labels = county_scatter.nlargest(4, "Total")
for i, row in top_labels.iterrows():
plt.text(
row["Electric"],
row["Plug_In_Hybrid"],
row["County_Display"],
fontsize=8
)
plt.grid(alpha=0.2)
plt.tight_layout()
plt.show()
The scatterplot shows a positive relationship between electric and plug-in hybrid registrations. Jurisdictions with higher electric vehicle registrations also generally have higher plug-in hybrid registrations. Montgomery County stands out with substantially more registrations than the other jurisdictions. The logarithmic scales make it easier to compare jurisdictions with lower registration totals while still displaying the much larger jurisdictions on the same chart.
The third visualization shows how electric and plug-in hybrid vehicle registrations have changed over time across Maryland. Separate lines are used for each fuel category so that their growth patterns can be compared directly.
# Prepare monthly Maryland registration totals by fuel type
monthly_total = md_df.groupby(["Date", "Fuel_Category"])["Count"].sum().reset_index()
# Separate Electric and Plug-In Hybrid monthly totals
electric_monthly = monthly_total[monthly_total["Fuel_Category"] == "Electric"]
hybrid_monthly = monthly_total[monthly_total["Fuel_Category"] == "Plug-In Hybrid"]
# Visualization 3: Maryland registrations over time
plt.figure(figsize=(11,6))
plt.plot(
electric_monthly["Date"],
electric_monthly["Count"],
color="steelblue",
linewidth=2,
label="Electric"
)
plt.plot(
hybrid_monthly["Date"],
hybrid_monthly["Count"],
color="orange",
linewidth=2,
label="Plug-In Hybrid"
)
plt.title("Maryland Electric and Plug-In Hybrid Registrations Over Time")
plt.xlabel("Year")
plt.ylabel("Number of Registered Vehicles")
plt.gca().yaxis.set_major_formatter(
FuncFormatter(lambda x, pos: f"{int(x):,}")
)
plt.legend()
plt.grid(alpha=0.2)
plt.xticks(rotation=45);
plt.tight_layout()
plt.show()
Electric and plug-in hybrid registrations both increased substantially over the period shown. However, electric vehicle registrations grew much more rapidly, especially beginning around 2022 and 2023. As a result, the gap between electric and plug-in hybrid registrations widened over time. By 2026, electric vehicles represented a much larger share of Maryland’s electrified vehicle registrations.
The fourth visualization shows the share of Maryland’s most recent electric and plug-in hybrid vehicle registrations by fuel category. A donut chart is used to show how the total is divided between fully electric vehicles and plug-in hybrids.
# Prepare latest-month totals by fuel category
fuel_total = latest_md.groupby("Fuel_Category")["Count"].sum().reset_index()
# Visualization 4: Latest Maryland registrations by fuel type
plt.figure(figsize=(8,8))
colors = plt.cm.Set2.colors
plt.pie(
fuel_total["Count"],
labels=fuel_total["Fuel_Category"],
autopct="%1.1f%%",
startangle=90,
colors=colors,
pctdistance=0.78,
labeldistance=1.08,
wedgeprops={"edgecolor": "white"}
);
# Create donut hole
centre_circle = plt.Circle((0,0), 0.60, color="white")
plt.gca().add_artist(centre_circle)
# Add total registrations to center
total_vehicles = fuel_total["Count"].sum()
plt.text(
0, 0,
f"{total_vehicles:,.0f}\nTotal Vehicles",
ha="center",
va="center",
fontsize=14,
fontweight="bold"
)
plt.title(
f"Maryland Electric and Plug-In Hybrid Registrations - {latest_month.strftime('%B %Y')}"
)
plt.tight_layout()
plt.show()
Electric vehicles account for approximately three-quarters of Maryland’s combined electric and plug-in hybrid registrations in the most recent month, while plug-in hybrids represent about one-quarter. This shows that fully electric vehicles make up the majority of Maryland’s electrified vehicle registrations.
The fifth visualization uses a heatmap to show how combined electric and plug-in hybrid vehicle registrations changed across months and years. Darker colors represent higher registration totals.
# Prepare data for Visualization 5
heatmap_df = md_df.groupby(["Year", "Month"])["Count"].sum().reset_index()
heatmap_pivot = heatmap_df.pivot(
index="Year",
columns="Month",
values="Count"
)
# Visualization 5: Maryland registrations by year and month
plt.figure(figsize=(12,6))
ax = sns.heatmap(
heatmap_pivot,
cmap="YlGnBu",
annot=True,
fmt=",.0f",
linewidths=0.5
)
# Replace month numbers with abbreviations
month_labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
plt.xticks(
ticks=np.arange(12) + 0.5,
labels=month_labels,
rotation=0
);
# Format color bar with commas
cbar = ax.collections[0].colorbar
cbar.ax.yaxis.set_major_formatter(
FuncFormatter(lambda x, pos: f"{int(x):,}")
)
plt.title("Maryland Electric and Plug-In Hybrid Registrations by Year and Month")
plt.xlabel("Month")
plt.ylabel("Year")
plt.tight_layout()
plt.show()
The heatmap shows a clear increase in electric and plug-in hybrid registrations over time. Registration totals generally rise from month to month and become substantially higher in later years, particularly from 2023 through 2026. The darker shading in the most recent periods reinforces the long-term growth shown in the line chart. The blank cells in 2020 and 2026 indicate months that are not included in the available dataset rather than zero registrations.
This analysis shows that electric and plug-in hybrid vehicle registrations in Maryland have increased substantially since 2020. The geographic analysis also shows that registrations are concentrated most heavily in a smaller group of jurisdictions, with Montgomery County standing well above the rest.
The comparison between fuel types shows that jurisdictions with more electric vehicles also tend to have more plug-in hybrids. Over time, however, fully electric vehicle registrations have grown more rapidly than plug-in hybrid registrations. By October 2026, electric vehicles represented approximately three-quarters of the combined electric and plug-in hybrid registrations in Maryland.
Overall, the visualizations suggest that Maryland has experienced strong growth in electrified vehicle registrations, with fully electric vehicles becoming the dominant category in the most recent period.
This analysis is descriptive and does not attempt to identify the causes of changes in vehicle registrations. The dataset reports monthly registration counts rather than vehicle sales, so the results should be interpreted as the number of registered vehicles rather than new purchases.
The available data begin in July 2020 and currently extend through October 2026, meaning that 2020 and 2026 are partial years. The analysis was also limited to Maryland’s 24 jurisdictions and to electric and plug-in hybrid vehicles. Other vehicle fuel types were not included.