Data & Code

Open-source R code, data projects, and reproducible analyses by Dr. Zahid Asghar — econometrics, data visualization, election analysis, and PDF data extraction.

I maintain 57 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.


R Tutorials & Code Snippets

Shorter tutorials published on RPubs covering specific econometric and data techniques:

Browse all RPubs →


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 / RStudio Core data analysis and statistical modeling
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.

GitHub Profile →

Back to top