-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Animate terra - maps #490
Comments
Hi |
Hi
That did the trick! Many thanks.
Best
Beat
Beat Moser
Bergstrasse 9
8322 Madetswil
FON +41 79 257 96 00
Von: ptr-64 ***@***.***>
Gesendet: Montag, 22. Januar 2024 20:01
An: thomasp85/gganimate ***@***.***>
Cc: Beat Moser ***@***.***>; Author ***@***.***>
Betreff: Re: [thomasp85/gganimate] Animate terra - maps (Issue #490)
Hi
This is a known issue<#479>. For now try to downgrade transformr to 0.1.3. This can be done by devtools::install_version("transformr", version = "0.1.3") in a fresh session.
—
Reply to this email directly, view it on GitHub<#490 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A4323VIO4IFIXS37T434U7LYP2ZO5AVCNFSM6AAAAAA74GSWGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUGYZDCNZWGA>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
If your issue got solved you might consider closing it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
I try to animate a map. I have one single spatvector. I can plot multiple maps with facet_wrap (vars(Jahr)) but gganimate throws an error when I try to add transition_time(Jahr): Fehler: arguments have different crs
Then I noticed that this error is thrown by all attempts to gganimate a map using ready made code I downloaded, like
library(tidyverse)
library(rnaturalearth)
library(rnaturalearthdata)
library(gganimate) # also needs transformr
set.seed(1234)
ww <- ne_countries(scale = "medium", returnclass = "sf")
ll <- ww$name %>% length
val <- sample(c("a","b","c","d"), ll, replace=T)
bb <- ne_download(type = "wgs84_bounding_box", category = "physical",
returnclass = "sf")
ww <- ww %>% mutate(value=val)
newdf <- lapply(seq_len(5), function(i) {
new <- ww
new$group <- seq_len(nrow(new))
new$value <- sample(letters[1:4], nrow(new), replace = TRUE)
new$time <- i
new
})
newdf <- do.call(rbind, newdf)
gpl1 <- ggplot(data = newdf) +
geom_sf(aes(fill=value, group = group), col = "black", lwd = 0.3 )+
xlab(NULL) + ylab(NULL) +
ggtitle("World Export of Merchandise", subtitle = "{frame_time}")+
geom_sf(data = bb, col = "grey", fill = "transparent") +
theme(plot.background = element_rect(fill = "white"),
panel.background = element_rect(fill = 'white'),
panel.grid.major = element_line(colour = "grey"),
legend.position="top",
plot.title = element_text(lineheight=.8, size=24, face="bold",
vjust=1),
legend.text = element_text(vjust=.4,lineheight=1,size = 14),
legend.title = element_text(vjust=1,lineheight=1, size=14,
face="bold" )) +
transition_time(time)
ani <- animate(gpl1)
What could be the problem, given R and all packages are up-to-date? Also the Error does not make sense to me. How can I have multiple crs in one spatVector?
The text was updated successfully, but these errors were encountered: