Part 1: Tesla’s Market Share & EV Trends in Washington

OBJECTIVE: Analyze the electric vehicle (EV) population in Washington State using public datasets, with a focus on Tesla’s market position, pricing, range comparisons, and utility partnerships.

BACKGROUND: With EV adoption accelerating, understanding vehicle trends, brand dominance, and electric utility demands is increasingly important. This project analyzes Washington State’s registered EVs to answer key questions:

  1. What is Tesla’s market share in Washington vs. other EV manufacturers?

  2. What is the trend in Tesla vehicles sold each year in Washington?

  3. Which Tesla models are most popular?

  4. Which Tesla models generate the most estimated revenue in Washington?

  5. How does Tesla’s pricing compare to other BEVs?

  6. How does Tesla's electric range compare to other BEVs?

  7. What are the trends in vehicle type over time?

  8. Which electric utilities support the most Teslas?

TECH STACK:

  1. R: Data analysis and visualization

  2. dplyr: Data manipulation

  3. tidyr: Reshaping and tidying data

  4. ggplot2: Visualization (used in Part 2)

  5. flex_dashboard: Dashboard layout for visualizations (used in Part 2)

  6. stringr: String transformations

  7. scales: Number formatting

  8. CSV files: Main EV dataset and a supplemental Tesla base price file

PROCESS:

  1. Data Cleaning:
    ◇ Standardized column names ( . to _ )
    ◇ Converted Base_MSRP to numeric
    ◇ Labeled all Teslas as "TESLA" in a new column

  2. Tesla Market Share:
    Calculated the percentage of Teslas among all registered EVs

  3. Top Tesla Models:
    Aggregated counts of Tesla models
    ◇ Joined with a supplemental dataset to estimate revenue per model

  4. Price and Range Analysis:
    Averaged and median electric ranges and MSRPs for Teslas versus other EVs
    ◇ Noted frequent gaps in MSRP data; supplemented analysis with base prices when available

  5. Vehicle Type Trends:
    Tracked trends in Plug-in Hybrid (PHEV) vs. Battery Electric (BEV) vehicles by year

  6. Utility Distribution:
    Identified which electric utilities support the highest number of Tesla vehicles
    ◇ Highlighted the top 5 utilities in the state

KEY INSIGHTS: Tesla is clearly the dominant EV brand in Washington State, accounting for 42.9% of all electric vehicle registrations. Within Tesla’s lineup, the Model Y and Model 3 emerged as top sellers, contributing significantly to estimated revenue when matched with base price data.

Tesla’s average electric range significantly outpaces that of other BEV brands, both at the mean and median levels. Pricing analysis shows that Tesla vehicles carry a higher MSRP.

CHALLENGES & SOLUTIONS:

⚠️ Challenge 1: Missing or inconsistent MSRP values in the main dataset

✅ Solution: Used a supplemental CSV of current Tesla base prices and matched on model name

⚠️ Challenge 2: Inconsistent formatting of model names between datasets

✅ Solution: Applied toupper() to normalize model names before joining

⚠️ Challenge 3: Presence of placeholder or 0 values in key numeric fields like range and price

✅ Solution: Filtered out zero or missing entries to ensure accurate analysis


NEXT STEPS (PART 2 PREVIEW):

In Part 2, I bring the analysis to life through interactive visual storytelling using ggplot2 and flexdashboard. Each key question explored in Part 1 is visualized to enhance clarity and audience engagement. Highlights include:

  • Tesla’s Market Share: A pie chart showing Tesla’s 42.9% dominance among registered EVs in Washington

  • Registration Trends: A time-series line chart tracking Tesla’s growth from 2011, peaking in 2023

  • Model Popularity and Revenue: Bar charts displaying top-selling Tesla models and their estimated revenue contributions

  • Price and Range Comparisons: Side-by-side bar plots comparing Tesla’s MSRP and electric range against other BEVs

  • Vehicle Type Shifts: A line chart showing the rise of BEVs over PHEVs through 2024

  • Utility Coverage: A bar chart ranking the top 5 electric utilities with the most Teslas in their service areas

  • Interactive Dashboard: All visualizations are consolidated in a scrollable flexdashboard for seamless exploration and user engagement

DATA SOURCES:

VIEW THE R ANALYSIS CODE:

Want to see how the analysis was built in R?

👉 Click here to view the full R Analysis code — includes data cleaning, joins, aggregation, revenue estimation, and preparation for visualization in Part 2.

This script showcases a reproducible and well-documented workflow for analyzing Tesla’s market share, pricing, range, and utility trends in Washington State.

The GitHub repository is fully transparent, reproducible, and well-commented to support each step of the analysis.

Previous
Previous

From Chaos to Clarity: Cleaning Real-World Data in Excel

Next
Next

Part 2: Visualizing the Washington EV Market