At the end of every year, the percentage updates from @year_progress become increasingly difficult to ignore. I had wondered for a while whether engagement grew smoothly through the year or concentrated around memorable percentages.
This post preserves the original 2020 experiment. The social network API is no longer queried during rendering: the observations were recovered from the JSON embedded in the historical Highcharter widget and are now stored locally.
Code
engagement <- read_csv(
"data/year-progress-2020.csv",
show_col_types = FALSE
) |>
mutate(
created_at = as.Date(created_at),
progress_number = readr::parse_number(progress)
) |>
arrange(created_at, type)
engagement |>
slice_head(n = 8)# A tibble: 8 × 5
created_at progress type count progress_number
<date> <chr> <chr> <dbl> <dbl>
1 2020-01-04 1% Favorites 29516 1
2 2020-01-04 1% Retweets 5301 1
3 2020-01-08 2% Favorites 16492 2
4 2020-01-08 2% Retweets 2220 2
5 2020-01-12 3% Favorites 12854 3
6 2020-01-12 3% Retweets 1741 3
7 2020-01-15 4% Favorites 10678 4
8 2020-01-15 4% Retweets 1578 4
The rhythm of the year
Code
hchart(
engagement,
"line",
hcaes(created_at, count, group = type)
) |>
hc_title(text = "Engagement with @year_progress during 2020") |>
hc_yAxis(title = list(text = "Count")) |>
hc_xAxis(title = list(text = NULL)) |>
hc_tooltip(
shared = TRUE,
useHTML = TRUE,
backgroundColor = "rgb(244, 246, 248)",
borderWidth = 0,
headerFormat = "<b>{point.key}</b><br>Progress: {point.progress}<br>"
) |>
hc_credits(enabled = FALSE)The peaks are not random. Round milestones such as 10%, 25%, 50% and 75% are easy to recognize and share. A few less conventional numbers also stand out, which is precisely what makes the pattern more interesting than a simple rise toward New Year’s Eve.
Highlighting the favorites
The original post annotated the five updates with the largest favorite count. The labels preserved the account’s tiny text visualization: 15 filled or empty blocks followed by the percentage. The final 0% belongs to January 1, 2021, when the progress bar resets for the new year.
Code
favorite_points <- engagement |>
filter(type == "Favorites") |>
slice_max(count, n = 5, with_ties = FALSE) |>
mutate(
filled_blocks = round(15 * progress_number / 100),
annotation_text = paste0(
strrep("▓", filled_blocks),
strrep("░", 15 - filled_blocks),
" ",
progress
)
)
top_annotations <- favorite_points |>
transmute(
x = highcharter::datetime_to_timestamp(created_at),
y = count,
text = annotation_text,
point = purrr::map2(
x,
y,
~ list(x = .x, y = .y, xAxis = 0, yAxis = 0)
)
) |>
select(text, point) |>
highcharter::list_parse()Code
hchart(
engagement,
"line",
hcaes(created_at, count, group = type)
) |>
hc_title(text = "Favorite and retweet counts from @year_progress in 2020") |>
hc_tooltip(
shared = TRUE,
useHTML = TRUE,
backgroundColor = "rgb(244, 246, 248)",
borderWidth = 0,
headerFormat = "<b>{point.key}</b><br>Progress: {point.progress}<br>"
) |>
hc_annotations(list(
labelOptions = list(
shape = "connector",
align = "right",
justify = FALSE,
crop = TRUE,
style = list(fontSize = "0.8em", textOutline = "1px white")
),
labels = top_annotations
)) |>
hc_yAxis(title = list(text = "Count")) |>
hc_xAxis(
title = list(text = NULL),
type = "datetime",
dateTimeLabelFormats = list(month = "%B")
) |>
hc_credits(enabled = FALSE)The result was mostly expected: people respond to landmarks. But the unusually popular intermediate percentages are a useful reminder that attention follows culture and jokes as much as it follows a calendar.
Recovery note
The CSV is a fixed historical snapshot recovered from the published chart. No account credentials, API calls or live social-media data are required to render this article.