This is a map of the locations of CCTV cameras in Sheffield UK. The data were downloaded from Sheffield City Council web page
Sheffield_cameras <- read.csv("CCTV_camera_Locations_Map.csv")
head(Sheffield_cameras)
## Cam_No Location Easting Northing
## 1 1 Church Street/High Street 435448 387420
## 2 2 Chapel Walk 435449 387392
## 3 3 Fargate (Marks & Spencers) 435418 387339
## 4 4 Fargate (WH Smiths) 435387 387309
## 5 5 Fargate (Next) 435405 387302
## 6 6 Chapel Walk 435506 387374
## Coordinates Notes
## 1 (53.382445, -1.4685522)
## 2 (53.382193, -1.4685403)
## 3 (53.381719, -1.4690122)
## 4 (53.381451, -1.4694816)
## 5 (53.381387, -1.4692118)
## 6 (53.382027, -1.4676854)
## Subsetting the latitude and longitud data
lat = substr(as.character(Sheffield_cameras$Coordinates), 2,10)
lng = substr(as.character(Sheffield_cameras$Coordinates), 13,22)
Sheffield_cameras$lat = as.numeric(substr(as.character(Sheffield_cameras$Coordinates), 2,10))
## Warning: NAs introduced by coercion
Sheffield_cameras$lng = as.numeric(substr(as.character(Sheffield_cameras$Coordinates), 13,22))
## Warning: NAs introduced by coercion
library(leaflet)
## Building the map
Sheffield_cameras %>%
leaflet() %>%
addTiles() %>%
addMarkers(clusterOptions = markerClusterOptions(), popup = Sheffield_cameras$Location)