Data & Code
I maintain more than 60 public repositories on GitHub covering applied econometrics, data visualization, impact evaluation, and policy data analysis. Everything is open-source. Below is a curated selection of the most useful projects.
Featured Projects
A Vision for National Statistics (book)
The Quarto source of my book on building Pakistan’s national data infrastructure.
WDI Explorer
An R tool for exploring the World Bank’s World Development Indicators.
Course sites built with Quarto
Full course websites, with code, for Machine Learning for Economists and Time Series Econometrics and Macroeconomic Forecasting.
Data for Development (D4D)
Materials for a five-day workshop on AI-augmented R workflows for analysis and automation.
Applied Econometrics with R
Complete course materials — regression, time series, panel data, causal inference — all implemented in R with real datasets.
Impact Evaluation Toolkit
Practical R implementations of difference-in-differences, RCTs, regression discontinuity, matching, and instrumental variables for policy evaluation.
R for Development (R4D)
Introduction to R for development economists and policy analysts — data wrangling, visualization, and analysis of development data.
Data Analytics
Fundamentals of data analytics — exploratory analysis, summary statistics, and visualization workflows.
R Tutorials & Code Snippets
Shorter tutorials published on RPubs covering specific econometric and data techniques:
- Dummy Variables in Regression
- Multicollinearity Diagnostics
- Economic Forecasting with Tax Data
- Fertility Rate vs GNI Visualization
Data Explorations
Extracting Data from PDF Documents
Using the tabulapdf package in R to extract structured data from government PDF reports — a practical skill for anyone working with Pakistani official statistics.
Pakistan Election Data Explorer
Analysis of Pakistan’s election data from 1993–2018: which politicians won maximum seats, which constituencies had the closest margins, and how previous margins predict future elections.
- Based on data from Collin Cookman. Dashboard in development.
Tools I Use & Teach
| Tool | Purpose |
|---|---|
| R, with Positron and RStudio | Core data analysis and statistical modelling |
| Python | Machine learning and AI workflows |
| Quarto | Reproducible documents, presentations, websites, books |
| tidyverse | Data wrangling (dplyr, tidyr, readr, purrr) |
| ggplot2 / plotly | Static and interactive data visualization |
| tidymodels | Machine learning workflows in R |
| Stata | Econometric analysis (legacy projects) |
| Git / GitHub | Version control and open-source collaboration |
Contribute or Collaborate
If you find errors in any code, want to contribute improvements, or have ideas for data projects relevant to Pakistan’s economic policy, I welcome pull requests and issues on GitHub.