Skip to content

jojopirker/sdcProject

Repository files navigation

Solution Deployment and Communication Project

License: MIT Status

This is the Github Page for our SDC Project.

Pipline Status

Builds:

Frontend Dashboard Backend

Deployment:

Backend

Build with:

Python JavaScript

FastAPI React Plotly Pandas scikit-learn Docker Nginx

Deployed to:

Azure

Data

The Dataset is from Kaggle. It represents car accidents in the UK over a time-frame of about 10 years.

Deployment

The current deployed version can be visited under: http://sdc-project.azurewebsites.net. It gets automatically built and pushed on every new commit.

Below is a schematic of our pipline for deployment:

Pipleines

And here a little overview of the infrastructure used in deployment:

Deployment

Project Structure

The structure of this repo is the following:

Folder Details
/backend contains all the files for our backend
/frontend contains all our frontend files
/dash_app contains the dash app, which is integrated into our frontend
/data empty folder for local usage, see /data/README.md
/etc contains additional content for the project (for example pics)
/notebooks contains all the notebooks used for data analysis etc.

Build

First you'll need to install node.js. Then you can build the frontend. Inside the /frontend/sdc-frontend/ folder run:

npm install

and (for local testing, for production substitute local for prod)

npm run build:local

Sidenote: Since env-cmd is used this command will not work on standard Windows cmd or Powershell. Execute the following commands prior to solve this:

npm update

npm install dotenv --save

To build all docker containers run (after substituting user and token) in the root project folder:

docker compose build --build-arg kaggle_user=user --build-arg kaggle_token=token

Run

After building you can start the project simply via:

docker compose up

And point your browser to localhost

Known Problems

Dash-App Building Process

Error Details Solution
401 The credentials are wrong. -
403 The credentials are wrong. -
404 The dataset cannot be found on kaggle. Run the build again.
416 The contigent for downloading the dataset was already used. The process needs to be run again the next day.

Frontend

Error Details Solution
env-cmd env-cmd is used and does not work. run commands found under Build

TODO

  • Descriptive Analysis
  • Train ML model (serverity ~ .)
  • Create Dash App
  • Update Frontend
  • Create Flask Backend
  • Create Github Actions
  • Change Layout Dash App
  • Update Dash App
  • Add Filters to Dash App 1
  • Add Filters to Dash App 2
  • Setup Azure AppServices
  • Update backend with model