top of page


These codes and materials are prepared for my teaching, learning, and research purposes.

R Studio

Teaching Materials

These PowerPoint slides were primarily prepared by me for instructing the undergraduate course Plan 296: Data Analysis with R Programming. Additionally, this material was also used to teach a portion of the postgraduate course Plan 6291: Multivariate Data Analysis in Planning Research. Uploaded codes were utilized to demonstrate the functionality of R Studio in the class. Topics covered in the classes include data preparation, descriptive statistics, data visualization, hypothesis testing, and linear regression.

Mode Choice Modeling Using Apollo Package

I have written the attached R codes using the Apollo package to fulfill the requirements of Assignments 4 and 5 for Dr. Chandra Bhat's course, 'CE 397 - Linear Regression and Discrete Choice Methods,' during the Fall 2023 semester. In Assignment 4, I developed multiple binary logistic regression models, while Assignment 5 involved estimation of multiple multinomial logistic regression models. Both assignments explored crucial aspects of mode choice modeling, including model specification under various scenarios such as constant-only, generic coefficient, alternative-specific coefficient, and combinations of these. The covered topics include market segmentation, model comparison based on log likelihood ratio, self- and cross-marginal effects, elasticity, value of time, market share estimation, and joint model estimation.

Association Rules Mining

This code was written by me in R Studio to implement a machine learning technique known as 'Association Rules Mining.' Its purpose was to investigate the road crossing patterns of pedestrians at intersections in Dhaka. The findings of this analysis have been published in a paper with the following reference:

Zafri, N. M. (2023). 'Walk or run? An observational study to explore pedestrian crossing decision-making at intersections in Dhaka, Bangladesh, applying the rules mining technique.' Transportation Research Part F: Traffic Psychology and Behaviour, 94, 83-98. [DOI]


Python Fundamentals

These Jupyter Notebook files were curated by me to facilitate instruction for the undergraduate course Plan 396: Programming Techniques. Furthermore, these materials serve as a concise resource for a swift introduction to Python programming, designed for use as my lecture notes. The covered topics encompass Python fundamentals, including Python introduction, Python Essentials, NumPy, pandas, matplotlib, and seaborn.

Machine Learning Classifiers for Crash Severity Prediction

This project was developed as the final group assignment in the 'CE 397: Data Science in CAEE' course during the Fall 2023 semester. Our objective was to apply six machine learning classifiers—Logistic Regression (LR), Support Vector Machine (SVM), Decision Tree (DT), Bagging, Random Forest (RF), and XGBoost—to predict pedestrian crash severity. Additionally, we aimed to explore the relative importance of features, the non-linear relationships between features and severity, and key interaction effects. The attached code was solely written by me.

C Programming

Input-Output Analysis

This code was written for the final project in the undergraduate course Plan 396: Programming Techniques. The program, developed in the C programming language, aims to address issues related to Input-Output Analysis.

bottom of page