CompletedPythonpandasNumPy+1 more
Iran macro-economic indicators analysis
Analysis of Iran's macro-economic indicators using Python and pandas.
Timeline
Role
Status
CompletedTechnology Stack
Python
pandas
NumPy
Matplotlib
Iran Macro-Economic Indicators Analysis
Overview
A data-driven macroeconomic deep dive into Iran's economy using 60+ years of annual indicators. Covers GDP cycles, inflation, currency devaluation, trade behaviour, and population trends through 12 analytical sections with time series plots, rolling averages, and Z-score anomaly detection.
Core tech: Python · pandas · NumPy · Seaborn · Matplotlib
Core features
- Full macroeconomic story spanning 6+ decades of Iran's economy (1960–2024)
- 12 deep-dive analytical sections covering GDP, inflation, exchange rates, trade, population, and industry
- Recession and crisis detection via negative GDP growth scatter highlighting and Z-score anomaly detection
- Rolling mean trend analysis (10-year window) across all major indicators
- Decade-wise comparative analysis with heatmaps and bar charts
- Multi-indicator correlation matrix, pairplots, and variance inflation factor (VIF) checks
- Structural break detection and regime shift visualization
- Trade balance surplus/deficit classification and trade openness as a GDP integration metric
Architecture (ASCII diagram)
[Raw CSV Dataset (Iran Economic Indicators 1960–2024, Kaggle)]
│
▼
[Pandas DataFrame]
├─ Exploration: df.info(), dtypes, sample(10), column listing
└─ Cleaning: drop unnamed index column
[EDA — 12 Analytical Sections]
├─ 1. Long-term GDP growth story
│ ├─ GDP over time (time series)
│ ├─ Boom vs recession (GDP growth % with axhline at 0)
│ ├─ Crisis year scatter (negative growth years highlighted)
│ ├─ 10-year rolling mean (stability vs volatility)
│ ├─ Structural break detection (decade vertical lines)
│ └─ Decade-wise average GDP growth (bar chart)
│
├─ 2. GDP vs GDP per Capita (Population effect)
│ ├─ Dual-axis time series (GDP + per capita)
│ ├─ Population growth over time
│ ├─ Divergence chart (standard + log scale)
│ ├─ Scatter: GDP vs GDP per capita (non-linear relationship)
│ └─ Decade-wise prosperity comparison
│
├─ 3. Inflation dynamics & economic stress
│ ├─ Inflation rate over time
│ ├─ High-inflation years highlighted (>20% threshold)
│ ├─ 10-year rolling inflation mean
│ ├─ Inflation spikes vs GDP growth overlay
│ ├─ Decade-wise boxplot (volatility spread)
│ └─ Inflation distribution histogram
│
├─ 4. Exchange rate stability vs growth
│ ├─ Official exchange rate over time
│ ├─ Annual % change (pct_change) — 1750%+ spike in 1993–95
│ ├─ Scatter: exchange rate change vs inflation
│ ├─ Overlay: currency devaluation vs GDP growth
│ ├─ Decade-wise exchange rate volatility (boxplot)
│ └─ Scatter: exchange rate level vs GDP growth
│
├─ 5. Population growth pressure
│ ├─ Total population over time
│ ├─ Population growth rate trend
│ ├─ 10-year rolling mean (declining growth signal)
│ ├─ Economic growth vs population growth overlay
│ ├─ GDP per capita vs population growth scatter
│ ├─ Sustainability indicator: GDP growth − population growth
│ └─ Decade-wise population comparison
│
├─ 6. Trade behaviour & global integration
│ ├─ Exports vs imports over time
│ ├─ Trade openness ratio (% of GDP)
│ ├─ Trade expansion vs contraction phases
│ ├─ Trade dependency vs GDP growth
│ ├─ Trade response during economic crises
│ ├─ Export–import balance
│ └─ Decade-wise trade openness
│
├─ 7. Trade balance evolution
│ ├─ Trade balance over time
│ ├─ Surplus vs deficit years highlighted
│ ├─ Trade balance vs GDP growth
│ ├─ 5-year rolling average volatility
│ └─ Decade-wise average trade balance
│
├─ 8. Industrial contribution to GDP
│ ├─ Industry share of GDP over time
│ ├─ Rolling average structural analysis
│ ├─ Industry share vs GDP growth
│ ├─ Decade-wise volatility boxplot
│ ├─ Industry growth vs economic shocks
│ └─ Decade-wise average industry share
│
├─ 9. Correlation & dependency analysis
│ ├─ Full correlation heatmap
│ ├─ GDP growth vs strongest driver indicators
│ ├─ Inflation vs exchange rate correlation
│ ├─ Trade openness vs per capita GDP
│ ├─ Pairplot of key indicators
│ └─ Multicollinearity check (VIF)
│
├─ 10. Volatility & stability analysis
│ ├─ Rolling standard deviation over time
│ ├─ GDP growth volatility vs inflation volatility
│ ├─ Exchange rate volatility
│ ├─ Decade-wise average volatility
│ ├─ Volatility heatmap across indicators
│ └─ Crisis year highlights
│
├─ 11. Decade-wise comparative analysis
│ ├─ Avg GDP growth, inflation, trade openness, industry share by decade
│ ├─ Combined multi-indicator decade comparison
│ └─ Heatmap of decade-level averages
│
└─ 12. Anomaly & crisis detection
├─ Z-score based anomaly flagging across key indicators
├─ GDP growth anomaly plot
├─ Inflation anomaly plot
├─ Trade balance anomaly plot
├─ Multi-indicator anomaly heatmap
└─ Top crisis years ranking
Analysis breakdown
| Section | Focus | Key Insight |
|---|---|---|
| 1. GDP Growth | Long-run trend + boom/bust cycles | 1980s recession hit −20%; stagnant 10Y rolling mean since 1970 |
| 2. GDP per Capita | National wealth vs individual prosperity | Per capita GDP underperforms national GDP post-2010 |
| 3. Inflation | Price stability & economic stress | 1995–96 spike reached 50%; current rates back at 30–40% |
| 4. Exchange Rate | Currency health vs growth | 1750%+ devaluation shock in 1993–95; steady depreciation post-2000 |
| 5. Population | Demographic pressure on economy | Population growth declining since 1990; GDP per capita inversely affected |
| 6. Trade | Global integration via imports/exports | Trade openness peaked at 70%+ in 1974–76; crashed to <20% by 1986–87 |
| 7. Trade Balance | Surplus/deficit history | 1979–1992 period saw consistently negative trade balance |
| 8. Industry | Structural weight of industry in GDP | Industry share halved post-1974; slow recovery since 1987 |
| 9. Correlation | Driver identification + multicollinearity | Full VIF check; trade openness strongly tied to per capita GDP |
| 10. Volatility | Stability measurement across decades | Exchange rate % change dominates volatility; GDP growth relatively calmer |
| 11. Decade Analysis | Comparative macro summary | 1970s best decade for trade; 1980s worst for GDP and trade balance |
| 12. Anomaly Detection | Z-score crisis flagging | Automated identification of top crisis years across all indicators |
Tech stack
Tech stack
Languages & Libraries
- Python
- NumPy
- Pandas
- seaborn
- Matplotlib, Seaborn
- warnings (suppressed)
Dataset
```
**Source** : Kaggle — Iran Economic Indicators 1960–2024
**Rows** : 60+ annual records
**Key columns** : GDP_Current_USD, GDP_Growth_Percent, GDP_Per_Capita_USD, Inflation_Rate_Percent, Official_Exchange_Rate, Population_Total, Population_Growth_Percent, Trade_Openness, Industry_Value_Added_Percent
```
How to run
bash
# Install dependencies
pip install numpy pandas matplotlib seaborn
# Launch the notebook
jupyter notebook iran-economy-deep-analysis-final-version.ipynb
Dataset access
Dataset available on Kaggle: 'Iran Economic Indicators 1960–2024'
Path used in notebook: '/kaggle/input/iran-economic-indicators-1960-2024/data.csv
