Rapid prototyping: at-home electric vehicle charging
The event was primarily focused on the widespread adoption of electric vehicles (EVs) and how OS data can be used to inform infrastructural development decisions, encourage consumer level uptake and/or characterise the behavioural trends of current EV owners.
After a morning of brainstorming, our team decided to explore the extent and feasibility of at-home EV charging for UK residents. Under the assumption that most prospective EV owners would prefer to charge their vehicles at home, we thought that we could help determine the best places to install public charging stations, by finding regions with a scarcity of driveway parking but a high car-ownership rate. We, therefore, set out to create a new dataset – derived from OS products – that would give us the location of driveways suitable for at-home EV charging.
As a starting point, we assumed that a suitable driveway would be one that is:
- Near to a building (to allow for mains charging)
- Close to a road (so as to be accessible by car)
- Large enough to accommodate a car
- Paved (to differentiate it from a lawned front garden)
Based on these criteria, we were able to identify a range of OS datasets that could be used to find suitable driveways:
- OS Topographic Area would give us the location and geometry of buildings and roads
- OS Greenspace would give us the location of private gardens (which include off-street parking spaces)
- OS AddressBase would tell us which buildings are residential dwellings.
All these datasets could be downloaded in Python as geojson, using the os-paw package. This is highly compatible with the geopandas package, which allows us to easily perform powerful geospatial analytics with just a few lines of code.
To begin with, we took the OS Greenspace layer and extracted all the polygons that were attributed as private gardens. By eroding (shrinking) and dilating (expanding) each polygon, we could remove any narrow channels that a car could not fit through – these were usually pathways joining the front and back garden.
We then wanted to filter out garden spaces that were close to a building (within ~10m), so that a car could conceivably be charged from the mains. This was done by finding building polygons from OS Topographic Area, buffering them by 10m and intersecting them with our garden polygons.
At this point, we had a set of polygons that represented gardens within charging range of a building. However, we had not yet determined whether these gardens were accessible by car. To fix this, we decided to make the simplifying assumption that most buildings (and, therefore, most front driveways) are within ~10m of a roadside. By extracting road polygons from OS Topographic Area and buffering them by 10m, we could do one more intersection to give us a set of viable front garden polygons.
Finally, we needed to determine whether each front garden was a paved driveway or a lawned garden. We did this by sampling an NDVI (normalized difference vegetation index) image underneath each polygon, using the rasterio Python package, and counting the number of pixels that did not contain vegetation (grass or trees). If the pixel count was over a certain threshold, it was assumed that enough of the garden was paved for it to be considered a driveway.
Using Census 2011 data we were able to find an approximate number of cars per output area, within our test region of Shirley, Southampton. This was then compared to our newly created driveways dataset, so that we could assess which output areas have the fewest viable at-home charging locations per car.
At a glance, and after just two days of work, the driveways dataset looks like a really promising development. Our main aim from the start of the hackathon was to find a way to support the adoption of EVs through effective infrastructure planning and our example analysis demonstrates how this might be possible using OS’s feature-rich data. Logical extensions to this work, if it were taken forward, might include:
- Finding driveways that are beyond 10m from the roadside
- Filtering residential buildings using OS AddressBase (we didn’t get time for this!)
- Considering the contiguous area of paved pixels (as opposed to just counting them)
- Including existing public charging stations when analysing potential demand
- Expanding our dataset to the whole of the UK
If you are interested in our driveways dataset and want to know more, please do get in touch – we’d love to hear from you!
What is the Rapid Prototyping team?
OS’s Rapid Prototyping team is a small team of data scientists who apply their creative problem-solving skills at pace to trial new concepts in close partnership with customers. For more information, contact the team on email@example.com
Our highly accurate geospatial data and printed maps help individuals, governments and companies to understand the world, both in Britain and overseas.