https://github.com/oracle-quickstart/pandas-oracledb-statistical-analysis
https://github.com/oracle-quickstart/pandas-oracledb-statistical-analysis
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/oracle-quickstart/pandas-oracledb-statistical-analysis
- Owner: oracle-quickstart
- License: apache-2.0
- Created: 2023-03-13T15:06:30.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-03T05:33:36.000Z (over 2 years ago)
- Last Synced: 2024-12-29T20:15:53.614Z (12 months ago)
- Language: Python
- Size: 31.3 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Statistical Analysis with Oracle Database, Pandas, Matplotlib and Seaborn
This project contains Python code that utilizes the Matplotlib and Seaborn libraries for data visualization.
# Usage
This project requires the following libraries:
```
pandas
sqlalchemy<2.0
oracledb
matplotlib
seaborn
```
## Run without GUI
### Clone the Github Repo
```
git clone https://github.com/oracle-quickstart/pandas-oracledb-statistical-analysis.git
cd pandas-oracledb-statistical-analysis/
```
### Set the environment variables to connect to Oracle Database
```
export ORACLE_USER=username
export ORACLE_PASSWORD=password
export ORACLE_DSN='(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.ap-melbourne-1.oraclecloud.com))(connect_data=(service_name=*******_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))'
```
### Seed the Schema
```
sql $ORACLE_USER/$ORACLE_PASSWORD@$ORACLE_DSN
@schema.sql
```
### Generate Sample Employee Data
```
BEGIN
add_employees(5000); -- generate 5k random employees
END;
/
```
### Generate Sample Employee Salary Data
```
BEGIN
generate_employees_salary(5000); -- generate 5k random employee salary/bonus records
END;
/
```
### Build from Source
```
podman build -t oraclepandasdemo .
podman run -it \
-e ORACLE_USER=admin \
-e ORACLE_PASSWORD=YourPassword234#_ \
-e ORACLE_DSN="(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.ap-melbourne-1.oraclecloud.com))(connect_data=(service_name=****_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))" oraclepandasdemo
```
## Run using GUI
# Install Dependencies
```
pip3 install -r requirements.txt
```
# Set the environment variables to connect to Oracle Database
```
export ORACLE_USER=username
export ORACLE_PASSWORD=password
export ORACLE_DSN='(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.ap-melbourne-1.oraclecloud.com))(connect_data=(service_name=*******_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))'
```
# Execute Python Script
```
python3 pandas-charts.py
```
## Visualization




#### Important Note : Visualization of the Pandas dataframes currently work only from Python3 and not Docker