Skip to content

A Python project that analyzes World Bank indicator datasets (1990–2020) for selected countries. It performs statistical analysis, generates line plots, bar charts, and correlation heatmaps, and visualizes trends in agriculture land use, forest cover, CO₂ emissions, urban population, renewable energy consumption, and mortality rates.

Notifications You must be signed in to change notification settings

OmkarSawant23/AP_Assignment_2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation


🌍 World Bank Indicators Analysis & Visualization

This project performs data cleaning, statistical analysis, and visual exploration of multiple World Bank indicators across selected countries. It generates line plots, bar charts, and correlation heatmaps for deeper insight into global trends such as agriculture land use, forest area, CO₂ emissions, renewable energy consumption, urban population, and mortality rates.


📁 Project Overview

The script:

  1. Loads and filters World Bank CSV datasets

  2. Selects six countries for analysis: France, India, Netherlands, Hungary, Germany, Australia

  3. Extracts data from 1990–2020

  4. Generates:

    • Statistical summaries
    • Line plots (1990→2020)
    • Bar charts for selected years
    • Correlation heatmaps
  5. Saves figures as PNG files


📦 Indicators Analyzed

Each dataset corresponds to a World Bank indicator:

Indicator File Description
Agriculture land (% of land area) API_AG.LND.AGRI.ZS_DS2... Land used for agriculture
Forest area (% of land area) API_AG.LND.FRST.ZS_DS2... Total forest coverage
CO₂ emissions (kt) API_EN.ATM.CO2E.KT_DS2... Measured in kilotons
Urban population API_SP.URB.TOTL_DS2... Number of people living in urban areas
Renewable energy consumption (%) API_EG.FEC.RNEW.ZS_DS2... Share of renewables in energy use
Mortality rate (under 5) API_SH.DYN.MORT_DS2... Under-5 mortality rate

🛠️ Functions & Their Purpose

1. file_name(file)

  • Reads CSV files

  • Selects countries of interest

  • Returns:

    • Transposed dataframe (years as rows)
    • Standard dataframe (countries as rows)

2. stats_functions(heading, df_stats)

Calculates and prints:

  • Summary statistics (describe())
  • Skewness
  • Kurtosis
  • Median

3. plot_line(data_f, title, x_axis, y_axis)

Creates line plots for all six countries across years 1990–2020.


4. bar_plot(data_frame, xlabel, ylabel, title)

Creates grouped bar charts for selected years:

  • 2005, 2010, 2015, 2020

5. heat_map(...)

Generates a correlation heatmap for different indicators for a single country.

Countries visualized:

  • India
  • Germany
  • Australia

📊 Visual Outputs Generated

The script creates and saves:

✔ Line Plots

  • Agriculture land
  • Forest land

✔ Bar Charts

  • CO₂ emissions
  • Urban population

✔ Heatmaps

  • Correlation matrix for each selected country

All images are saved as high-quality PNG files (dpi=300).


▶ How to Run

Requirements

Install necessary libraries:

pip install numpy pandas matplotlib scipy

Run script

Place all CSV files in the working directory and run:

python main.py

📌 Countries Analyzed

Country
France
India
Netherlands
Hungary
Germany
Australia

📈 Example Insights Provided by the Script

  • Growth or decline in agricultural land use

  • Forest land changes over 30 years

  • CO₂ emissions trends across industrialized vs. developing economies

  • Urbanization growth patterns

  • Correlations between:

    • Renewable energy use
    • CO₂ emissions
    • Mortality rates
    • Forest/agriculture land changes

📚 Project Purpose

This analysis is suitable for:

  • Data analysis assignments
  • Environmental and economic studies
  • Time-series trend visualization
  • Understanding multi-indicator correlations

About

A Python project that analyzes World Bank indicator datasets (1990–2020) for selected countries. It performs statistical analysis, generates line plots, bar charts, and correlation heatmaps, and visualizes trends in agriculture land use, forest cover, CO₂ emissions, urban population, renewable energy consumption, and mortality rates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages