
"How many coffee shops in Boston?"
Hmmm...well, suppose there are 1 million people in Boston. Then... NOPE. Stop it. This series is nothing about strategy for any brain teaser. This is an analysis about two major coffeehouse chains, Starbucks vs Dunkin' Donuts, "corporate + license" vs pure franchise, in Boston area. I will walk you through their distribution and strategies of choosing a location (if consistent). This series is roughly separated by following parts.
- Part 0: Get the data prepared!
- Part 1: A glance at locations
- Part 2: Who are Dunkin's and Starbucks' favorite neighbors? - Empirical Bayes Analysis
- Part 3: What can we expect around a coffeehouse? - Network Visualization
- Summary
Summary
In this post, I will walk you through the project. Please feel free to check any part that you are interested in. Enjoy!
Get the data prepared!
For this project, you will need these data sets:
- Zip code and name of each region in Boston and its neighborhood from Mass.gov.
- Latitude and longitude of all Starbucks' and Dunkin's store from their websites. (Starbucks and Dunkin')
- Latitude and longitude of all merchants near each store from Google Place API.
A glance at locations
The competition of Starbucks and Dunkin' in Boston is intense! The number of Dunkin's coffeehouses is almost double Starbucks'. While Starbucks consistently run stores in major commercial area, Dunkin' outperforms by the number of stores by the strategy of serving a more general customer base, especially in residential area.

Red for Dunkin'/ Green for Starbucks
The market is almost saturated, though there is still some space for new stores. For Starbucks, Charlestown region might be good as well. It is one of fast developing places in Boston. Besides, Medical schools and luxury condos will bring Starbucks customers with needs and consuming capacity.

Next store?
Who are Dunkin's and Starbucks' favorite neighbors?
Cheap restaurant and ATM are the most common merchants/facilities in a coffeehouse's neighborhood for either Starbucks or Dunkin'.
In comparison, Dunkin' has a much stronger preference for transit station, car repair store, gas station and church than Starbucks. Besides, Dunkin' is more likely to be in the area with laundry store, liquor store, park and school. In contrast, Starbucks has a relatively stronger preference with bank, beauty salon and gym than Dunkin'.
What can we expect around a coffeehouse?

Yellow
This community is featured by the highest concentration of transit station, cheap restaurants, school, car repair stores, and home goods stores. This is one of the typical residential areas in Boston.
Green
This community is featured by the highest concentration of hospital, physiotherapy clinic, and university. Besides, it also has a relatively high concentration of dental clinic, transit station, and cheap restaurant. It might be because of major areas for university and medical schools within Boston area.
Blue
This community is featured by the highest concentration of government office, cafe, atm, accounting firm, bank, and beauty salons. However, it has an obviously low concentration of car repair stores, transit station, and cheap restaurant. It is the major commercial area within Boston.
Purple
This community is featured by the highest concentration of dental clinics. And, it also has a high concentration of transit station, school and cheap restaurant. Except Airport, most locations cover typical residential area and this community is quite similar to the community Yellow. However, it has a higher concentration of government office and beauty salon shop but much lower concentration of car repair store. Community Purple covers most commercial streets within residential area. It could be regarded as second-tier of commercial area. And it is reasonable to group Airport into this commercial-ish area since its lack of business service institutions.
Nearly half of Starbucks' stores are in community Blue, which is the major commercial area. This number is twice of the total number of stores within community Yellow and Purple. In the meantime, Dunkin' has a slightly higher number of stores in community Yellow and Purple than in community Blue. Besides, there is no big difference between Starbucks and Dunkin' within community Green.
Conclusion
This series was motivated at the time I noticed some coffeehouses from the same company right across each other. I was interested in their strategies of picking up locations for business. Besides these findings, I am glad that I gained knowledge of basic graph analysis and predictive posterior probability during this period.
Some limitations.
- I set the radius of a neighborhood as the 10-min walking distance. Some query results reached the maximum of the service from Google Place API.
- It was hard to validate the accuracy of classification for merchant type, though I did manually checked a random set of results.
I sincerely hope I can improve the analysis process. If you have any thought, please feel free to leave any message. Thank you!
What's next?
There would be another series of posts for my favorite character Phoebe from TV show, FRIENDS. You would know who her social relationship, her personality and the way she talked by statistics. Excited? Not? We will see.