The UK Driver Vehicle License Authority makes information about vehicles available to the public, after they register for an API key. This package makes interacting with this API easy.
Data types and examples provided by the API are below
In addition to this package, you must apply for and be granted an API key from the UK Driver Vehicle Licensing Authority. You can do so here.
You can install the released version of DVLA from Github with:
devtools::install_github("daveyr/DVLA")
To retrieve data for a single vehicle, use getDVLA
.
To retrieve data for many vehicles, use tidyDVLA
. As the name suggests, tidyDVLA
is compatible with the pipe work flow common to the tidyverse, where a data frame is the first argument to any function, and its sole output.
The result is a data frame containing the input and vehicle data from the DVLA in additional columns. The data are tidy: one vehicle per row and one feature per column.
To understand more about how the API works, refer to the Vehicle Enquiry Service API documentation.
To summarise, the package works as follows:
httr
library with the following
x-api-key
and the key valueregistrationNumber
and the vehicle registration string