This repository contains practical, real-world Python data science and analytics tutorials built using live or sample news datasets from the NewsDataHub API.
Each tutorial demonstrates how to transform raw news articles into meaningful visualizations, insights, and analytics using popular Python libraries such as Pandas, Matplotlib, Plotly, and more.
Each tutorial folder contains:
- A complete Python script (
main.pyor equivalent) - A Jupyter Notebook with step-by-step explanations
- Sample input data
- Generated charts and visualization images
- A tutorial-specific README with instructions and context
All tutorials use either sample NDH data or free-tier API responses, making them fully runnable out of the box.
Below are the completed tutorials currently in this repository:
- Bar Charts — Visualizing topic or source distribution
- Treemaps — Mapping hierarchical topic proportions
- Circular News Wheel — Polar area charts to display news topic distribution
- Sankey Diagram — Topic flow across categories
- Chord Diagram — Visualizing topic co-occurrence patterns
- Pick a tutorial from the list
- Open the folder → run the notebook or script
- Use the included code as-is or adapt it for your own analytics projects
- (Optional) Plug in your own NewsDataHub API key for live data
NewsDataHub provides:
- Real-time and historical news data
- 40+ languages
- 170+ countries
- Clean structured JSON
- Easy filtering, search, and topic extraction
Perfect for:
- Dashboards
- AI/ML pipelines
- Data science projects
- Monitoring
- Research
Learn more → https://newsdatahub.com
Stay tuned — this repo is updated weekly.