Skip to content

Refine COVID-19 animation easing and trailing behavior#1

Open
jochotecoa wants to merge 1 commit into
refactor/reorg-2026from
codex/improve-animation-of-covid-19-data
Open

Refine COVID-19 animation easing and trailing behavior#1
jochotecoa wants to merge 1 commit into
refactor/reorg-2026from
codex/improve-animation-of-covid-19-data

Conversation

@jochotecoa
Copy link
Copy Markdown
Owner

Motivation

  • Improve the visual pacing of the COVID-19 top-10 cases bar chart to reduce abrupt jumps between frames.
  • Provide a lighter trailing context so viewers can perceive recent motion without cluttering the plot.
  • Use gentler easing to make rank changes feel more natural.

Description

  • Adjusted transition_states(year_week, transition_length = 4, state_length = 2, wrap = FALSE) to rebalance transition and hold timing.
  • Replaced enter_fade()/exit_fade() with enter_grow() and exit_shrink() to give items a more physical appearance when entering and leaving.
  • Swapped shadow_mark() for shadow_trail(max_frames = 12, alpha = 0.15, size = 0.3) to render a soft trailing path, and changed easing to ease_aes("sine-in-out") for smoother motion.
  • Kept existing animate() render calls and output targets unchanged.

Testing

  • Ran Rscript -e "library(gganimate); library(ggplot2)" to verify required R packages, which failed because Rscript is not available in the environment.
  • No animation rendering tests were executed due to the missing R runtime, so visual verification remains pending.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant