% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-london_murders.R
\docType{data}
\name{london_murders}
\alias{london_murders}
\title{London Murders, 2006-2011}
\format{
A data frame with 838 observations on the following 5 variables.
\describe{
\item{forename}{First name(s) of the victim.}
\item{age}{Age of the victim.}
\item{date}{Date of the murder (YYYY-MM-DD).}
\item{year}{Year of the murder.}
\item{borough}{The London borough in which the murder took place. See the Details section for a list of all the boroughs.}
}
}
\source{
\url{https://www.theguardian.com/news/datablog/2011/oct/05/murder-london-list#data}
}
\usage{
london_murders
}
\description{
This dataset contains the victim name, age, and location of every murder
recorded in the Greater London area by the Metropolitan Police from January
1, 2006 to September 7, 2011.
}
\details{
To visualize this dataset using a map, see the
\code{\link{london_boroughs}} dataset, which contains the latitude and
longitude of polygons that define the boundaries of the 32 boroughs of
Greater London.

The \code{borough} 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)
library(lubridate)

london_murders |>
  mutate(
    day_count = as.numeric(date - ymd("2006-01-01")),
    date_cut = cut(day_count, seq(0, 2160, 90))
  ) |>
  group_by(date_cut) |>
  add_tally() |>
  ggplot(aes(x = date_cut, y = n)) +
  geom_col() +
  theme(axis.text.x = element_blank(), axis.ticks.x = element_blank()) +
  labs(x = "Date from 01/2006 - 09/2011", y = "Number of deaths per 90 days")
}
\references{
Inspired by \href{https://www.theguardian.com/news/datablog/interactive/2011/oct/05/murder-london-map}{The Guardian Datablog}.
}
\keyword{London}
\keyword{crime}
\keyword{datasets}
\keyword{map}
\keyword{murder}
