Last data update: 2014.03.03

R: London Borough Boundaries
london_boroughsR Documentation

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)

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.

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

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.

References

OpenIntro, openintro.org

Examples

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)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(OIdata)
Loading required package: RCurl
Loading required package: bitops
Loading required package: maps

 # maps v3.1: updated 'world': all lakes moved to separate new #
 # 'lakes' database. Type '?world' or 'news(package="maps")'.  #


> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/OIdata/london_boroughs.Rd_%03d_medium.png", width=480, height=480)
> ### Name: london_boroughs
> ### Title: London Borough Boundaries
> ### Aliases: london_boroughs
> ### Keywords: datasets London map borough
> 
> ### ** Examples
> 
> data(london_boroughs)
> ## Not run: 
> ##D # install.packages("ggplot2")
> ##D # install.packages("RColorBrewer")
> ##D library(ggplot2)
> ##D library(RColorBrewer)
> ##D data(murders)
> ##D LB          <- london_boroughs
> ##D mtab        <- table(murders$borough)
> ##D LB$nmurders <- rep(mtab, rle(as.character(LB$name))$lengths)
> ##D p           <- ggplot()
> ##D p +
> ##D   geom_polygon(data=LB, aes(x=x, y=y, group = name, fill = nmurders),
> ##D                colour="white" ) +
> ##D   scale_fill_gradientn(colours = brewer.pal(7, "Blues"),
> ##D                limits=range(LB$nmurders))
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>