  In 2016 the British government acknowledged the importance of reducing
antimicrobial prescriptions in order to avoid the long-term harmful effects of
over-prescription. Prescription needs are highly dependent on factors that have
a spatio-temporal component, such as the presence of a bacterial outbreak and
the population density. In this context, density-based clustering algorithms
are flexible tools to analyse data by searching for group structures. The case
of Scotland presents an additional challenge due to the diversity of population
densities under the area of study. We present here a spatio-temporal clustering
approach for highlighting the behaviour of general practitioners (GPs) in
Scotland. Particularly, we consider the density-based spatial clustering of
applications with noise algorithm (DBSCAN) due to its ability to include both
spatial and temporal data, as well as its flexibility to be extended with
further variables. We extend this approach into two directions. For the
temporal analysis, we use dynamic time warping to measure the dissimilarity
between warped and shifted time series. For the spatial component, we introduce
a new way of weighting spatial distances with continuous weights derived from a
KDE-based process. This makes our approach suitable for cases involving spatial
clusters with differing densities, which is a well-known issue for the original
DBSCAN. We show an improved performance compared to both the latter and the
popular k-means algorithm on simulated, as well as empirical data, presenting
evidence for the ability to cluster more elements correctly and deliver
actionable insights.
