Background
Survey data is notoriously difficult to munge. Even when the data is recorded cleanly the options for ‘write in questions’, ‘choose from multiple answers’, ‘pick all that are right’, and ‘multiple choice questions’ makes storing the data in a tidy format difficult.
In 2014, FiveThirtyEight surveyed over 1000 people to write the article titled, America’s Favorite ‘Star Wars’ Movies (And Least Favorite Characters). They have provided the data on GitHub.
For this project, your client would like to use the Star Wars survey data to figure out if they can predict an interviewing job candidate’s current income based on a few responses about Star Wars movies.
Data
Download: StarWars.csv
Information: Article
Readings
- Python for Data Science: Tidy Data
- Python for Data Science: Graphics for Communication
- Python for Data Science: Strings
Questions and Tasks
- Shorten the column names and clean them up for easier use with pandas. Provide a table or list that exemplifies how you fixed the names.
- Clean and format the data so that it can be used in a machine learning model. As you format the data, you should complete each item listed below. In your final report provide example(s) of the reformatted data with a short description of the changes made.
- Filter the dataset to respondents that have seen at least one film.
- Create a new column that converts the age ranges to a single number. Drop the age range categorical column.
- Create a new column that converts the education groupings to a single number. Drop the school categorical column
- Create a new column that converts the income ranges to a single number. Drop the income range categorical column.
- Create your target (also known as “y” or “label”) column based on the new income range column.
- One-hot encode all remaining categorical columns.
- Validate that the data provided on GitHub lines up with the article by recreating 2 of the visuals from the article.
- Build a machine learning model that predicts whether a person makes more than $50k. Describe your model and report the accuracy.
Deliverables
Use this template to submit your Client Report. The template has three sections (for additional details please see the instructional template):
- A short summary that highlights key that describes the results describing insights from metrics of the project and the tools you used (Think “elevator pitch”).
- Answers to the grand questions. Each answer should include a written description of your results, code snippets, charts, and tables.