Project 5: The war with Star Wars (4 days)

Background

Survey data is notoriously difficult to handle. 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 - <https://github.com/fivethirtyeight/data/tree/master/star-wars-survey>.

A company would like to use this 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:

Grand Questions:

  1. Shorten the column names and clean them up for easier use with pandas.

  2. Filter the dataset to those that have seen at least one film.

  3. Please validate that the data provided on GitHub lines up with the article by recreating 2 of their visuals and calculating 2 summaries that they report in the article.

  4. Clean and format the data so that it can be used in a machine learning model. Please achieve the following requests and provide examples of the table with a short description the changes made in your report.

    1. Create an additional column that converts the age ranges to a number and drop the age range categorical column.
    2. Create an additional column that converts the school groupings to a number and drop the school categorical column.
    3. Create an additional column that converts the income ranges to a number and drop the income range categorical column.
    4. Create your target (also known as label) column based on the new income range column.
    5. One-hot encode all remaining categorical columns.
  5. Build a machine learning model that predicts whether a person makes more than $50k.

Deliverables:

Use this template to submit your Client Report. The template has three sections (for additional details please see the instructional template):

  1. A 30 second elevator pitch as if you were in a job interview that describes the tools you used in this project.
  2. An “elevator pitch” that summarizes the entire case study.
  3. Answers to the grand questions that include text, pictures, and tables.
  4. An appendix that provides your commented code and justification for any programming that required you to choose an option.