This project is an interactive Dash web application that allows users to explore and analyze speeches by Donald Trump. The application visualizes speech metadata, filters speeches by keywords and year, and generates word clouds and transcript views to explore language patterns.
The goal of this project is to demonstrate how text data and metadata from political speeches can be analyzed and visualized using Python. Users can interactively explore speeches, filter them based on keywords, and analyze the language used through NLP techniques.
- Interactive speech duration visualization using Plotly
- Filter speeches by year and keywords
- Choose between matching all or any selected keywords
- Click a speech to view the full transcript
- Generate word clouds from speeches
- Filter word clouds by parts of speech (verbs, nouns, adjectives, adverbs, names)
- Python
- Dash (interactive web applications)
- Plotly (data visualization)
- Pandas (data processing)
- NLTK (natural language processing)
- WordCloud (text visualization)
project-folder
│
├── app.py # Main Dash application
├── speeches_metadata.csv # Metadata for speeches
├── keyword_presence.csv # Keyword occurrence table
├── transcripts_reindexed/ # Folder containing speech transcripts
├── *.pkl # Preprocessed text files for NLP
└── README.md
- Clone the repository
git clone https://github.com/yourusername/trump-speech-explorer.git
- Navigate to the project folder
cd trump-speech-explorer
- Install required packages
pip install dash pandas plotly nltk wordcloud
- Run the application
python app.py
- Open the local server in your browser (usually)
http://127.0.0.1:8050/
Speech transcripts and metadata were compiled for educational purposes as part of a university data analysis project.
Group 5
- Amin
- Piuan
- Princess Victoria Jella
- Mads
This project is shared for educational purposes.