This Python script creates a publication-quality horizontal bar chart showing incident categories among Bangladesh Minority Victims (2025). It calculates the frequency and percentage of incidents in each category and produces high-resolution PNG and PDF chart files.
The script uses pandas for reading and processing the incident dataset and matplotlib for creating the visualization.
The input dataset is a CSV file containing incident records with category indicator variables. The program reads the file and calculates category statistics before generating the chart.
The script reads:
The script creates:
The chart displays the following incident categories:
The script creates a horizontal bar chart using matplotlib. Each category is assigned a semantic color, and each bar displays both the incident count and percentage value.
The chart includes:
Percentages are calculated among incidents with descriptions only. Because one incident may belong to multiple categories, percentages may sum to more than 100 percent.
This script demonstrates a complete data visualization workflow using Python. It converts categorized incident data into publication-ready charts suitable for reports, dashboards, and research presentations.