Skip to content

shahan007/SUSS-FlaskDashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard using Flask


This app uses Flask as the framework for web-development.
(I have attached "data.csv" file from the required (link) and the other file is "footballersComplaints.csv" slightly custom modified by me to select file)


Setting up a development environment

# Clone the code repository
git clone https://github.com/shahan007/SUSS-FlaskDashboard

# Create virtual environment
python -m venv venv

# Install required dependencies
pip install -r requirements.txt    

Running the app

#setting environment variables
export FLASK_APP=run.py
export FLASK_DEBUG=1 (optional)

#run the file
flask run

Breif App Info:

appProject package contains all the files required for the development of this app.
App's configuration is stored in config.py.
Data used by the app for charting and its interface is stored in ./data/files directory (stores all the file after successfull upload).
DataSource & Feedback models have already been created and stored in ./data/data/data.sqlite.
App relies on pandas for data analysis and Flask-Sqlalchemy & Flask-Migrate for storing and migration of data models.


Application Interface :

When the file is first run this app will show top 10 banks using the entire file.
When the drop-down menu is clicked app will update the "blue-text" and fetch the data accordingly for charting.

Upload feature:
App also allows to upload one or multiple file(s) for charting. To confirm upload user must click submit button.
There is also a message box below submit button. If a file already exsist in the database or the file is of invalid extension respective error message will be displayed in the message box.
If any of the file has been successfully uploaded an appropiate message will be displayed in the message box.
! Valid file extensions ---> ".tx",".csv" (i trust the user will upload delimited .txt file)

During the uploading phase successfuly uploaded files relative information as described in the DataSource model will be stored. The feedback data and relative column as defined in Feedback model is also stored in the Feedback model from the uploaded file.
When file(s) has/have been successfuly uploaded, app will update the interface (charts & dropdown) using the data of the latest file that has been uploaded & stored (in ./data./file), retrieving file info from (DataSource model) to update the interface.

Listing File Names feature:
App will always be showcasing all the files stored in the app near the bottom of the sidebar.
In addition, to make this app more user-friendly, a user can click on a filename which will also update the user-interface (drop-down & chart) using the data of that selected filename !