Data-Visualization-Project
Demographic Data Visualization
This repository contains a Python program designed to visualize demographic data using bar graphs and histograms. The visualizations are created using the popular libraries Pandas, Matplotlib, and Seaborn. The primary goal is to provide insights into the gender and age distribution of individuals, as well as their occupations, through various graphical representations.
-
Bar Graphs:
- Gender Distribution
- Occupation Distribution
- Average Age by Occupation
- Gender Distribution by Age Group
-
Histograms:
- Age Distribution
- Age Distribution by Gender (Overlaid)
- Age Distribution with Density Plot (KDE)
- Age Group Distribution
-
Clone the repository:
git clone https://github.com/yourusername/Data-Visualization-Project.git
-
Navigate to the project directory:
cd Data-Visualization-Project
-
Install the required packages:
pip install pandas matplotlib seaborn
-
Place your CSV file (named
u.csv
) containing demographic data in the project directory. The CSV should include at least the following columns:gender
,occupation
, andage
. -
Run the program:
python your_program_file.py
-
The program will generate two sets of visualizations:
- A series of bar graphs showcasing the demographic distributions.
- A series of histograms depicting the age distribution and its variations.
Ensure that the u.csv
file has the following structure:
gender | occupation | age |
---|---|---|
Male | Engineer | 34 |
Female | Teacher | 29 |
Male | Artist | 45 |
... | ... | ... |
The program will output four bar graphs and four histograms based on the data provided. The visualizations will display the following information:
- Gender Distribution: A count of males and females in the dataset.
- Occupation Distribution: A count of individuals for each occupation.
- Average Age by Occupation: The mean age of individuals grouped by their occupation.
- Gender Distribution by Age Group: A stacked bar graph showing gender distribution across different age groups.
- Histograms: Various histograms that display the age distribution in multiple formats.
Contributions are welcome! If you have suggestions for improvements or features, feel free to create a pull request or open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.