These are projects posted by the students of Dr. Gove Allen at Brigham Young University. These students have taken one semester-long course on VBA and generally have had no prior programming experience

Tuesday, April 13, 2010

Crime in Cities data compilation


Every year, economics students in various classes encounter the same problem. Where can they find data for my semester paper? I had a similar problem in my Urban Economics class, I could not a easily find an accessible source of data for my research project.

Data Needed

My research was on crime in cities, identifying factors such as familial make-up, religious affiliation, and ethnicity, and how they were correlated to crime in large metropolitan areas. However, there was no data set with all these different types of variables for the same year or same cities. I did find a website,, that provided many of these variables for each city. However, it was provided as text on a webpage, not in a format that could be exported into Stata.


I created a program that scrubbed this website for a certain amount of cities, and the variables I was interested in, and created a table with each city and its attributes. This dataset was then imported to Stata 11 where I could make regressions and draw conclusions regarding the correlation between a variable (i.e. income per capita in a city) and the crime rate in that city. This project creates an inmense amount of value for any urban economist or sociologist that is trying to study different factors across cities, factors that are not available in the Metropolitan Statistical Area (MSA) Data Book. This program will allow researchers to create creative datasets that do not normally have a logical association, but could prove to have explanatory power for other aspects of society.

Document PDF

Excel File

No comments:

Post a Comment

Blog Archive