Background

GIS is used extensively in Consumer Analytics. From forecasting population growth in an area, to identifying possible demographic changes in a given geographic location, GIS can help uncover hidden trends in consumer behavior at a macro-level.

One of the ways in which companies identify (possible) locations for new stores to be opened is by looking at metrics such as Median income, or population density. In this very simple example, I use the state of New Jersey’s population, and the locations of all Starbucks stores in the U.S., to try and see if there is a correlation between population and the number of stores in each of New Jersey’s counties

Population data is readily available through the “tidycensus”. The Census Bureau provides individual Census Api Keys, that can be used to download shape files and population census data.

By looking at the populations of each individual counties in New Jersey, and plotting the locations of the Starbucks stores on them, one can visualize any correlation between population density, and the number of stores in that location.

The Map

## [1] 0

Conclusion:

As we can see from the map, counties with large populations also seem to have more Starbucks stores.