This file corrects the unequal column lengths in the original example. It preserves all seven daily counts, which total 110 records. The records are generated from those counts; they are simulated examples, not real scraped Bluesky posts.

If the required packages are missing, run this once in the RStudio Console:

install.packages(c("rmarkdown", "tidyverse", "knitr"))

Create the example dataset

# Preserve the daily counts from the original script.
daily_dates <- seq.Date(
  from = as.Date("2026-10-14"),
  to = as.Date("2026-10-20"),
  by = "day"
)

daily_counts <- c(15L, 18L, 16L, 17L, 15L, 16L, 13L)

stopifnot(
  length(daily_dates) == length(daily_counts),
  all(daily_counts >= 0L)
)

dates_seq <- rep(daily_dates, times = daily_counts)

stanley_posts <- tibble(
  # Match the number of IDs to the actual number of dates.
  post_id = seq_along(dates_seq),
  date = dates_seq,
  query = "Stanley cup",
  platform = "Bluesky",
  data_type = "Simulated example"
)

stopifnot(nrow(stanley_posts) == sum(daily_counts))

total_posts <- nrow(stanley_posts)
start_date <- min(stanley_posts$date)
end_date <- max(stanley_posts$date)
calendar_days <- as.integer(end_date - start_date) + 1L
daily_average <- total_posts / calendar_days

kable(head(stanley_posts), caption = "First six simulated records")
First six simulated records
post_id date query platform data_type
1 2026-10-14 Stanley cup Bluesky Simulated example
2 2026-10-14 Stanley cup Bluesky Simulated example
3 2026-10-14 Stanley cup Bluesky Simulated example
4 2026-10-14 Stanley cup Bluesky Simulated example
5 2026-10-14 Stanley cup Bluesky Simulated example
6 2026-10-14 Stanley cup Bluesky Simulated example

Dataset overview

The dates October 14–20 cover seven calendar dates, although the difference between their date values is six days. The inclusive calendar-day count is used for the average above.

Daily volume aggregation

daily_summary <- stanley_posts %>%
  group_by(date) %>%
  summarise(
    post_count = n(),
    .groups = "drop"
  )

stopifnot(sum(daily_summary$post_count) == total_posts)

kable(
  daily_summary,
  col.names = c("Date", "Simulated Record Count"),
  caption = "Daily counts supplied in the example"
)
Daily counts supplied in the example
Date Simulated Record Count
2026-10-14 15
2026-10-15 18
2026-10-16 16
2026-10-17 17
2026-10-18 15
2026-10-19 16
2026-10-20 13

Visualization

ggplot(daily_summary, aes(x = date, y = post_count)) +
  geom_col(fill = "#2B6CB0", color = "white", width = 0.7) +
  geom_text(
    aes(label = post_count),
    vjust = -0.5,
    size = 3.5,
    fontface = "bold"
  ) +
  scale_x_date(date_labels = "%b %d", date_breaks = "1 day") +
  scale_y_continuous(
    limits = c(0, max(daily_summary$post_count) + 4)
  ) +
  labs(
    title = "Stanley Cup Drinkware: Simulated Daily Volume",
    subtitle = paste0(
      format(start_date, "%b %d, %Y"), " to ",
      format(end_date, "%b %d, %Y"),
      " (N = ", total_posts, " simulated records)"
    ),
    x = "Date",
    y = "Simulated Record Count"
  ) +
  theme_minimal(base_size = 12) +
  theme(
    plot.title = element_text(face = "bold", size = 14),
    panel.grid.minor = element_blank(),
    panel.grid.major.x = element_blank()
  )

Interpretation

The supplied example counts range from 13 to 18 records per date, averaging 15.71. These values describe the simulated example only. They do not establish real Bluesky activity, audience size, sentiment, or a trend in interest in Stanley drinkware.

For the assignment, replace the simulated records with actual collected posts. Keep full text, author handle, post timestamp, likes, reposts, replies, and collection time. Review “Stanley cup” results for hockey references before analyzing drinkware. A capped search sample cannot establish the total daily conversation rate.

Sentiment and engagement analyses require those actual post-level fields; the current generated example contains neither sentiment labels nor engagement counts.