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. 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,stop_words): The function will create Word Cloud using Document Term Matrix.
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.
stop_words (list/string): Enter the list of stop words, which should be avoided while creating word cloud. Example: "mother, mom, mum".
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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | beb62b89c4a167e614de6f24ec4505c424660fa8fc6cc0db1b366700e1cc1151 |
|
MD5 | 42e0a6fb1e44ad1d11f228dcc82dab8e |
|
BLAKE2b-256 | ead0672a89c53980fe3d2418f629f7f912817f97f8105b9c25ef451922332d38 |
Hashes for occasion_analysis_package-2.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbfb78977decdad41683a1aed9a6a8418c39ae21e96d3f11c3461e9790acd655 |
|
MD5 | 005bc17c62ece6672aa56a1579a7034a |
|
BLAKE2b-256 | 906e4cbe3d20c07fec0402cfba1a68bf56d56dd9aac818d598d2e19327a668a0 |