File:Gganimation.gif: Difference between revisions
Jump to navigation
Jump to search
(<syntaxhighlight lang='r'> library(gganimate) library(ggplot2) library(tidyverse) library(ggimage) data_link <- "https://raw.githubusercontent.com/goodekat/presentations/master/2019-isugg-gganimate-spooky/bat-data/bats-subset.csv" bats <- read.csv(data_link) %>% mutate(id = factor(id)) bat_image_link <- "https://upload.wikimedia.org/wikipedia/en/a/a9/MarioNSMBUDeluxe.png" animation <- bats %>% mutate(image = bat_image_link) %>% filter(id == 1) %>% ggplot(aes(x = longitude, y = la...) |
|||
Line 4: | Line 4: | ||
library(ggplot2) | library(ggplot2) | ||
library(tidyverse) | library(tidyverse) | ||
# sudo apt update | |||
# sudo apt-get install libmagick++-dev | |||
library(ggimage) | library(ggimage) | ||
Latest revision as of 15:20, 27 May 2024
Summary
library(gganimate) library(ggplot2) library(tidyverse) # sudo apt update # sudo apt-get install libmagick++-dev library(ggimage) data_link <- "https://raw.githubusercontent.com/goodekat/presentations/master/2019-isugg-gganimate-spooky/bat-data/bats-subset.csv" bats <- read.csv(data_link) %>% mutate(id = factor(id)) bat_image_link <- "https://upload.wikimedia.org/wikipedia/en/a/a9/MarioNSMBUDeluxe.png" animation <- bats %>% mutate(image = bat_image_link) %>% filter(id == 1) %>% ggplot(aes(x = longitude, y = latitude)) + geom_image(aes(image = image), size = 0.2) + theme_void() + transition_reveal(time) animate(animation, duration = 20) anim_save("animation.gif", animation)
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 14:12, 27 May 2024 | 480 × 480 (750 KB) | Brb (talk | contribs) | <syntaxhighlight lang='r'> library(gganimate) library(ggplot2) library(tidyverse) library(ggimage) data_link <- "https://raw.githubusercontent.com/goodekat/presentations/master/2019-isugg-gganimate-spooky/bat-data/bats-subset.csv" bats <- read.csv(data_link) %>% mutate(id = factor(id)) bat_image_link <- "https://upload.wikimedia.org/wikipedia/en/a/a9/MarioNSMBUDeluxe.png" animation <- bats %>% mutate(image = bat_image_link) %>% filter(id == 1) %>% ggplot(aes(x = longitude, y = la... |
You cannot overwrite this file.
File usage
The following page uses this file: