Import csv file and view data structure

Create spatial object

## [1] "SpatialPointsDataFrame"
## attr(,"package")
## [1] "sp"
## class      : Extent 
## xmin       : -0.212576 
## xmax       : -0.105902 
## ymin       : 51.51286 
## ymax       : 51.57252
## class       : SpatialPointsDataFrame 
## features    : 2981 
## extent      : -0.212576, -0.105902, 51.51286, 51.57252  (xmin, xmax, ymin, ymax)
## coord. ref. : +init=epsg:4124 +proj=longlat +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs 
## variables   : 14
## # A tibble: 2,981 x 14
##        X Location Street.ID Ward.Name Easting Northing Bicycle.theft
##    <int> <fct>        <int> <fct>       <dbl>    <dbl>         <int>
##  1     1 (51.512~    956440 Holborn ~ 530004.  180986.             1
##  2     2 (51.512~    956590 Holborn ~ 529998.  181001.             1
##  3     3 (51.512~    956590 Holborn ~ 529995.  181002.             1
##  4     4 (51.513~    956439 Holborn ~ 529982.  181008.             2
##  5     5 (51.513~    956587 Holborn ~ 530043.  181013.             3
##  6     6 (51.513~    956587 Holborn ~ 530040.  181014.             3
##  7     7 (51.513~    956444 Holborn ~ 530055.  181024.             5
##  8     8 (51.513~    956444 Holborn ~ 530058.  181023.             5
##  9     9 (51.513~    956447 Holborn ~ 530012.  181028.             6
## 10    10 (51.513~    956447 Holborn ~ 530015.  181027.             6
## # ... with 2,971 more rows, and 7 more variables: Burglary <int>,
## #   Drugs <int>, Robbery <int>, Shoplifting <int>,
## #   Theft.from.the.person <int>, Violence <int>,
## #   Violence.and.sexual.offences <int>

IDW interpolation

Create an empty grid of values ranging from the xmin-xmax, ymin-ymax

Interpolate LondonCrime_Drugs data points

## [inverse distance weighted interpolation]

Interpolate LondonCrime_Violence data points

## [inverse distance weighted interpolation]

Interpolate LondonCrime_Robbery data points

## [inverse distance weighted interpolation]

An Interactive Crime Prediction Map: Crime in Camden City, London