{ "cells": [ { "cell_type": "markdown", "id": "bcb1984c", "metadata": {}, "source": [ "# Global Development Indicators 1960–2025\n", "\n", "Starter notebook for the Kaggle dataset in this folder. It loads `development_indicators.csv` with pandas and walks through quality checks and a first piece of analysis.\n", "\n", "**Files:** `development_indicators.csv`, `data_dictionary.csv`." ] }, { "cell_type": "markdown", "id": "0000f7f2", "metadata": {}, "source": [ "## 1. Load the data" ] }, { "cell_type": "code", "id": "7552eb9d", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "import pandas as pd\n", "\n", "df = pd.read_csv(\"development_indicators.csv\", low_memory=False)\n", "print(df.shape)" ] }, { "cell_type": "markdown", "id": "325de123", "metadata": {}, "source": [ "## 2. Shape, types and missing values" ] }, { "cell_type": "code", "id": "6eb42bc8", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "print(f\"{df.shape[0]:,} rows x {df.shape[1]} columns\")\n", "\n", "missing = df.isna().mean().mul(100).sort_values(ascending=False)\n", "missing[missing > 0].round(1).to_frame(\"missing_%\").head(15)" ] }, { "cell_type": "markdown", "id": "f2d963fe", "metadata": {}, "source": [ "## 3. Numeric summary" ] }, { "cell_type": "code", "id": "aa2f8fd4", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df.describe(include='number').T.round(2).head(20)" ] }, { "cell_type": "markdown", "id": "95e347c3", "metadata": {}, "source": [ "## 4. GDP per capita vs life expectancy" ] }, { "cell_type": "code", "id": "068aaa87", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "latest = df[df[\"year\"] == df[\"year\"].max()].dropna(subset=[\"gdp_per_capita_usd\", \"life_expectancy_years\"])\n", "latest.plot.scatter(x=\"gdp_per_capita_usd\", y=\"life_expectancy_years\", s=12, alpha=0.6,\n", " logx=True, figsize=(8, 5))" ] }, { "cell_type": "markdown", "id": "b5465ff2", "metadata": {}, "source": [ "## 5. Income groups" ] }, { "cell_type": "code", "id": "b9f1f7fa", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"income_level\"].value_counts().to_frame(\"country_years\")" ] }, { "cell_type": "markdown", "id": "a4e246ab", "metadata": {}, "source": [ "## 6. Indicator completeness" ] }, { "cell_type": "code", "id": "a90ed7dd", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "(df[\"indicators_present\"].describe().round(1).to_frame(\"value\"))" ] }, { "cell_type": "markdown", "id": "b4348ff7", "metadata": {}, "source": [ "## 7. Regional averages over time" ] }, { "cell_type": "code", "id": "963ae4cd", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "(df[df[\"year\"] >= 1990].groupby([\"year\", \"region\"])[\"gdp_per_capita_usd\"]\n", " .mean().unstack().plot(logy=True, figsize=(11, 5)))" ] }, { "cell_type": "markdown", "id": "c0a372dd", "metadata": {}, "source": [ "## 8. Urban share vs internet adoption" ] }, { "cell_type": "code", "id": "9ac31e1b", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "sub = df.dropna(subset=[\"urban_population_pct\", \"internet_users_pct\"])\n", "sub.plot.scatter(x=\"urban_population_pct\", y=\"internet_users_pct\", s=6, alpha=0.3, figsize=(8, 5))" ] }, { "cell_type": "markdown", "id": "6e43770c", "metadata": {}, "source": [ "## Next steps\n", "\n", "See `KAGGLE.md` for analysis ideas, caveats and provenance." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.11", "mimetype": "text/x-python", "file_extension": ".py", "codemirror_mode": { "name": "ipython", "version": 3 }, "pygments_lexer": "ipython3", "nbconvert_exporter": "python" } }, "nbformat": 4, "nbformat_minor": 5 }