A Python application for real-time data ingestion, sentiment analysis, and visualisation. The project fetches live and historical data via an API and WebSocket, performs sentiment scoring using a trained vocabulary model, stores results in a local SQLite database, and renders dynamic graphs for analysis.
- Live data fetching — Pulls data in real time via a configurable API and WebSocket client (
api.py) - Sentiment analysis — Classifies text using a custom vocabulary-based model trained on
vocabTraining.csv - Persistent storage — Saves results to a local SQLite database (
database.db) managed bydatabase.py - Data visualisation — Generates graphs and charts from stored results using
graph.py - Modular architecture — Clean separation of concerns across API, database, sentiment, and visualisation layers
MarketAnalyticsNEA/
├── app.py # Main application entry point
├── api.py # API client for fetching live data
├── database.py # Database setup and query helpers
├── database.db # SQLite database (auto-generated)
├── sentiment.py # Sentiment analysis logic
├── testSentiment.py # Tests/ helps train for sentiment module
├── graph.py # Graphing and visualisation utilities
├── vocabTraining.csv # Training vocabulary for the sentiment model
├── requirements.txt # Download relevant libraries/ packages
├── storage/ # Directory for storing output files
└── .gitignore
- Python 3.2+
- pip
-
Clone the repository:
git clone https://github.com/rs2387/MarketAnalyticsNEA.git cd MarketAnalyticsNEA -
Install dependencies:
pip install -r requirements.txt
python app.pyThis will start the data pipeline — fetching live data, running sentiment analysis, saving to the database, and generating graphs.
API endpoints or data sources can be configured in api.py. Update the relevant URL or authentication parameters before running.
app.pyorchestrates the pipelineapi.pyfetches live data from an external sourcesentiment.pyscores the fetched text using vocabulary trained fromvocabTraining.csvdatabase.pypersists the results todatabase.dbgraph.pyreads from the database and renders visualisations, saved tostorage/
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
This project does not currently specify a license. Please contact the repository owner for usage permissions.