Last week, the U.S. Census Bureau released the American Community Survey, a five-year study in which people were asked where they had lived in the previous year. The data, collected between 2007 and 2011, shows us just how many people came into San Francisco from other California counties, and how many left to settle elsewhere in the state. On the whole, the recession and housing boom of 2008 didn't prevent people from joining the expensive apartment rental market in the United States.

The study revealed that 59,018 people migrated to San Francisco from other California counties, with the largest portion -- nearly 10% -- coming from San Mateo, south of the city. The graph below breaks down the exact number of migrants from each county (hover over each to show total number of people):

In the same time frame, 43,864 people left San Francisco for other California counties:

San Mateoans make up more than 25% of the city’s outflow. This exodus might be explained, in part, by a tech sector that retained a higher degree of stability than other markets between 2007 and 2011. Today, the Bay Area creates nearly a third of all jobs in California; San Mateo County produces the most jobs in the Bay Area.

This data also validates that San Francisco residents are flocking to Alameda County (which includes Oakland and Berkeley) at a greater rate than they are coming in, thanks to a thriving East Bay job market. For many, it's also an issue of affordability: average rent prices on the other side on the Bay Bridge are nearly half of those in San Francisco.

Over the data's five year period, San Francisco had a net gain of 15,154 people. The California Department of Finance reports that from 2000 to 2010, San Francisco's population gained 28,500 people (including those from other states and countries); in the three years since, it's risen by an additional 20,600. The city’s population is now 825,863, and it is the second densest metropolis in the U.S., trailing only New York City.

The Association of Bay Area Governments estimates that San Francisco’s population will balloon to 1 million by 2032. By the same year, the association projects the Bay Area will see an increase from 7.2 million to 9.3 million people. With this in mind, what the Census Bureau's data tells us is important. A visualization of the Bay Area's migration trends will give urban planners a head start in accommodating impending population swells from inter-state counties.

This post was written by Zachary Crockett. Follow him on Twitter here, or Google Plus here.