This repository contains code for analyzing the relationship between GDP, GDP per capita, and life expectancy. The code performs various data processing tasks and visualizations using Python libraries such as Pandas, Matplotlib, and Seaborn. The analysis aims to explore the correlations between economic indicators and life expectancy across different countries.
The code is organized into several sections, each addressing specific tasks:
-
Data Preparation:
- Two datasets containing GDP, GDP per capita, and life expectancy are imported and filtered to extract relevant information.
-
Visualization:
- A scatter plot is generated to visualize the relationship between GDP per capita and life expectancy for different countries.
-
Discussion of Results:
- Brief discussion on the observed correlations and possible underlying reasons for the findings.
-
Data Cleaning:
- Explanation and justification of the data cleaning steps performed, including merging datasets, removing redundant columns, and renaming columns.
-
Analysis of Life Expectancy:
- Identification of countries with life expectancy one standard deviation above the mean.
-
Analysis of High Life Expectancy with Low GDP:
- Identification of countries with high life expectancy but low GDP/GDP per capita.
-
Correlation Between GDP and Life Expectancy:
- Discussion on whether every large economy (GDP) has a long life expectancy.
-
Impact of GDP per Capita on Life Expectancy:
- Discussion on how changing the definition of a large economy to GDP per capita affects the results.
To run the code:
- Ensure Python and the required libraries (Pandas, Matplotlib, Seaborn) are installed.
- Place the datasets (
gdp.csv,gdpcap_life.csv) in the same directory as the script. - Execute the script in a Python environment.
The analysis provides insights into the relationship between economic indicators and life expectancy, highlighting correlations and potential implications. Users can further explore the code and results to deepen their understanding of these relationships and their significance in public health and economic development.
- It's essential to interpret the results in the context of available data and consider additional factors not captured in the analysis.
- Users are encouraged to customize and extend the code for their specific research questions or datasets.
- Ghiles Asmani
For any questions or feedback, please contact aghilesasmani@gmail.com