Project 5: The war with Star Wars

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

Questions and Tasks

  1. 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.
  2. 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.
    1. Filter the dataset to respondents that have seen at least one film.
    2. Create a new column that converts the age ranges to a single number. Drop the age range categorical column.
    3. Create a new column that converts the education groupings to a single number. Drop the school categorical column
    4. Create a new column that converts the income ranges to a single number. Drop the income range categorical column.
    5. Create your target (also known as “y” or “label”) column based on the new income range column.
    6. One-hot encode all remaining categorical columns.
  3. Validate that the data provided on GitHub lines up with the article by recreating 2 of the visuals from the article.
  4. 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):

  1. 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”).
  2. Answers to the grand questions. Each answer should include a written description of your results, code snippets, charts, and tables.