Loading libraries

library(ggplot2)

Loading data

train <- read.csv("C:/Users/user/Documents/Kaagle_Upload.csv",header=T,stringsAsFactors = F)

Graphics analysis

ggplot(data = train,aes(x=train$location_easting_osgr,y=train$location_northing_osgr))+
  geom_point(aes(colour=factor(train$urban_or_rural_area)))+scale_colour_brewer(palette = 'Set1' ,
  name = "Guide",labels = c("1:Urban", "2:Rural", "3:Unallocated"))+
  labs(title ="Scatter plot accident area",x = "Location Easting OSGR", y = "Location Northing OSGR")

ggplot(data = train,aes(x=train$location_easting_osgr,y=train$location_northing_osgr))+
  geom_point(aes(colour=factor(train$accident_severity)))+scale_colour_brewer(palette = 'Set1' ,name = "Guide",
  labels = c("1:Fatal", "2:Serious", "3:Sligth"))+labs(title ="Scatter plot severity accident per location", 
  x = "Location Easting OSGR", y = "Location Northing OSGR")

ggplot(data = train,aes(x=train$location_easting_osgr,y=train$location_northing_osgr))+
  geom_point(aes(colour=factor(train$sex_of_driver)))+scale_colour_brewer(palette = 'Set1' ,
  name = "Guide",labels = c("-1:Data Missing/Out of range","1:Male", "2:Female","3:Not known"))+
  labs(title ="Scatter plot sex of driver accident per location", x = "Location Easting OSGR", 
  y = "Location Northing OSGR")