Valentine’s Day Spending
1 Setting up R Packages
1.1 Plot Fonts and Theme
Use _setup.qmd to set these up.
2 Introduction
This dataset pertains to spending on gifts by various people for Valentine’s Day. This was part of the TidyTuesday Project for February 2024!
3 Read the Data
Rows: 6
Columns: 9
$ Age <chr> "18-24", "25-34", "35-44", "45-54", "55-64", "65+"
$ SpendingCelebrating <dbl> 51, 40, 31, 19, 18, 13
$ Candy <dbl> 70, 62, 58, 60, 50, 42
$ Flowers <dbl> 50, 44, 41, 37, 32, 25
$ Jewelry <dbl> 33, 34, 29, 20, 13, 8
$ GreetingCards <dbl> 33, 33, 42, 42, 43, 44
$ EveningOut <dbl> 41, 37, 30, 31, 29, 24
$ Clothing <dbl> 33, 27, 26, 20, 19, 12
$ GiftCards <dbl> 23, 19, 22, 23, 20, 20
4 Data Dictionary
NoteQuantitative Variables
Write in.
NoteQualitative Variables
Write in.
NoteObservations
Write in.
5 Analyse/Transform the Data
```{r}
#| label: data-preprocessing
#
# Write in your code here
# to prepare this data as shown below
# to generate the plot that follows
# Change data to factors etc.
# Set up Counts, histograms etc
```6 Research Question
Note
Write in!! Look at the Chart!
7 Plot the Data
8 Task and Discussion
- Complete the Data Dictionary.
- Select and Transform the variables as shown.
- Create the graphs shown and discuss the following questions:
- Identify the type of charts
- Identify the variables used for various geometrical aspects (x, y, fill…). Name the variables appropriately.
- What research activity might have been carried out to obtain the data graphed here? Provide some details.
- What pre-processing of the data was required to create the chart?
- What might be the Hypothesis / Research Question, based on the Chart?
- Write a 2-line story based on the chart, describing your inference/surprise.
9 References
To obtain that cool-looking X-axis in the chart, you need to use a new package called ggprism. Look at the vignette there and copy the code to make the X-axis like what you see here.

