Skip to content

Using Flask, MySQL, Sprak and AWS to show the driving behavior of each driver and monitor the driving speed of each driver in real time

Notifications You must be signed in to change notification settings

chanalan321/simple-driving-behavior-analysis

Repository files navigation

driving-behavior-analysis

This project is established with Flask, MySQL, Sprak and AWS. The frontend was developed with html. On the other hand, Flask was used to build backend, API server and router. MySQL was used to build the database.

project description

  1. Generate a summary to show the driving behavior of each driver.
  2. Monitor the driving speed of each driver in real time.

For 1), display the driving behavior information during the given period in a HTML table. The information should includes the car plate number, the cumulative number of times of overspeed and fatigue driving, the total time of overspeed and neutral slide.

For 2), use a diagram to visualize the driving speed of each driver during the given period. The diagram automatically updated every 30 seconds for monitoring the driving speed.

Set up environment

Set up database

SetUpDatabase.sql was used to set up both databases for function 1 and function 2.

Analyze driver driving behavior

spark_select.py was used to analyze driver driving behavior since the data( detail-records ) is so big. Also, uploadDrivingBehavior.py was used to upload the result to mysql.

Set up real-time monitoring device

Considering not having a real-time monitoring device, write.py is used to emulate it and generate data.

Result

home page:

function 1:

function 2:

About

Using Flask, MySQL, Sprak and AWS to show the driving behavior of each driver and monitor the driving speed of each driver in real time

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published