Skip to content

Vikashdev1/newsdata-streamlit-dashboard

ย 
ย 

Repository files navigation

image image

NewsData.io Analysis Dashboard

A comprehensive Python-based dashboard built with Streamlit for analyzing news data from NewsData.io with advanced visualizations, sentiment analysis, PDF export, and detailed reporting.

Python Version Streamlit License


๐Ÿ“‹ Table of Contents


๐ŸŒŸ Features

Core Functionality

โœ… 3 API Endpoints Support

  • Latest News (past 48 hours)
  • Crypto News (cryptocurrency-specific)
  • Archive News (up to 7 years historical data)

โœ… Advanced Filtering

  • Search by keywords
  • Geographic filters (country, language)
  • Content filters (category, sentiment, domain)
  • Crypto coin filtering
  • Time range selection

โœ… Interactive Visualizations

  • 6 Plotly interactive charts
  • Keyword word cloud
  • Real-time progress tracking
  • Responsive design

โœ… Data Analysis

  • Statistics dashboard
  • Sentiment distribution analysis
  • Source credibility metrics
  • Geographic coverage analysis
  • Timeline trends

โœ… Export Capabilities

  • CSV export
  • JSON export
  • PDF Report (NEW!)

๐Ÿ†• New Features (Latest Update)

1. PDF Export with Comprehensive Report ๐Ÿ“„

Professional PDF reports including:

  • Summary statistics
  • Detailed sentiment analysis (avg, max, min scores)
  • Top 10 news sources
  • Sentiment distribution
  • API request details
  • Timestamp and metadata

2. API URL Display ๐Ÿ”—

View the actual API request:

  • Complete endpoint URL
  • All parameters used
  • Expandable section
  • Useful for debugging

3. Enhanced Sentiment Analysis ๐Ÿ˜Š

Detailed sentiment metrics:

  • Average positive/neutral/negative percentages
  • Maximum sentiment scores
  • Minimum sentiment scores
  • Interactive metric cards
  • Detailed data table

๐Ÿš€ Installation

Windows

Quick Setup

  1. Extract ZIP file
  2. Double-click setup.bat
  3. Double-click run.bat

Manual Setup

cd newsdata-streamlit-dashboard
python -m venv venv
venv\Scripts\activate
pip install --upgrade pip
pip install -r requirements.txt
streamlit run app.py

Linux

Quick Setup

cd newsdata-streamlit-dashboard
chmod +x setup.sh run.sh
./setup.sh
./run.sh

Manual Setup

cd newsdata-streamlit-dashboard
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
streamlit run app.py

๐Ÿ“– Usage

Step 1: Get API Key

  1. Visit NewsData.io
  2. Sign up for free
  3. Copy API key

Step 2: Launch Dashboard

# Windows
run.bat

# Linux
./run.sh

Step 3: Configure Search

  1. Enter API key in sidebar
  2. Select endpoint
  3. Set filters
  4. Click "Search News"
  5. Click "Generate Analysis"

Step 4: Explore Results

  • View statistics and charts
  • Check detailed sentiment analysis
  • View API request details
  • Download reports (CSV/JSON/PDF)

๐Ÿ“Š Exports

CSV Export

  • Excel-compatible
  • All article data
  • Metadata included

JSON Export

  • Developer-friendly
  • Complete data structure
  • Easy to parse

PDF Report (NEW!)

Professional report with:

  • Summary statistics
  • API request details
  • Detailed sentiment analysis (average, max, min scores)
  • Top 10 sources
  • Sentiment distribution
  • Timestamp

๐Ÿ”ง Troubleshooting

Installation

"Python not found"

# Windows: Download from python.org
# Linux: sudo apt install python3 python3-pip python3-venv

Package installation fails

pip install --upgrade pip
pip install --no-cache-dir -r requirements.txt

Permission denied (Linux)

chmod +x setup.sh run.sh

Charts not displaying

streamlit cache clear
pip install --upgrade plotly

PDF export fails

pip install reportlab==4.0.7 kaleido==0.2.1

๐Ÿ”ฎ Future Scope

Planned Features

Phase 1: Enhanced Analytics

  • Multi-search comparison
  • Trend detection
  • Source credibility scoring
  • Custom date grouping
  • Advanced filtering UI

Phase 2: Automation

  • Email report scheduling
  • Database integration
  • API response caching
  • Custom alert triggers
  • Webhook integration

๐Ÿ“„ Dependencies

streamlit==1.28.2      # Web framework
requests==2.31.0       # HTTP requests
pandas==2.0.3          # Data manipulation
plotly==5.18.0         # Interactive charts
wordcloud==1.9.3       # Word cloud generation
matplotlib==3.7.5      # Chart rendering
reportlab==4.0.7       # PDF generation
kaleido==0.2.1         # Chart export

๐ŸŽฏ Quick Commands

# Install
pip install -r requirements.txt

# Run
streamlit run app.py

# Stop
Ctrl + C

# Deactivate venv
deactivate

๐Ÿ“ž Support


๐Ÿ™ Acknowledgments


Made with โค๏ธ using Python & Streamlit

Happy Analyzing! ๐Ÿ“Š

About

A Streamlit dashboard for analyzing news data with the NewsData.io API. Features interactive charts, sentiment analysis, word clouds, and PDF reports. Supports latest news, crypto news, and historical archives with advanced filtering options.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 94.1%
  • Shell 3.0%
  • Batchfile 2.9%