Coder Social home page Coder Social logo

fleet-analytics-dashboard / application Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 1.0 17.97 MB

A dashboard that supports fleet managers and decision makers to gain insights into their automotive fleets and optimize them

License: MIT License

Python 94.16% CSS 5.84%
dash dashboard data-science data-analytics flask gunicorn pandas xgb data-visualization

application's Introduction

Fleetboard

This project was developed for the course "338025 Data Science Project - Optimizing Fleet Management" of Prof. Dr. Jan Kirenz at the Stuttgart Media University. The dashboard was developed by Lucie, Tim, Larisa, Jakob, Johannes.

Project Goal

This dashboard supports fleet managers and decision makers to gain insights into their automotive fleets and optimize them. The data foundation for this the NREL Fleet DNA project Truck Platooning Data and simulated data by Tim. image

It consists of three pages for satisfying the need of different target groups:

  • Home view: especially controllers and financial officer can quickly gain insights into the most important key metrics and make high level decisions (e.g. Revenue, Costs, Capacity Overview)
  • Downtimes: this page enables fleet managers to easily monitor their fleet and respond to various challenges fast and confidently
  • Vehicle overview: if detailed information about certain vehicles or their position in real time on a map is neded, fleet managers can view this information on this page

Wiki page

The wiki has the following sub pages:

  1. Home
  2. Goals
  3. Solution Approach
  4. User Research
  5. Design Concept
  6. Data Foundation
  7. Technology stack
  8. Data Science
  9. Dashboard Explanation
  10. Lessons Learned
  11. Potential Improvements

Repository Structure

The files in this repository have the following purpose:

  • .gitignore: enables to ignore files that should not be pushed like database config file
  • apps: all of the dashboard views can be found here
  • assets: logo and stylesheet
  • csv_data_files: data foundation as CSV files (as a fallback in case of database issues)
  • data_preparation: Python scripts for preparing the raw NREL Fleet DNA project Truck Platooning and simulated data
  • hidden: needs to be created with a database.config file inside to connect to the project's PostgreSQL database (ask Johannes for database connection information)
  • init.py: required to make Python treat the directories as containing packages
  • app.yaml: contains the definition of the Python runtime, the entrypoint Gunicorn, and the database connection (need to be specified in the database.config as explained above
  • data_preparation_run.py: Python script for running the data preparation
  • database_connection.py: Python script for connecting to the database
  • main.py: entrypoint of the application
  • requirements.txt: consists of all dependencies necessary for running the application

Software Architecture

This is the current software architecture. More information can be found on the(technology stack wiki page: image

Lessons Learned

Are more detailed list can be found on the lessons learned wiki page

  • Creation of business value from data insights (maintenance prediction)
  • Predictions with XGBoost and data transformation with pandas and NumPy
  • Deployment of Dash app via Gunicorn HTTP server on Google Cloud App Engine
  • Working with different python libraries (e.g. Dash, Plotly. pandas, Numpy)
  • Creating a dashboard with user-centric data visualization (different views for different target groups)
  • Communication is key (GitHub tasks, video calls, documentation, comments)

Contact

License

MIT License - Copyright 2020 ©

application's People

Contributors

dependabot[bot] avatar jakobschaal avatar johannesstroebele91 avatar larisaciupe avatar lj025 avatar timstefany avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ahmedyes2000

application's Issues

Rework routing

  • look through other solutions
  • fix routing
  • merge branch into other branches that need adapted routing

Familiarize with predictions using XGBoost

  • supervised machine learning with the Boosted Tree Algorithm)
  • Machine learning and statistical methods are explained here: https://scikit-learn.org/stable/
  • Decision tree (alternative to linear regression) with random forest extensions and XGboost -> random forest takes average from decision trees (bagging vs boosting ->
  • predict categories with classifications (which type of driver advised by professor)
  • cluster analysis

Futher literature:

Insert tips from professors

Fokus legen

  • einfach xgboost nehmen (decision trees), nur den algroithumus anschauen -> damit data science machen
  • nächster fokus ist die visualisierung
  • NOCHMALS DER FOKUS IST DIE ENTSCHEIDUNGSHILFE (MITTELWERT KÖNNTE REICHEN FÜR DENJENIGEN FALL)
    -> business understanding
    -> welches Problem löse ich damit
    -> welche Entscheidung kornkret damit verbessern
    -> besser dinge ansprechen die man hätte berücksichtigen müssen (gründe angeben)
    -> so kann man lösung weiter ausbauen (scope)
    -> analytics themen reinnehmen
    -> welche library? machine learning und statistische methoden https://scikit-learn.org/stable/
  • kategorien vorhersagen klassifikation -> was für fahrertyp -> decision tries, (random forest erweiterung zu decision tries) -> xgboost algorithmen -> gibts fertig, man braucht nur code template
  • numberische werte vorhersagen -> regression -> decision tries (alternative lineare regression), (random forest erweiterung zu decision tries) -> random forest nimmt mittelwert von entscheidungsbaum (bagging vs boosting -> mehrere modelle -> jedes modell lernt vom anderen)
  • clusteranalyse (muster festeltellen)

Literatur:

-> algobeans beginnen
-> dann https://developers.google.com/machine-learning/crash-course
-> https://colab.research.google.com/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/05.08-Random-Forests.ipynb
-> https://xgboost.readthedocs.io/en/latest/tutorials/model.html

Meeting with Kirenz (28.05.2020)

  • show mockup -> looks fine :)
  • are views a good idea? -> yes they are!
  • show VM on Google Cloud -> seems good
  • how should our software architecture look like? -> start with deploying simple Dash app on VM and look from there on for better solutions

Research frontend dashboard solution

Goals

  • Identify target groups
  • Identify user needs
  • Create persona

Search terms

  • fleet analytics, fleet dashboard, fleet management, logistics, truck
  • competitors (existing dashboards) - Jakob
  • decision science, decision psychology, technology acceptance (https://towardsdatascience.com/, (articles of Google's Chief Data Science Cassie Kozyrkov)
  • business view, economical value
  • interviews (Larisa Bosch fleet management)
  • general automotive learnings

Data resources

  • quantitative and qualitative surveys
  • Google scholar
  • online resources

Important questions

  • Dash vs Shiny vs Angular (Dash see explanation (here)[https://github.com/Fleet-Analytics-Dashboard/Application/wiki/Technology-stack/]
  • can complex data easily be visualized? (only Shiny and Dash)
  • difficulty to connect python backend and Angular frontend (most be done mostly manual = quite difficult)

Setup Dash view "Home" (previously "Controlling" view)

  • Rename vehicle capacity to vehicle status and overview capacity

  • Rename "Controlling" to "Home" view @johannesstroebele91

  • Delete old "Home" view @johannesstroebele91

  • cost pro vehicle category is wanted in the controlling view

  • cost pro category is wanted in the controlling view (wanted by professor)

  • would like to only see the list of categories with the highest costs, but be able to click into the category and see the cost for every single truck (wanted by professor) @ts170

  • Implement card with numbers: Profit Increase: 76% , Revenue: 58%, Costs -42%, Active: 55%, On Time: 93, In Maintenance 35 image

  • Fix vertical space between cards @johannesstroebele91

  • Revise structure of page

    1. Business Goals
    2. Overview of fixed numbers
    3. Costs
    4. Use Vehicle Capacity
    5. Carbon Footprint
    6. Kept Delivery Dates
  • there should be an addtional trend line in the bar chart for the business goals (e.g. revenue) (wanted by professor)

  • Based on the mockup, search for the relevant data in the "cleaned-data-for-fleet-dna.csv"

  • Build the visualizations with Dash based on the identified data

  • Exchange better data visualizations for the respective used case based on the following recommendations

Setup organization

  • create team
  • setup GitHub organization
  • setup project
  • setup basic wiki
  • setup project management process
  • arrange group roles

Presentation: create & hold (23.07.20: 14:15)

Information from professor Kirenz:

  • show challenges! show what you learned from them
  • show a process, not just finished product
  • show next steps (what would be important but could not be finished
  • 20-25 minutes maximum time for presenting (5 min for feedback)
  • each team member must present
  • can make a power point presentation but can also show working web dashboard or
  • Adesso (Mr. Röhring will be present)
  • Show red thread
  • Show our focus (technical, business, ..) -> only talk about others briefely
  • Show documentation on Github and how to use it (dev instrucations, tasks)
  • each group member should presend!

Data Cleansing

  • setup Python script
  • select relevant attributes
  • Replace 'clas_id', 'voc_id', 'type_id', 'drive_id' and 'fuel_id' with representing strings from PDF Document
  • Check for duplicate content e.g. characteristic acceleration
  • improve labels
  • fix missing columns (should contain 0s; creating the data frame was none used)

Research possibile prediction use cases

A maximum of 2 predictions as suggested by the professor. We decided on implementing predictive maintenance first, and if there is time left, add other predictions.

  • predictive Maintenance (wanted by professor and advisor)
  • Different costs (wanted by professor and advisor)
  • Categorization?
  • Revenue, profit
  • dummy data possible
  • document how to do that

Work through professors guideline for deploying app via Google Cloud VM

Instructions here or here with following steps:

  • Setup Google Cloud account
  • Setup a VM instance
  • Make External IP as Static
  • Create Firewall Rules
  • Install Anaconda
  • Connect with Google VM via SSH
  • Clone Dash Application from GitHub
  • Navigate to directory of the main.py
  • Execute the main.py
  • If not possible to access via IP, set it manually

Brainstorm software architecture & dev approach for solution

See documentation: https://github.com/Fleet-Analytics-Dashboard/Application/wiki/Technology-stack

  • Clarify stages for web app solutions (see documentation)
  • choose database for Google Cloud -> PostgreSQL
  • choose data science tool -> Pandas and NumPy
  • Decide between working with real clusters or dummy environment (different effort needed) -> not until now
  • Will not stream data for this project (https://www.tutorialspoint.com/pyspark/index.htm) -> not until now
  • Decided on XGBosst for predicting certain outcomes

Setup Dash view "Vehicles Table"

Meeting (07.05.2020)

  • review of research results
  • talk group goals
  • explore batch data
  • talk about technology stack
  • define MVP
  • plan next tasks

Brainstorm software architecture & development approach for MVP

  • select technology stack for MVP solution (local Dash application with panda csv import)
  • select technology stack for optimal app solution (deploying app remotely on Google Cloud VM, connecting app with PyCharm)
  • document findings in "technology stack" page of the wiki

Setup Dash view "Downtimes"

PS carbon footprint could be calculated based on speed driven, distance driven, number of stops, ...

Meeting with professor 14.05 (14:15)

Results were written down on the project goals wiki page

  • Explain development approach:
  • Target group: fleet manager
  • Dashboard mit Dash und Python
  • Focus on batch processing (later streaming, if enough time is left)
  • LAMDA Stack? Database?
  • Master thesis data basis first (if enough time city mobility data)
  • What is the difference of our project in comparison to the master thesis?

Setup Database on Google VM

Create interim presentation

  • 01 About the Project
  • 02 User Research
  • 03 Software Architecture
  • 04 Design Concept + Live Demo
  • 05 Project Status

Organize wiki and tasks

Write down results into tasks or the wiki of:

  • group discussions
  • professor's tips
  • new features of our app
  • new wiki posts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.