Learn R Programming

rCrimemap (version 0.0.4)

rcmap: rCrimemap using crime data from data.police.uk

Description

The next generation of CrimeMap based on rMaps!

Usage

rcmap(location = "Ball Brothers EC3R 7PP", period = "2010-12", type = "All", map_size = c(1000, 500), provider = "OpenStreetMap.BlackAndWhite", zoom = 10, nearest = 2)

Arguments

location
Location of interest within England and Wales (e.g. London, Birmingham, Newcastle)
period
Specific month of interest between Dec 2010 and Jan 2014 in 'yyyy-mm' format (e.g. 2014-01)
type
Specific type of crime or all (e.g. "All", "Anti-social behaviour", "Burglary", "Violent crime")
map_size
Resolution of the map (e.g. Full HD = c(1920 x 1080))
provider:
Base map service provider (e.g. "OpenStreetMap.BlackAndWhite") (see http://leaflet-extras.github.io/leaflet-providers/preview/index.html)
zoom
Zoom level of the map
nearest
number of nearest police forces (for data collection)

Examples

Run this code
## Create a heatmap with default settings
rcmap()

## Be more specific
rcmap("Ball Brothers EC3R 7PP", "2011-08", "All", c(1000,1000))
rcmap("London", "2011-08", "Anti-social behaviour", c(1000,500))
rcmap("Manchester", "2014-01", "All", c(1000,1000), "MapQuestOpen.OSM")
rcmap("Liverpool", "2014-01", "All", c(1000,500), "MapQuestOpen.OSM")

Run the code above in your browser using DataLab