Eat globally, locally; how many country’s foods can be eaten in Chicagoland ?

Ah, the times we live in.
I was having discussion with friends about food and it turned to the question about how many countries are represented locally in Chicago by restaurants. There was a time in the not so distant past when such a question would be settled like many bar sports bets; stake out an early guess pulled out of thin air, tenaciously cling to it for years as information trickled in and the question was forgotten, then guess again when it was brought up again.
But no longer….I think we can come up with a reasonable estimate these days.

The first step involved was coming up with a master list of countries. I figured a reasonable place for this was the United nations website, so I grabbed a list from the website here.
I used a Python script and BeautifulSoup package to scrape the list of 194 countries.

Now came the most manual portion of the exercise. Using the above spreadsheet, my knowledge of local restaurants and Google (especially for and Yelp), I attempted to find any countries on the list which was represented by a restaurant in Chicagoland. I have no delusions that this is comprehensive; it was as good as I could do, but I’m sure I missed some restaurants along the way. So caveat emptor if you can’t find a matching restaurant listed here (and don’t forget what the emptor is paying for this info ).

In the final count, I came with 80 countries that had associated restaurants in Chicagoland.
Well, it’s nice to have a sketchy spreadsheet and an associated count, but I think seeing our global coverage might be more be more interesting. To do so, I used the GIS capabilities of R. The first step was to find a shapefile for the countries of the world.
The one found here looked like it would do the trick.

The first thing I noticed was there were more than my 194 countries from the UN on the shapefile data. A little investigation showed that these were mostly territories. I was OK excluding these from the analysis (they will get washed out as areas not having restaurants).

The following R script was used for the GIS portion of analysis


#Import restaurants

#Import shapefile of countries

# Merge restaurants and world_gis

#Now we want a new column on world_gis@data….it should indicate whether V3 has text in it (ie not NA or NONE or blank)
# NA mean territories on shapefile that are not on restaurant file
# NONE means restaurants on my file that I’m pretty sure dont exist
# Blank means I haven’t found one yet but may exist….for now, that’s the same as NONE above


# NOW plot

crit<-world_gis$restexist == 1
plot(world_gis[ crit , ], col = “blue”, add = TRUE)

This produced the following graphic; countries marked in blue are represented by a restaurant in Chicagoland.




0 comments on “Eat globally, locally; how many country’s foods can be eaten in Chicagoland ?
1 Pings/Trackbacks for "Eat globally, locally; how many country’s foods can be eaten in Chicagoland ?"
  1. […] while back, I had undertaken a little project to determine how many country’s┬árestaurants were represented in the Chicagoland area. This […]