Sample Code

Python Sample Code

scraping rental listings' data - this code scrapes all the listings for a given city. The output is a database where each observation has rent, number of bedrooms, location, GPS coordinates, and distance from the city center. It also produces a heat map of the rents around the city.

k-nearest neighbors movie recommender system - this code produces movie recommendations to a user, using the k most similar users' movies' preferences. Basically, the program finds the k most similar users to the user we are recommending movies to and finds the most highly-rated movies by the aforementioned k most similar users. Moreover, these are movies the user we are recommending movies to has not seen yet! In comparing tastes, there is a complexity that has to do with distance in ratings vs. number of overlapping movies. I look both at the similarity in ratings and the number of movies both users saw. If you want to know more click on the link where you can get further explanations.

Fortran Sample Code

Solution to the unconstrained monopolist problem in my paper "More is Less: Misallocating Residential Land"

Solution to the savings and housing price functions in the imperfect information economy in my paper "Wage Income Expectations and Housing Price Bubbles"

STATA Sample Code

Analyzing SCF data - this code calculates various statistics on wealth inequality in the U.S.