making maps in R

This map plots grocery stores with at least 30 employees, as of 2008. The map begins with a black and white Google terrain map and plots locations by latitude and longitude coordinates. I am working on getting more current data, but I can say that the food deserts haven’t changed much.


Here’s the code I used. This requires the ggmap library.

qmap(“philadelphia”, zoom = 12, maptype=”terrain”, color=”bw”) +
geom_point(data=grocer, aes(x=long, y=latitude), colour=”blue”, alpha=.9,
size=4) +
labs(x=””, y=””, title=”Large Grocery Stores in 2008″) +
theme(plot.title = element_text(size=rel(1.8), face=”bold”, vjust=1.5,
family=”Times”), axis.ticks=element_blank(), axis.text.x=element_blank(),

An economist speaks: the Pope is “spreading evil”

Pope Francis is in the midst of his first US visit. He’s already made some speeches and of course, some folks are unhappy with what he’s said. But I must say that I am surprised (though I shouldn’t be) that economists are taking him to task, particularly about his comments on the economy, regulation, and climate change. Most economists support cap and trade, while the Pope does not. Fair enough. Does that make him a socialist? At least one economist says yes. Oh, what would Adam Smith do?

Fear not, there will always be conservative economists to hold the invisible hand’s (invisible?) torch. Antony Davies (Duquesne) lambasts the Pope for his lack of economic training, because without that he apparently has no right to comment on the economy. According to Davies (from his own bully-pulpit), the Pope is a “typical politician” “spreading evil.” And then Davies blathers on and on about free-market capitalism, as measured by the Economic Freedom index. (He’s got a book he wants you to buy, which may be the primary motive behind his diatribe.)

Economic Freedom does have a significant relationship with GDP, as seen in this chart comparing OECD countries. So yes, higher per-capita GDP is a good thing, particularly if it comes with overall high well-being. (It’s worth noting that the countries with higher levels of freedom than us also have lower GDP, by the way.)

Does higher GDP make people happier? Yes, for the most part, but the story isn’t simple. Though we Americans enjoy really high per capita GDP relative to the rest of the world, we are not the happiest country. We know that the Scandinavians have cornered the happiness market, but folks in Venezuela, Costa Rica, Italy, and Saudi Arabia are about as happy as we are. Maybe an über-free market isn’t a silver bullet.

“The relationships between market freedoms and well-being are complex and not entirely understood, but the directional evidence is overwhelming. Any public figure — be he performer, politician, or pope — would do well to be aware of this evidence.” (Davies) Yes, the directional evidenceis clear. The correlation is positive. And that’s the level of nuance we’d expect from a student in an Econ101 class. What about the fact that this relationship is not linear? Life satisfaction increases with GDP at a decreasing rate. Even if we became “more free” economically, the true gains could be miniscule.

During his speech to Congress, Pope Francis said, “The right use of natural resources, the proper application of technology and the harnessing of the spirit of enterprise are essential elements of an economy which seeks to be modern, inclusive and sustainable.” On its face, that is not socialist rhetoric. And hey, I like the idea of a modern, inclusive, and sustainable economy. (I also like the Oxford comma.)

I can’t help but object to Davies’ condescending tone. I don’t think the Pope is above scrutiny (and I’m devoutly non-Catholic), but sheesh, his speech is not a doctoral thesis defense. A fortiori, if only economists may comment on the economy, and the majority of economists are politically conservative, how do we ensure a balanced perspective?

Philly: urban developments


Philadelphia is in a construction boom, but many long-time residents worry about the negative effects of all this development. In gentrifying neighborhoods property assessments have increased exponentially, yielding property tax bills that fixed-income earners find difficult to pay.

I’m starting to work with real estate data to explore gentrification patterns in the city. Point Breeze is an up-and-coming neighborhood (at least in its north end), with all sorts of new buildings going up. But has that development ‘rubbed off’ on the rest of the neighborhood? With this snapshot, that doesn’t seem to be the case. Controlling for home size, price increases are almost entirely tied to condos, not single-family units. On the one hand, this suggests that long-time residents should not be facing steeply rising property taxes. But on the other, the financial benefits from these developments (through higher sales prices) appear to accrue to developers, not to home-owners.