Chapter 4. Where Is It All Happening? Location, Location, Location

From foreign policy to politics to real estate and retailing, many would agree with Napoleon's sentiment that “geography is destiny.” Where customers reside and the attributes of that area are among customers' most informative characteristics: East coast, west coast, or in‐between? Red state or blue state? Urban, rural, or suburban? Sun belt or snow belt? Good school district or retirement community? Geography is important.

Incorporating this rich source of information into data analysis poses some challenges. One is geocoding, the process of identifying where addresses are physically located, based on information in databases. Location information typically includes latitude and longitude, as well as the identification of multiple geographic areas, such as zip code, county, and state. This information makes it possible to determine who are neighbors and who are not.

Another challenge is incorporating the wealth of information about geographic areas. In the United States, the Census Bureau provides demographic and economic information about various levels of geography. The Bureau divides the country into very specific geographic pieces, such as census tracts and block groups and zip code tabulation areas (ZCTAs, which are like zip codes). The Bureau then summarizes information for these areas, information such as the number of households, the median household income, and the percent of housing units that use ...

Get Data Analysis Using SQL and Excel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.