% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-london_boroughs.R
\docType{data}
\name{london_boroughs}
\alias{london_boroughs}
\title{London Borough Boundaries}
\format{
A data frame with 45341 observations on the following 3 variables.
\describe{
\item{borough}{Name of the borough.}
\item{x}{The "easting" component of the coordinate, see details.}
\item{y}{The "northing" component of the coordinate, see details.}
}
}
\source{
\url{https://data.london.gov.uk/dataset/ordnance-survey-code-point}

Contains Ordinance Survey data released under the
\href{https://www.nationalarchives.gov.uk/doc/open-government-licence/version/2/}{Open Government License, OGL v2}.
}
\usage{
london_boroughs
}
\description{
This dataset contains the coordinates of the boundaries of all 32 boroughs
of the Greater London area.
}
\details{
Map data was made available through the Ordnance Survey Open Data
initiative.  The data use the
\href{https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid}{National Grid} coordinate system,
based upon eastings (\code{x}) and northings (\code{y}) instead of longitude and latitude.

The \code{name} variable covers all 32 boroughs in Greater London:
\code{Barking & Dagenham}, \code{Barnet}, \code{Bexley}, \code{Brent},
\code{Bromley}, \code{Camden}, \code{Croydon}, \code{Ealing},
\code{Enfield}, \code{Greenwich}, \code{Hackney}, \code{Hammersmith &
Fulham}, \code{Haringey}, \code{Harrow}, \code{Havering}, \code{Hillingdon},
\code{Hounslow}, \code{Islington}, \code{Kensington & Chelsea},
\code{Kingston}, \code{Lambeth}, \code{Lewisham}, \code{Merton},
\code{Newham}, \code{Redbridge}, \code{Richmond}, \code{Southwark},
\code{Sutton}, \code{Tower Hamlets}, \code{Waltham Forest},
\code{Wandsworth}, \code{Westminster}
}
\examples{

library(dplyr)
library(ggplot2)

# Calculate number of murders by borough
london_murders_counts <- london_murders |>
  group_by(borough) |>
  add_tally()

london_murders_counts
\dontrun{
# Add number of murders to geographic boundary data
london_boroughs_murders <- inner_join(london_boroughs, london_murders_counts, by = "borough")

# Map murders
ggplot(london_boroughs_murders) +
  geom_polygon(aes(x = x, y = y, group = borough, fill = n), colour = "white") +
  scale_fill_distiller(direction = 1) +
  labs(x = "Easting", y = "Northing", fill = "Number of murders")
}
}
\seealso{
london_murders
}
\keyword{London}
\keyword{borough}
\keyword{datasets}
\keyword{map}
