TILT: Lab — XKCD Color Survey
1 Purpose
In this lab, you will investigate how people describe and categorize colors using data from the XKCD color survey. The final objective is to create a Shiny app that explores an aspect of the survey and communicates results interactively. Shiny apps are valuable tools for communicating findings because they let viewers explore the data, change what is displayed, and engage with the analytical or decision process rather than only receiving a static result.
Creating a good app requires a strong understanding of the data: its variables, structure, patterns, and limitations. The first part of the lab therefore guides you through the survey data, published findings, and RGB and HCL color representations. This exploration will help you identify an interesting and meaningful question for your app and make informed choices about what the app should show.
The lab emphasizes the full data-analysis workflow: understanding a data source, translating questions into reproducible code, visualizing multivariate data, interpreting what a visualization reveals, and communicating results accessibly. You will work with real survey data, where patterns may be messy and reproducing a published result may require judgment about definitions, data processing, or limitations.
2 Learning objectives
By completing this lab, you should be able to:
- Investigate published findings with data. Identify claims in the XKCD blog post, operationalize them as data-analysis questions, and use R to assess whether the data support those claims.
- Construct and interpret a color representation. Create a regular grid of RGB values, convert the values to hexadecimal color codes, and use a faceted visualization to describe the sampled RGB color space.
- Explore an alternative color model. Convert RGB colors to HCL coordinates, visualize the resulting representation, and explain how hue, chroma, and luminance relate to the appearance and distribution of colors.
- Communicate analytical results. Write clear descriptions, captions, and meaningful alternative text that help readers understand the purpose and main patterns of each figure.
- Develop an interactive data application. Build a Shiny app using the survey data that includes at least one chart and at least two input widgets that let users explore or change the displayed results.
- Create an informed, interactive Shiny application. Use the data exploration in the first part of the lab to make deliberate choices about the question, summaries, and visualizations in an app that communicates results and lets viewers interact with the analytical or decision process.
- Produce reproducible work. Organize analysis code and the Shiny application so that another person can run and inspect the work.
2.1 Success Criteria
General Criteria
Task specific Criteria
- Revisit published survey findings. For each of two findings:
A successful analysis is not simply a matching number. It makes the reasoning and any limitations clear.
- Build and visualize a sampled RGB color space
-
- Describe what the axes and facets represent.
- Include that each point represents a color and is drawn in the color it represents.
- Explain how changing the blue value changes the colors shown.
- Explore the HCL color space
-
- Describe what the axes and facets represent.
- Include that each point represents a color and is drawn in the color it represents.
- Explain how changing the facetted value changes the colors shown.
- Examine the survey responses
The answers data contain respondents’ (user_id) selections summarized using one of five color ranks. The ranks correspond to the five colors in color_ranks: purple, green, blue, pink, and brown. - [ ] Add HCL coordinates for the reported colors in answers - [ ] Visualize a sample of the responses and describe the results facetted by rank. - [ ] Merge spam_prob from users into the answers data. - [ ] Include a filter for spam_prob to investigate its effect on the visual. Describe the effect.
- Create a Shiny app — the final objective
Use what you learned in the preceding data-exploration tasks to create app.R for an interactive application centered on the XKCD survey data.
3 Submission
Submit the completed Quarto document (.qmd) and the Shiny application file (app.R). Make sure the document renders and the app runs. Include code, figures, captions, alternative text, and written interpretations for the analysis tasks.