Skip to content

PeterTsungYu/dev_eda

Repository files navigation

Data Analysis Dash App

Scope

This project aims to build a visualization web app for data analysis.

  • Visualization
  • Data Analysis
  • Interactive web app
  • Generation of research reports

Dependencies

The web app is built under the frameworks of Dash and Plotly. They are both python-native frameworks for web application and data visualization. One would find out that it is a relatively easy way to build an interactive interface even though one is programming in Python.

Data are populated from a remote database. For instance, python mariadb.

With this interactive data analysis project folder, one could further visualize and analyze. Take a look at the Pythonic IoT project and NodeRed Dashboard that are created under the same scope of this project.

Features Links
Pythonic IoT project [:link:][https://github.com/PeterTsungYu/dev_iot]
NodeRed Dashboard [:link:][https://github.com/PeterTsungYu/flows_Reformer]

Snaps

Overall view

gif

Summary table

Summary charts and plots

Comparison graph

Selection graph

Quick Start

The below instructions are employed in the environment as...

  • Linux-based or Linux system with the Python3 installed
  • Wifi or Intranet access

Clone the project

git clone https://github.com/PeterTsungYu/dev_eda.git

Install required packages

cd dev_eda/
pip3 install -r requirements.txt

MariaDB as mySQL drop-in replacement

If you wish to apply a pipe to a database, you should establish a database somewhere. Either as a localhost or as a remoe database server.

# install MariaDB
sudo apt-get install mariadb-server

# for secure setting
sudo mysql_secure_installation

# check systemctl status 
systemctl status mysql

# to start the service
sudo systemctl start mysql

# to stop the service 
sudo systemctl stop mysql

# for login as root 
$ sudo mysql -u root -p
# inside the shell of mysql
## create a new db
CREATE DATABASE <example>;

## create a table in a db
create table <customer>(<name> varchar(10), <join_date> date) DEFAULT CHARSET=utf8;

## create a new user
CREATE USER <user>@<IP> IDENTIFIED by <password>;

## grant privilege
GRANT ALL PRIVILEGES ON <database>.<table> TO <user>@<IP>;
FLUSH PRIVILEGES;

## show grants
SHOW GRANTS FOR <user>@<IP>;

.env file

You can find an example of an .env file.

touch .env 
# inside the .env, fill in the info
db_user=''
db_pwd=''

"db_user", the one you created within mysql

"db_pwd", the one you created within mysql as the user is created

In this project, the localhost is used as the host.

Execute Python script in shell

With everything being employed, good luck for your ride!

python3 app.py

If start successfully

img_0

If seeing the above image, you can go ahead to open a browser. After starting the Dash as a web app, you can access the web app in a browser by visiting localhost:8050. The browser should be the one running on your machine (like RPi) or the one on your remote computer as you are accessing your machine by remote ssh or connections.

The default port for Dash is 8050

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages