DB Analytics Tools

Databases Analytics Tools is a Python open source micro framework for data analytics. DB Analytics Tools is built on top of Psycopg2, Pyodbc, Pandas, Matplotlib and Scikit-learn. It helps data analysts to interact with data warehouses as traditional databases clients.

Why adopt DB Analytics Tools ?

Core Components

# Component Description How to import
0 db Database Interactions (Client) import db_analytics_tools as db
1 dbi Data Integration & Data Engineering import db_analytics_tools.integration as dbi
2 dba Data Analysis import db_analytics_tools.analytics as dba
3 dbviz Data Visualization import db_analytics_tools.plotting as dbviz
4 dbml Machine Learning & MLOps import db_analytics_tools.learning as dbml

Install DB Analytics Tools

Dependencies

DB Analytics Tools requires Python, Psycopg2, Pyodbc, Pandas, SQLAlchemy and Streamlit.

pip install db-analytics-tools

Get Started

Setup client

As traditional databases clients, we need to provide database server ip address and port and credentials.

# Import DB Analytics Tools import db_analytics_tools as db # Database Infos & Credentials ENGINE = "postgres" HOST = "localhost" PORT = "5432" DATABASE = "postgres" USER = "postgres" PASSWORD = "admin" # Setup client client = db.Client(host=HOST, port=PORT, database=DATABASE, username=USER, password=PASSWORD, engine=ENGINE)

Data Query Language

query = """ ----- GET DATA ----- select * from public.transactions order by transaction_id; """ dataframe = client.read_sql(query=query) print(dataframe.head())
transaction_id client_id product_name product_category quantity unitary_price amount 0 1 101 Product A Category 1 5 100.0 500.0 1 2 102 Product B Category 2 3 50.0 150.0 2 3 103 Product C Category 1 2 200.0 400.0

Implement SQL based ETL

ETL API is in the integration module db_analytics_tools.integration.

# Import Integration module import db_analytics_tools.integration as dbi # Setup ETL etl = dbi.ETL(client=client)

Get started with the UI

DB Analytics Tools UI is a web-based GUI. No need to code, all you need is a JSON config file.

db_tools start --config config.json --address 127.0.0.1 --port 8050
UI Screenshot

Documentation

Documentation available on https://joekakone.github.io/db-analytics-tools.

Maintainer

DB Analytics Tools is maintained by Joseph Konka. Joseph is a Data Science Professional with a focus on Python based tools.