Skip to content

swstkswstk/cryptoXanalyser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Crypto_X_Analyzer: A Sentiment & Financial Analysis Dashboard

This project is a Streamlit web application that provides a comprehensive analysis of major cryptocurrencies. It fetches real-time tweet data from the X (formerly Twitter) API and financial data from Yahoo Finance to deliver insights into market sentiment, price trends, and public discussion topics.

demo

✨ Features

  • Real-time Sentiment Analysis: Analyzes recent tweets for a selected cryptocurrency to determine public sentiment (Positive, Negative, Neutral) using VADER.
  • Financial Charting: Displays historical price data with moving averages (20-day and 50-day) to identify trends.
  • Key Metrics Dashboard: At-a-glance metrics including average sentiment, latest price, annualized volatility, and tweet sentiment distribution.
  • Comparative Analysis: Side-by-side comparison of sentiment and volatility for two different cryptocurrencies.
  • Deeper NLP Insights: Utilizes LDA (Latent Dirichlet Allocation) for topic modeling to uncover key themes in conversations about a cryptocurrency.

🛠️ Tech Stack

  • Frontend: Streamlit
  • Data & Analysis: Pandas, NLTK, Gensim, vaderSentiment
  • APIs: Tweepy (for X/Twitter API), yfinance (for Yahoo Finance)
  • Plotting: Plotly

🚀 Setup and Installation Guide

Follow these steps to get the application running on your local machine.

1. Prerequisites

  • Python 3.8+
  • Git

2. Clone the Repository

Open your terminal and clone the project repository:

git clone <your-repository-url>
cd cryptoSentiments

3. Set Up a Virtual Environment

It is highly recommended to use a virtual environment to manage project dependencies.

# Create a virtual environment
python3 -m venv .venv

# Activate the environment
# On macOS/Linux:
source .venv/bin/activate

# On Windows (Command Prompt):
.venv\Scripts\activate

4. Install Dependencies

Install all the required Python packages using the requirements.txt file.

pip install -r requirements.txt

The application also uses the NLTK stopwords and punkt packages. The first time you run the app, these may be downloaded automatically.

5. Get Your X (Twitter) API Bearer Token

This application requires a Bearer Token from the X Developer Platform to fetch tweets.

  1. Apply for a Developer Account: If you don't have one, go to the X Developer Platform and apply for an account. You will likely need to apply for the "Free" access level, which is sufficient for this project.
  2. Create a New Project: Once your account is approved, create a new Project in your developer dashboard.
  3. Create an App: Inside your project, create a new App.
  4. Find Your Keys & Tokens: Navigate to your App's "Keys and tokens" tab. You will find your Bearer Token here. Copy it.

6. Configure Your Bearer Token

Create a secrets file for Streamlit to securely store your Bearer Token.

  1. Create a new directory named .streamlit in the root of your project folder.

  2. Inside the .streamlit directory, create a new file named secrets.toml.

  3. Add your Bearer Token to this file in the following format:

    # .streamlit/secrets.toml
    
    BEARER_TOKEN = "PASTE_YOUR_BEARER_TOKEN_HERE"

The application is coded to automatically read this secret.

7. Run the Application

You are now ready to run the Streamlit app!

streamlit run app.py

Your web browser should open a new tab with the application running at http://localhost:8501.


📂 Project Structure

cryptoSentiments/
├── .streamlit/
│   └── secrets.toml    # For storing API keys and secrets
├── app.py              # The main Streamlit application script
└── requirements.txt    # Python package dependencies

cryptoXanalyser

cryptoXanalyser

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages