Articles by Benevolent Planner

Modeling Contagion Using Airline Networks in R

May 30, 2015 | Benevolent Planner

I first became interested in networks when reading Matthew O’Jackson’s 2010 paper describing networks in economics. At some point during the 2014 ebola outbreak, I became interested in how the disease could actually come to the U.S. I was caught up with work/classes at the time, but decided ...
[Read more...]

Econometrics Sim – 1: Endogeneity

March 9, 2015 | Benevolent Planner

Introduction This is the first post in a series devoted to explaining basic econometric concepts using R simulations. The topic in this post is endogeneity, which can severely bias regression estimates. I will specifically simulate endogeneity caused by an omitted variable. In future posts in this series, I’ll simulate ...
[Read more...]

Motor Vehicle Collision Density in NYC

March 6, 2015 | Benevolent Planner

In a previous post, I visualized crime density in Boston using R’s ggmap package. In this post, I use ggmap to visualize vehicle accidents in New York City. R code and data are included in this post. The data comes from NYC Open Data. My data cut ranges from 2012 ...
[Read more...]

Visualizing Hubway Trips in Boston

February 21, 2015 | Benevolent Planner

Most Popular Hubway Stations (in order): Post Office Sq. – located in the heart of the financial district. Charles St. & Cambridge – the first Hubway stop after crossing from Cambridge over Longfellow Bridge. Tremont St & West – East side of the Boston Common South Station Cross St. & Hannover – entrance to North End combing ... [Read more...]

Drug Crime Density in Boston

January 15, 2015 | Benevolent Planner

The original map can be found in my previous post, Spatial Data Visualization with R. As a review, I use get_map function in the ggmap package to grab a map of Boston from Google Maps. The “crime report” data can be found at In the ...
[Read more...]

Interactive Cobb-Douglas Web App with R

November 4, 2014 | Benevolent Planner

I used Shiny to make an interactive cobb-douglass production surface in R. It reacts to user’s share of labor and capital inputs and allows the user to rotate the surface. The contour plot (isoquants) is also dynamic. Shiny works using two R codes stored in the same folder. One ...
[Read more...]

Iterative OLS Regression Using Gauss-Seidel

October 24, 2014 | Benevolent Planner

I just finished covering a few numerical techniques for solving systems of equations, which can be applied to find best-fit lines through a give set of data points. The four points  are arranged into an inconsistent system of four equations and two unknowns: The system can be represented in matrix ...
[Read more...]

Spatial Data Visualization with R

August 31, 2014 | Benevolent Planner

I’ve been fooling around with spatial data lately. As it turns out, there are some great R packages for visualizing this kind of data. Below is a set of charts I put together. It’s a good sample of the possibilities. keeps a dataset with characteristics of ...
[Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)