Python package to do analysis on Occasion
Project description
Installation:
pip install occasion-analysis-package
Get started:
Description: Python package to do analysis on Occasion.
Long Description: This package consist of 3 functions: export sql data to csv(export_data_to_csv), create word cloud(create_word_cloud), create emoji chart(create_emoji_chart).
- export_data_to_csv(credential_file_path, export_file_path): The function will export data based on SQL query into csv file. Either use VPN or make sure your IP is whitelisted. For data loading, create a file named: "credentials.env" which has database credential details in following format:
DATABASE = 'database_name'
USER = 'user_name'
PASSWORD = 'password'
HOST = 'host'
PORT = 'port_number'
This function will ask for Occasion Input. Like Mother's Day, Father's Day, Christmas
Parameters:
credential_file_path (string): File Path for Credential File with file name.
export_file_path (string): File Path to export the data with file name.
Package Import: psycopg2, pandas, python-dotenv
- create_word_cloud(import_file_path): The function will create Word Cloud using Document Term Matrix. Later you will be asked to enter stop word list.
Parameters:
import_file_path (string): File Path to export the data. There should be two columns in the file: "use_case", "all_text". File name should be .csv extension.
Package Import: numpy, pandas, matplotlib, spacy, sklearn, wordcloud
- create_emoji_chart(import_file_path): The function will create Emoji Frequency Chart.
Parameters:
import_file_path (string): File Path to export the data. There should be two columns in the file: "use_case", "all_text". File name should be .csv extension.
Package Import: pandas, plotly, advertools
Example: from occasion_analysis_package import export_data_to_csv, create_word_cloud, create_emoji_chart
export_data_to_csv("D:\\Analysis\\Occassion Analysis\\test\\credentials.env","D:\\Analysis\\Occassion Analysis\\test\\occasion.csv")
create_word_cloud("D:\\Analysis\\Occassion Analysis\\test\\occasion.csv","mother, mom, mum, mummy, grandmother, grand mother, grand ma, grandma, step mom, stepmom") --Stop words for Mother's Day
create_emoji_chart("D:\\Analysis\\Occassion Analysis\\test\\occasion.csv")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for occasion_analysis_package-2.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d3199a21f9f3c5270595f142929760aa3424d51291d5af65eea5acd37f4e87b |
|
MD5 | c233f98aa8f8728727be8542c5147bf4 |
|
BLAKE2b-256 | 2015638288abba0752429f49f3c7baad49a0693d705093592798934ba4886bf5 |
Hashes for occasion_analysis_package-2.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79289fb7b1262385d56edac7548859ece74f07d136222950563bbc770fbdc057 |
|
MD5 | b5b78e0813b9f0e24b157441802afeb7 |
|
BLAKE2b-256 | c0f21f35a6aac64e56422880db6df7b3fc9763df2bb8cbed4c04d59ce03139e0 |