Get startedGet started for free

Calculating Unemployment

In this exercise, you will plot metropolitan unemployment against segregation. Unemployment is calculated as a proportion of the labor force (people employed or seeking employment). msa_black_emp is loaded with counts of Black male and female unemployment and labor force participation taken from subject table C23002B in the 2012 5-year ACS. You will calculate unemployment percentages and join with the previously calculated Index of Dissimilarity, loaded in the DataFrame msa.

pandas and seaborn have been loaded using the usual aliases.

This exercise is part of the course

Analyzing US Census Data in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# View the first few rows of msa_black_emp
print(msa_black_emp.head())

# Calculate percentage unemployment for male, female, and all
msa_black_emp["pct_male_unemp"] = ____
msa_black_emp["pct_female_unemp"] = ____
msa_black_emp["pct_unemp"] = ____
Edit and Run Code