Crypto-Real-Time-Analytics

Python + Tableau Near Real-Time Crypto Dashboard

📊 Project Overview

This project is a near real-time cryptocurrency analytics pipeline built with Python and Tableau. It continuously fetches cryptocurrency prices from the CoinGecko API every minute, enhances the raw data with rolling averages, volatility, and percent change, and stores the results in a CSV file that powers an interactive Tableau dashboard.

While not a full streaming pipeline (e.g., Kafka/Spark), this project simulates real-time analytics by automating continuous data ingestion and providing dashboards that refresh dynamically.

🚀 Results

Fetches live price data for multiple cryptocurrencies every minute. Transform raw API data with rolling averages (5-min, 15-min), volatility measures and % change vs. previous record. Save and load records for real-time feed and that connects and refreshes automatically to a dashboard for real-time analysis.

Key Highlights:

📡 API Integration – Pulls live market data directly from CoinGecko
⏱ Near Real-Time Updates – Fetches new records every minute
📊 Advanced Metrics – Rolling averages, volatility, and % changes
🎨 Interactive Dashboards – Built with Tableau Public
🧩 ETL Workflow – Extract → Transform → Load data

📜 Code Snippet:

 def fetch_data():
    url = "https://api.coingecko.com/api/v3/simple/price"
    params = {
        "ids": ",".join(coins),
        "vs_currencies": "usd",
        "include_24hr_change": "true",
        "include_24hr_vol": "true"
    }
    response = requests.get(url, params=params)
    data = response.json()
    
    rows = []
    for coin in coins:
        rows.append({
            "timestamp": datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S"),
            "coin": coin,
            "price_usd": data[coin]["usd"],
            "pct_change_24h": data[coin].get("usd_24h_change", 0),
            "volume_24h": data[coin].get("usd_24h_vol", 0)
        })
    
    return pd.DataFrame(rows)

Dashboard Layout (conceptual):

Data Output

🖼️ Sample Data Output
timestamp coin price_usd pct_change_24h volume_24h rolling_avg_5min volatility_15min
2025-08-16 17:01:00 bitcoin 61234.56 2.34 348923412.0 61012.34 0.015 2025-08-16 17:01:00 ethereum 3421.78 1.12 23123123.0 3410.55 0.022 2025-08-16 17:01:00 dogecoin 0.083 -0.45 9432134.0 0.081 0.034

📈 Tableau Dashboard

✅ This project demonstrates end-to-end analytics skills: