Identifying New Locations for Electric Vehicle Charging Stations

The increasing numbers of electric vehicles (EV) increases the demand for new EV charging stations. This presents a huge problem for city planners. They need to identify the most suitable place (e.g. few spaces with many businesses around). This project uses the clustering method in Machine Learning to identify new locations for EV charging stations.

Book Recommendation

I recommend Machine Learning For Absolute Beginners: A Plain English Introduction by Oliver Theobald for anyone who wants to learn about Machine Learning. I read it along with Machine Learning -- A step by step guide to Machine Learning with Python by Raghava Shankar. Amazon UK Links for people living in the EU: Book 1 and Book 2.


The location is Dublin, Ireland, more specifically postal district 15. The reason for choosing a postal district of the city (instead of the entire city) is the lack of an existing database in Dublin. There is no known database on the townlands in Dublin. It's difficult to manually gather the necessary data for the entire city. Therefore, the scope of the location had to be scaled down to one single postal district.

Dublin 15 houses many major companies such as IBM, Paypal, Ebay, etc. There are many stores and shopping centres at this location. Therefore, makes it a suitable candidate for this project. It includes the following major townlands:

  • Castleknock

  • Clonsilla

  • Cloghran

  • Blanchardstown

  • Cabra

  • Corduff

  • Dunsink

  • Huntstown and Littlepace

  • Mulhuddart

  • Tyrrelstown

  • Finglas

Figure 1 shows all of the venues in Castleknock. The location data (e.g. latitude and longitude) were gathered mannaly via wikipedia. The data of the venues were gathered from Foursquare via its API.

Figure 1: Venues in Castleknock

Figure 2 shows the locations of venues in Dublin 15: The map was generated via folium library in python in combination of the location data of the venues.

Figure 2: Locations of venues


This project chooses the clustering method to identify the clusters in these locations. K-nearest neighbours model was chosen because of the value k. The value k represents the requested additional charging stations. For example, the city has the budget for 5 more charging stations. The k value would be 5.

The choosing of the value is out of the scope of this project. It will require a separate project to gather data (e.g. No. of EVs and budget) and predict the value.

We hypothesized that the suggested locations of the new EV charging stations are at the centres of the clusters. They are the K-mean cluster centres generated by K-nearest neighbours.


Figure 3 shows the suggested locations for the new charging stations.

Figure 3: New charging stations

We chose 5 as the value k. With that k value, the algorithm separated the venue locations into 5 clusters (marked in different colours). The centre locations were marked with map markers. They represent suggested locations for new EV charging stations.


The lack of substantial data is a major challenge for this project. It's very difficult to gather them by hand without any professional help. However, I believe the increasing demands for electric charging stations will drive the demand for more data in the future.

The suggestion model can be modified to include more than just location based clustering. For example, the concentration of the electric vehicles in different locations, the traffic at different times and EVs' battery levels at certain locations.


The demand for more EV charging stations is increasing. The city planner will need better ways to determine the new locations for these charging stations. This project uses K-nearest neighbour to suggest new locations for electric vehicle charging in postal district 15 in Dublin, Ireland. The data is primarily location data. The project suggested using more comprehensive data gathering for the future.