Python Project: Looking at the US Census Data
By: Uyen Nghb
Tags: Jupyter Notebook, Data Science, Data Analysis, Big Data, Python

Table of Contents

About the topic About the Data Retrieve, clean, and manipulate data Planning and identify possible analyses (skip here for graphs & analysis) Findings & Reasoning Recommendations

1. About the topic

According to the Pew Research Center, young adults today are much better educated than their parents and grandparents, as measured by the level of bachelor’s degree attainment. Millennials, now aged 25 to 37, have a 39% of earning a bachelor’s degree or higher. This number among GenX’ers, Boomers, and the Silent/Traditional generations are roughly 29% for the former two and 15% for the latter.

Intrigued by this dynamic, I wanted to further investigate the preferences to degree type attainment across these age groups.

2. About the Data

Dataset: ‘Field of Bachelor’s Degree for First Major’ (S1502)

Tool: Python

The dataset ‘Field of Bachelor’s Degree for First Major’ (code name S1502) from the U.S. Census Bureau captures the count and percentages of college degree attainment by the first major across three different age groups of adults over 25 years old across 52 states of the United States in 2018. The data is collected by the American Community Survey (ACS) and in tandem with the Census Bureau’s Population Estimates Programs to produce the final and official estimates for the national and local population and housing units.

Regarding data accuracy, the data on the geographical division of states and counties are from 2010, so the data might not reflect as accurately the current population and housing units of states. It is also a self-reported survey in which respondents can report more than one major for their bachelor’s degree without specifying the degree earned. Thus, comparisons between states might be different with a more updated dataset, and reported degree types should be regarded as a preference rather than degree obtained.

The data contains 1-year estimates so I aim to perform basic aggregate functions to get an overview of the data. Time-series or causal inference analyses are not suitable for this dataset.

‘Field of Bachelor’s Degree for First Major’ is a MultiIndex (although data was transformed to one-dimensional after download), in which there are two main dimensions: degree type and age group. There are 5-degree types identified, including:

Science and Engineering

Science and Engineering Related Fields

Business

Education

Arts, Humanities and Others

There are three age groups, namely:

25 to 39

40 to 64

65 and over

I regarded these groups as Millennials, GenX and Boomers, and Seniors, respectively.

The data also identifies male and female populations, which are reported values for each index.

3. Retrieve, clean, and manipulate data

Link to GitHub:

https://github.com/nhb-uyen/US_Census_with_Python/blob/master/New%20Steam%20Project.ipynb

Data retrieval: download from the website as csv.

Clean: filter out N/A, rename columns, group columns.

Manipulate data: aggregate functions, create pivot tables, create plots.

4. Planning and identify possible analyses

Steps:

Identify possible ways to look at the data. Identify trends (highest, lowest, changes across groups). Identify possible explanations for the data trends. Arrive at a conclusion on each trend. Identify the next steps to further data findings.

Possible analyses:

Bachelor’s degree attainment by age groups.

Does a larger proportion of the younger age group attain higher education compared to the older age group? (Gen X vs. Millennials?)

Bachelor’s degree attainment by age groups across states.

Is there a difference across states on the percentage of the population with a bachelor’s degree?

Are there more preferred degrees in some states?

Bachelor’s degree attainment by sex across various degrees.

Does degree type preference differ among males and females in the U.S. in general?

Bachelor’s degree type preference by sex across states.

Does degree type preference differ among males and females of different states?

5. Findings & Reasoning

By geography

California has the highest rate of higher education attainment overall, followed by Texas, New York, Florida, and Illinois.

The spikes can be explained by the fact that these are the most populous states in the U.S., having established a strong technological and industrial establishment that appeals to all generations. A further investigation of the data shows that the top three states for millennials (age 25 to 39), gen-X’ers and boomers (age 40 to 64) are California, Texas, and New York. For the Silent Generations (age 65 and over), it is California, Florida, and Texas — Florida being the popular destination for retired home-owners.

The concentration of college degree owners in several states indicates a higher populace within these states, but might also indicate migration trends. More accurately, as the ACS data is consolidated with the geographical and population census from the Census Bureau’s Population Estimates Program, we are looking at where college degree owners choose to live after college. Texas, New York, Florida, and Illinois are all highly industrialized states with an advanced and booming technological industry. Thus, it is no surprise that young adults from generations before until now still choose to relocate to these cities.