Correlation Heatmap Visualization
Overview
This Jupyter notebook contains code to generate and display a correlation heatmap based on data from a CSV file. The heatmap provides a visual representation of the correlations between different variables in the World Bank dataset, allowing for quick identification of strong positive or negative relationships.
Contents
The notebook includes the following main components:
Data loading and preprocessing
Correlation heatmap generation
Heatmap display and interpretation
Dataset from World Bank
The notebook features the following files:
annual gdp per capita
cardon dioxide emissions
death rate
forest % of land area
gini index inequality
government expenditure per student % of gdp
military expenditure % of gdp
population density
proportion of women in parliament
renewable energy consumption % of final consumption
time required to start a business
Requirements
To run this notebook, you'll need the following Python libraries:
pandas
numpy
matplotlib
seaborn
You can install these libraries using pip:
Copy: !pip install pandas numpy matplotlib seaborn
Usage
Ensure you have a CSV file named correlation_results.csv in the same directory as this notebook. This file should contain your correlation matrix, with each cell containing a string in the format "correlation_value (p=p_value)".
Open the notebook in Jupyter Lab or Jupyter Notebook.
Run all cells in the notebook sequentially.
Interpreting the Heatmap
The heatmap shows correlations between all pairs of variables in your dataset.
Color intensity indicates the strength of the correlation:
Dark red indicates strong positive correlation
Dark blue indicates strong negative correlation
White or light colors indicate weak or no correlation
The diagonal will always show perfect correlation (1.0) as it represents each variable's correlation with itself.
Troubleshooting
If you encounter any issues:
Ensure your correlation_results.csv file is correctly formatted.
Check that all required libraries are installed and up to date.
Verify that the CSV file is in the same directory as the notebook.
For any persistent problems, please check the documentation of the libraries used or seek assistance in the respective community forums.
License
This notebook is provided under the GPL 3.0 License. Feel free to modify and distribute it as needed, while providing attribution to the original source.
-
Notifications
You must be signed in to change notification settings - Fork 0
License
daniellegauthier/world-bank-data-analysis
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published