1. Learn
  2. /
  3. Courses
  4. /
  5. Analyzing Survey Data in Python

Connected

Exercise

Cluster sampling analysis

You and a group of psychologists are interested in analyzing employee mental health. Your research includes a survey that aims to measure attitudes towards mental health in the tech workplace, and examine the frequency of mental health conditions among tech workers.

The dataset, mh_survey, includes the gender of the respondent, the US state they live in,US_state_live, and whether they have sought treatment for their mental health through their employer, sought_treatment.

You will create a pie chart to analyze the likelihood of a tech worker seeking treatment regarding their mental health in the US, sought_treatment. A random list of 10 state clusters, random_cluster, has bee uploaded for you.

Pandas and numpy as been uploaded as pd and np.

Instructions

100 XP
  • Subset dataset to include only states in random_clusters.
  • Create a pie chart of the sought_treatment column.