Intermediate level · Module 6: Topic Modelling and Document Analysis · Lesson 3 of 3
Topic Trends and Document Analysis
Learners use document-topic mixtures to compare sources and track themes over time, and present topic findings with clear charts and examples.
In this lesson you will
- Aggregate topic mixtures by source and time
- Visualise and report topic findings
Key concepts
topic shareaggregation by grouptime trendsstacked bar chartrepresentative quotes
The lesson
Each document has a topic mixture. Averaging mixtures by month or source shows which themes rise and fall, for example more health coverage during a vaccination campaign, or which publication covers agriculture most.
Use pandas groupby on the document-topic table joined with dates and sources, then plot with Matplotlib. A stacked bar chart of topic shares per month is easy to read.
Report findings with examples. A chart plus two representative headlines for each highlighted topic is more convincing and harder to misinterpret than a chart alone.
Step by step
- Join the document-topic matrix with dates and sources.
- Compute monthly topic shares with groupby.
- Plot a stacked bar chart of topic shares.
- Write three findings with representative headlines.
Practice activity
Produce a topic-trends chart and a one-page findings note for the project corpus.
Expected result: A clear chart and findings supported by representative documents.
Check your understanding
-
How do you get topic shares per month?
Show answer
Average the document-topic mixtures grouped by month.
-
Why add example headlines to topic charts?
Show answer
They show what the topic means and guard against misinterpretation.
Further learning
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.