Get startedGet started for free

Census Geographies

1. Census Geography

Census data are available for many different geographic levels, from the nation down to the Census block. In this lesson we will learn about these geographies.

2. Request All Geographies

So far we have been requesting all US states at once. What if we only want the data for one state, say, Pennsylvania?

3. Request Specific Geographies

In that case, replace the star wild card with the state code, 42. This is the geographic identifier, or GEOID, for Pennsylvania. Where can we find these identifiers?

4. Missouri Census Data Center

Although there are many sources online, in this lesson you will use the Geographic Codes Lookup website maintained by the Missouri Census Data Center.

5. Geographic Entities

The bureau reports summary statistics for both legal and statistical geographies. Legal/administrative geographies are those that exist as legally defined entities, such as states or counties. Statistical geographies, which include Census tracts, are created by the Census Bureau for purposes of statistical reporting. ZIP Code Tabulation Area, or "ZCTA" is a statistical equivalent to the postal ZIP Code.

6. Census Geographic Hierarchy

These geographies exist in a hierarchy, with larger units built from smaller units. Census blocks are the smallest reporting unit, and the building block for all other geographies. In this image, the connecting lines indicate nesting, so blocks nest in block groups, which nest in Census tracts, which nest in counties. But school districts, shown in green in the middle left of the chart, can cross county lines, so only blocks nest in school districts.

7. The "in" Predicate

We can use this information to specify a containing geography using the optional "in" predicate. Here, we request all counties in two states: New Hampshire and Vermont. You cannot use a wildcard with the "in" predicate. You can also request *specific* counties in *one* state. If you specify GEOIDs in the "for" predicate, you *cannot* use the "in" predicate to request more than one containing geography. After the "in" predicate has been assigned, use requests.get to return a response object, the same as before.

8. Places

"Place" is a special geography that combines legal and statistical areas. It includes Incorporated Places, legally existing municipal governments; and Census Designated Places. These are defined in cooperation with local officials to provide data for areas that have a commonly used name but are not legally incorporated. CDPs can be quite large. For example, the City of Los Angeles is an incorporated place. East Los Angeles is a Census Designated Place in Los Angeles County. Both are included if you request data for places in California.

9. Available Geographies (Partial List)

This is a partial list of geographies available via API for 2010 Census. The API does not expose all geographies that the Census Bureau reports on, and the geographies differ by data product. You can view the list for any data product by appending "geography.html" to the API base URL. An example for the 2010 Decennial Census is shown here. You will get familiar with these and other geographies throughout this course.

10. Part Geographies

What about requesting data for geographies that don't nest cleanly, for example, the state>congressional district>county hierarchy? First, the "for" predicate must be set to "county (or part)", not just "county". You must specify GEOIDs for each level up the hierarchy. "state:42;congressional district:02" requests counties *in* the Second Congressional District *in* the state of Pennsylvania. The result shows the two counties in the Second District, but the names indicate that they are part-counties. Demographic data is reported only for the parts of these counties that fall in the Second District.

11. Let's practice!

You've learned about some important geographies for reporting Census data. Let's get some hands-on experience.