Skip to content

Commit

Permalink
Advanced Driver Assistance System app (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
chanakyavasantha authored Sep 24, 2024
1 parent a10d98d commit 55450cf
Show file tree
Hide file tree
Showing 15 changed files with 517 additions and 0 deletions.
439 changes: 439 additions & 0 deletions adas-data-analysis-dashboards/app.py

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions adas-data-analysis-dashboards/download.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import os
import requests
from tqdm import tqdm

# Replace these URLs with the actual URLs from your GitHub Release

DATA_URLS = {
'iraste_nxt_cas.csv': 'https://drive.google.com/uc?export=download&id=1h6AdKj3U6MiNXFILvKig8j32E3_SGdfG',
'iraste_nxt_casdms.csv': 'https://drive.google.com/uc?export=download&id=1Vxl7Zv40NOBMWrsrHP9l8SxzdbNjvktm'
}
DATA_DIR = 'data'

def download_file(url, filename):
if not os.path.exists(DATA_DIR):
os.makedirs(DATA_DIR)

filepath = os.path.join(DATA_DIR, filename)

if os.path.exists(filepath):
print(f"{filename} already exists. Skipping download.")
return

response = requests.get(url, stream=True)
total_size = int(response.headers.get('content-length', 0))

with open(filepath, 'wb') as file, tqdm(
desc=filename,
total=total_size,
unit='iB',
unit_scale=True,
unit_divisor=1024,
) as progress_bar:
for data in response.iter_content(chunk_size=1024):
size = file.write(data)
progress_bar.update(size)

def main():
for filename, url in DATA_URLS.items():
print(f"Downloading {filename}...")
download_file(url, filename)
print("All files downloaded successfully.")

if __name__ == "__main__":
main()
24 changes: 24 additions & 0 deletions adas-data-analysis-dashboards/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ADAS Dataset Analysis - Wave App

This repository contains the analysis of the Advanced Driver Assistance System (ADAS) dataset, focusing on understanding the occurrence and characteristics of various alerts generated by vehicles equipped with ADAS. The analysis covers spatial distribution, alert frequency, speed analysis, correlation analysis, driver behavior analysis, and safety impact analysis.

## Dataset Description

The dataset comprises approximately 1.8 million records of ADAS alerts recorded within India. There are 8 types of alerts, including Lane Departure Warning, Headway Monitoring and Warning, Hard Brake, Pedestrian Collision Warning, Forward Collision Warning, Driver Distracted, No Seatbelt, and Smoking while Driving.

### APP Features:
- The app helps Visualizes the geographical distribution of ADAS alerts across India using a responsive, interactive map.
![Alt text](static/2.png)
- The app features loading a data frame that supports interactive search, selection and grouping using h2o-wave components.
![Alt text](static/df.png)
- The app features direct integration of interactive Plotly visualizations using HTML. This approach allows for the seamless embedding of complex, interactive plots within the H2O Wave interface, enhancing the user experience and providing rich, explorable data visualizations
![Alt text](static/4.png)


### Instructions to Run the App:
- Clone the repository
- Initialize & Activate a virtual environment
- Install the requirements
- run download.py to download the data into data directory
- wave run app.py
- Open a web browser and navigate to `http://localhost:10101/` to view the app.
10 changes: 10 additions & 0 deletions adas-data-analysis-dashboards/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plotly
pandas
numpy
matplotlib
seaborn
folium
scikit-learn
nbformat==4.2.0
h2o-wave
statsmodels
Binary file added adas-data-analysis-dashboards/static/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adas-data-analysis-dashboards/static/df.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 55450cf

Please sign in to comment.