Description Usage Format Details Source References Examples
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.
1 |
A data frame with 838 observations on the following 5 variables.
forename
First name(s) of the victim.
age
Age of the victim.
date
Date of the murder (MM/DD/YY).
year
Year of the murder.
borough
The London borough in which the murder took place. See the Details section for a list of all the boroughs.
To visualize this data set using a map, see the london_boroughs
dataset, which contains the latitude and longitude of polygons that define the boundaries of the 32 boroughs of Greater London.
The borough
variable covers all 32 boroughs in Greater London: Barking & Dagenham
, Barnet
, Bexley
, Brent
, Bromley
, Camden
, Croydon
, Ealing
, Enfield
, Greenwich
, Hackney
, Hammersmith & Fulham
, Haringey
, Harrow
, Havering
, Hillingdon
, Hounslow
, Islington
, Kensington & Chelsea
, Kingston
, Lambeth
, Lewisham
, Merton
, Newham
, Redbridge
, Richmond
, Southwark
, Sutton
, Tower Hamlets
, Waltham Forest
, Wandsworth
, Westminster
http://www.met.police.uk/foi/pdfs/disclosure_2011/september/2011080003610.pdf
Inspired by The Guardian Datablog.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | data(murders)
date1 <- as.Date(murders$date,"%m/%d/%y")
date2 <- julian(date1,origin = as.Date("2006-01-02"))
date_cut <- cut(date2, seq(0, 2073, 90))
barplot(table(date_cut), xaxt = "n",
xlab = "date from 01/2006 - 09/2011",
ylab = "n deaths per 90 days")
## Not run:
# install.packages("ggplot2")
# install.packages("RColorBrewer")
library(ggplot2)
library(RColorBrewer)
data(london_boroughs)
LB <- london_boroughs
mtab <- table(murders$borough)
LB$nmurders <- rep(mtab, rle(as.character(LB$name))$lengths)
p <- ggplot()
p +
geom_polygon(data=LB, aes(x=x, y=y, group = name, fill = nmurders),
colour="white" ) +
scale_fill_gradientn(colours = brewer.pal(7, "Blues"),
limits=range(LB$nmurders))
## End(Not run)
|
Loading required package: RCurl
Loading required package: bitops
Loading required package: maps
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.