IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Analyzing US Census Data in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# 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"] = ____
Modifica ed esegui il codice