Portfolio Project 3
Winning Jeopardy
Overview
For your third portfolio project, you’ll apply what you’ve learned about dealing with text data, iteration, and writing functions. We’ll work with Jeopardy! data which can be found at Data World.
Imagine you have been selected to compete on the game show Jeopardy! Your goal is to use your data science skills to come up with a data-driven strategy to maximize your chances of winning, and winning big money!
In this portfolio project, you will analyze the category and question variables to get a sense of the categories that are often covered in Jeopardy! and terms that frequently appear in Jeopardy! answers (which appear in the question column - see the Note in the About the show Jeopardy! section of this portfolio). Each analysis (you’ll run one each on the category variable and the question variable) should contain an appropriate visualization and a brief written interpretation/analysis (no more than a paragraph needed for each).
You will also be tasked with writing a function called subject_category_count(). This function will take in a user-specified character vector of subjects (e.g. c(“history”, “science”, “shakespeare”)) and count how many times each of those subjects appears in the category column. You can write the function to output the counts in whatever way you would like, be it a list of counts, a tibble, etc. as long as the counts are accurate. You may (but do not have to) also use this function to serve as the baseline of your analysis for the category variable.
Of course, portfolio projects are meant to be unabashedly open-ended, so you may choose to explore whatever seems interesting here beyond these baseline restrictions. Doing so will be required for an excellent score on this project.
You should write your code in Quarto, create any graphics using ggplot2, and use tools from this class for any text analysis (stringr, regex, world clouds, sentiment analysis, tf-idf, etc.), wrangling, function writing, and iteration you need for your analyses. To submit your work, push your repo to GitHub and submit the rendered pdf of your qmd file to Gradescope.
About the show Jeopardy!
Jeopardy! is a trivia game show. Three contestants compete head-to-head each game/show, and each game contains three rounds: Jeopardy!, Double Jeopardy!, and Final Jeopardy! Jeopardy! and Double Jeopardy! contain 30 questions each - five questions within six categorys. Each question is worth some value, measured in dollars. The five questions in each category in the Jeopardy! round are worth $200, $400, $600, $800, and $1,000. The five questions in each category of Double Jeopardy! are worth, unsurprisingly, double those values. The contestant who buzzes in first after a question is asked gets the opportunity to try to answer, and contestants win the value when they answer the corresponding question correctly, and lose the value when they answer incorrectly. At the end of Double Jeopardy!, their score is the sum of the values of all questions they correctly answered minus the sum of the values of all questions they incorrectly answered. The game then moves onto Final Jeopardy!, where they can wager up to their total score on a single question asked in Final Jeopardy! - they wager before they hear the question but after they are told the category that the question will be in. They each privately write their answer after hearing the question and lose their wager if they answer incorrectly and win their wager if they answer correctly. The contestant with the highest score wins (and wins the dollar amount of their score and comes back for the next game to try to win even more money!)
Note: The format of Jeopardy! is a bit weird. You may already be aware, but if not, the host actually reads out the answer and the contestant responds with the question, For example, the host would say “She is the professor for STAT 220 this term” and the contestant would say “Who is Emily?” In this dataset, question actually contains Jeopardy answers and answer contains questions. So, think more in line with the question column containing something like “Who is the professor for STAT 220 this term?” and the answer column containing something like “Emily.”
Data
The data for this portfolio can be found in the data subfolder of your personal portfolio3 repository. It is called jeopardy.csv. The dataset has the following variables:
| variable | class | description |
|---|---|---|
| show_number | numeric | the episode number |
| air_date | character | when the episode aired |
| round | character | Jeopardy round (Jeopardy! or Double Jeopardy! or Final Jeopardy!) |
| category | character | topic of question |
| value | character | point value assigned to question |
| question | character | exact question wording |
| answer | character | answer to question |
Submission
Your submission will be a .qmd file (and clean, rendered pdf) that runs your two analyses, creates your two graphs, and runs your subject_category_count() function on the character vector containing two subjects: “history” and “science.” You should also summarize your findings from these results in a couple of paragraphs at most and conclude with a very brief (a sentence even is fine) data-driven strategy to maximize your winnings. The pdf submission will likely only be 2, maybe 3, pages.
Rubric
A successful project will:
An excellent project will meet all of the requirements for a successful project, and
Can I work with someone?
This is an individual portfolio project. You may brainstorm with other people in the class, get feedback on any graphs or output, and get conceptual help with debugging or errors, but you should not be sharing code. All work that you submit should be your own. If you do use any resources, they should be properly cited in your report. (I don’t care what citation style you use, as long as it is consistent and contains (a) the title and author of the resource, (b) a link to the resource, and (c) a brief description of what you used it for).
There are lots of ways to do this project! I am looking for evidence that you can correctly implement the tools that we’ve discussed in class. If I notice code that looks very different than what we’ve used in course materials, I won’t be able to assess whether you’ve learned the tools from the class and will request a revision. I will refer extreme cases to the ASC.