Optimizing Site Selection for EV Charging Stations


Optimize EV Charging Site Selection with Spatial Data Science - improve accessibility and convenience, drive revenue, and de-risk growth.

This post may describe functionality for an old version of CARTO. Find out about the latest and cloud-native version here.
Optimizing Site Selection for EV Charging Stations

Did you know that in 2022, 14% of all cars bought in the world were electric vehicles (EVs)? That marks an enormous growth; just 5 years ago in 2017, just 1.4% of all cars sold were electric. EVs offer their users various benefits, including lower servicing and maintenance costs, tax breaks and cheaper refueling costs, as well as - of course - huge environmental benefits!

However, with 86% of cars bought in 2022 being non-EV, there is clearly still room for this market to grow. So, what are the key challenges? According to the Environmental & Energy Study Institute, the availability of charging infrastructure remains a significant barrier, in particular for enabling longer-distance trips.

A photo of an electric car charging.
Michael Fousert via Unsplash.

Spatial data science & EVs

Ensuring charging locations are in the optimum locations for users is key to EV uptake; spatial data science has a pivotal role to play in this.

Spatial data science blends geospatial data - such as on demographics, the environment and economy - with advanced analytics. Through this, it empowers decision-makers to make informed choices on the strategic placement of charging infrastructure. By doing this, they can improve convenience, accessibility, and overall adoption of electric vehicles - all of which drives revenue and de-risk growth in a market which has seen the number of charging stations explode (see below).

A line graph sowing EV charging station openings over time, increasingly sharply from 2021.

Let’s explore how this can be achieved with an example use case!

Optimizing charging infrastructure locations

This example consists of two main stages:

  1. Uncovering high demand EV charging areas
  2. Pinpointing optimal locations in high demand areas

To follow along with this walkthrough - you’ll need to sign up for a free 14-day trial with CARTO.

Uncovering high demand EV charging areas

For the first stage of this analysis, we need two datasets.

  1. Charging stations sourced from the National Renewable Energy Laboratory.
  2. Population data. For this, we’re using the USA CARTO Spatial Features dataset. Spatial Features is a dataset covering the entire world, including variables relating to demographics, economics and the environment. CARTO users can access the USA version for free via our Spatial Data Catalog.

In this instance, we’ll be using the H3 version. H3 is a type of Spatial Index - a global, multi-resolution grid system. In these types of datasets, features are located by a short reference ID rather than a long geometry string, making them lightweight and lightning-fast for analysis! Learn all about them in our FREE ebook Spatial Indexes 101.

To complete this analysis, we’ll use CARTO Workflows - a low-code analytical tool for multi-step, iterative analysis.

A screenshot of a CARTO Workflow with a map and Custom SQL preview.
  1. In this workflow, first we transform the input H3 cells into a geometry using H3 Center in order to use ST Distance to calculate the distance from each H3 cell to the closest EV charging station.
  2. Secondly, we use a Simple Filter to filter out any H3 cells which are closer than 4 km to an EV charging station, assuming that these locations are already well served for vehicle charging.
  1. Next, we Join the results of this filter to the input H3 selection to access its population data.
  2. Finally, the BigQuery SQL PERCENTILE_CONT() function is used in a Custom SQL Selecttext to select only areas with a high population (>97th percentile). You can see the SQL used to perform this below - note we can use placeholders like $a to call other components in the workflow.
  stats AS (
	nearest_distance AS percentile,
	PERCENTILE_CONT(population_joined, 0.97) OVER() AS percentile_97
  population_joined >= percentile_97


Pinpointing optimal locations in high demand areas

EV charging stations don’t exist in isolation - typically they are “attached” to existing infrastructure. The graph below shows five of the most common Points of Interest (POIs) which have a charging station. Therefore, the second stage of this analysis identifies the POIs which fall inside the areas of high demand which we previously established.

A line graph showing monthly EV charging station openings by facility type, such as car dealer and hotel

To do this, POI data was extracted from OpenStreetMap (OSM). OSM is a global, crowd-sourced dataset - that is completely free! You can access it via the Google BigQuery public dataset; we’ve written a guide on doing this here. Note that EV charging stations can be found under the key “amenity” and tag “charging_station.”

The potential locations for EV charging stations were identified using the workflow below, which is an extension of the analysis undertaken earlier.

A screenshot of a Workflow with a preview of a map and a join component.
  1. First, the “OSM places” layer is converted from raw geometry points to a H3 index using H3 from GeoPoint.
  2. Secondly, a simple Join is used to join the results of step 1 to the high-demand areas identified earlier; this type of join is an inner join which only joins records present in both tables. This process acts a lot like a Spatial Filter, but as we are using Spatial Indexes there is no geometry processing required, making the process much faster and more efficient.

You can explore the output of this analysis in the map below, or in full-screen here.

What’s next?

So now you’ve worked out locations which could be successful for future EV charging stations - what happens next? Organizations like Iberdrola, Cable Energia (Shell) and others are taking this analysis one step further by looking at the propensity for residents in an area to buy and own EV cars using an approach called Geosegmentation.

A screenshot of CARTO showing areas in New York coloured by their Audience Index Score, illustrating what geosegmentation is.

Geosegmentation is scoring an area against a segment based on consumer behavior and preferences. For instance, Spatial ai data - available for subscription via our Spatial Data Catalog - uses online activity to assign areas a score against 72 different indexes, such as Engine Enthusiasts and Wanderlust! By better understanding the distribution of current and potential EV drivers, organizations can better optimize marketing strategies and resource allocation to better meet their specific needs and preferences.


Optimizing the site selection of EV charging points is crucial for the continued growth and adoption of electric vehicles. By leveraging spatial data science and advanced analytics, decision-makers can strategically place charging infrastructure in high-demand areas, improving accessibility and convenience for users and ultimately driving revenue and de-risking the market's growth.

Ready to supercharge your own analysis? Sign up for a free-14 day trial and see where Location Intelligence can take you!