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)
# 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
#setting environment variables
export FLASK_APP=run.py
export FLASK_DEBUG=1 (optional)
#run the file
flask run
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.
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 !