Learn R Programming

OIdata (version 1.0)

london_boroughs: London Borough Boundaries

Description

This dataset contains the coordinates of the boundaries of all 32 boroughs of the Greater London area.

Usage

data(london_boroughs)

Arguments

Format

A data frame with 45341 observations on the following 3 variables.
name
Name of the borough.
x
The "easting" component of the coordinate, see details.
y
The "northing" component of the coordinate, see details.

Source

https://www.ordnancesurvey.co.uk/opendatadownload/products.html Contains Ordinance Survey data, Crown copyright and database right [2012], used under the Open Data License.

Details

Map data was made available through the Ordnance Survey Open Data initiative. The data use the National Grid coordinate system, based upon eastings (x) and northings (y) instead of longitude and latitude.

The name 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

References

OpenIntro, openintro.org

Examples

Run this code
data(london_boroughs)
## Not run: 
# # install.packages("ggplot2")
# # install.packages("RColorBrewer")
# library(ggplot2)
# library(RColorBrewer)
# data(murders)
# 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)

Run the code above in your browser using DataLab