#Wrong Turn
This was a project aimed at data analysis and visualization of accidents near Leeds(UK).
-
We took the data from https://data.gov.uk/dataset/road-traffic-accidents which had all accident parameters including grid referencing.
-
Then we merged the csv files using mergeData.py ( Take care of changed column names from 2013).
-
Then we renamed the columns for ease of use using cleanData.py
-
We used the output from step 3.(DriverCauses.py) to train a neuralNetwork for accident causes using conditionsCheck.py.
-
Next in the server folder we put the neuralNetModel.pickle and Data.csv files.
-
Then we wrote a flask server to judge location risks via radial queries and conditional risk via neural networks.
-
We even generated a latitude longitude file(lat_lon.csv) using pandas( df.apply command) and bng_to_latlon.
-- Start server by: python flaskServer.py
-- Sample request: localhost/getConditionRisk/?time=2345&sex=1&surface=2&veh=1&lat=53.8077491&lon=-1.5228207&age=37
(You may have to edit the port in flaskServer.py and the sample request.)
To generate a map using mapbox studio you need a file that has columns named 'Latitude' and 'Longitude' (without qoutes) as in lat_lon.csv.
Be Sure to zoom in at Leeds(uk)