Skip to content

This is a Python-based data analysis tool that utilizes machine learning techniques to analyze user engagement on social media platforms. It preprocesses social media data, including sentiment scores, likes, and retweets, normalizes the data, trains a Random Forest Classifier model, and provides insights into user engagement patterns.

Notifications You must be signed in to change notification settings

anujeshify/Social-Media-Engagement-Analyzer

Repository files navigation

Social Media Engagement Analyzer

Introduction

This project utilizes machine learning and artificial intelligence techniques to analyze social media user engagement based on various factors such as sentiment, likes, retweets, and hashtags. The goal is to understand user behavior and identify patterns that contribute to higher engagement on social media platforms.

Installation and Set-up

This project can either be executed on your local machines using Jupyter Notebook or using Google Colab.

Using Google Colab

  1. Go to the following link to use Google Colab. googlecolab1
  2. Clone the repository.
  3. Go to File option in the Menu Bar and click on "Open Notebook" to open the ipynb file saved on your device. Conversely, you can also use the Keyboard shortcut Ctrl+O. googlecolab2
  4. Click on "Upload" and select the downloaded ipynb file from the cloned repository. googlecolab3
  5. While executing the following code snippet, you will be presented with a prompt. gdrivecodesnippet For the code snippet to work, you need to allow Google Colab to access your Google Drive to access the CSV dataset file present on your Google Drive.
    • Permit the Notebook to access the google drive. Click "Connect to Drive". gdrive1
    • Choose the Google Account you are working on. gdrive2
    • Sign in to Google Drive for Desktop by clicking "Continue". gdrive3
    • Allow additional access to Google account. [Read the Consent Summary carefully] gdrive4

Using Jupyter Notebook

  1. Install Jupyter Notebook using default installation method.
  2. Clone the repository and open the ipynb file using Jupyter Notebook
  3. Execute the code sequentially

Usage

  1. Run the sentimentdataset.csv file containing the dataset in the same directory as the Python Notebook.
  2. Execute the Python Notebook social_media_engagement_analyzer.ipynb.
  3. Follow the prompts and instructions provided in the script to preprocess the data, train the machine learning model, and visualize the results.

Dataset

The dataset used in this project (sentimentdataset.csv) contains social media posts with information such as timestamp, sentiment, likes, retweets, and hashtags. The Dataset was taken from Kaggle. Link for the dataset used is given here. kaggle

Models

The project employs a RandomForestClassifier model to analyze user engagement based on various features extracted from social media posts.

Evaluation

The performance of the model is evaluated using classification report metrics such as precision, recall, and F1-score.

Visualizations

  1. Time of Day Distribution: Shows the distribution of user posts based on time of day, categorized as day or night. Time of Day

  2. Correlation Heatmap: Visualizes the correlation between different features of the dataset. Correlation Heatmap

  3. Feature Importance Plot: Illustrates the importance of various features in the RandomForestClassifier model. Feature Importance

  4. Top Hashtags with Maximum User Engagement: Displays the top hashtags with the highest average combined user engagement scores. Top Hashtags

Authors

Contribution

Contributions to this project are welcome! If you have any suggestions, bug fixes, or improvements, please feel free to open an issue or submit a pull request. For any queries reach me at [email protected]

Acknowledgments

Special thanks to the contributors and developers of the libraries and tools used in this project, including pandas, scikit-learn, matplotlib, and seaborn.

About

This is a Python-based data analysis tool that utilizes machine learning techniques to analyze user engagement on social media platforms. It preprocesses social media data, including sentiment scores, likes, and retweets, normalizes the data, trains a Random Forest Classifier model, and provides insights into user engagement patterns.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published