Skip to content

Instantly share code, notes, and snippets.

@djnavarro
Created August 27, 2019 09:56
Show Gist options
  • Save djnavarro/c7ff29834c47724c1fc2bd2a932f1a9e to your computer and use it in GitHub Desktop.
Save djnavarro/c7ff29834c47724c1fc2bd2a932f1a9e to your computer and use it in GitHub Desktop.
library(ggplot2)
ozmap <- function(proj4string) {
dat <- sf::st_transform(ozmaps::abs_ced, proj4string)
ggplot(dat) +
geom_sf() +
coord_sf() +
theme_void()
}
animation::saveGIF({
for(lon in 0:100) {
cat(".")
str <- paste0("+proj=aeqd +datum=WGS84 +lat_0=0 +lon_0=", lon)
p <- ozmap(str)
plot(p)
}},
"~/Desktop/crsanim.gif",
interval = .1
)
library(ggplot2)
ozmap <- function(proj4string) {
dat <- sf::st_transform(ozmaps::abs_ced, proj4string)
ggplot(dat) +
geom_sf() +
coord_sf() +
theme_void()
}
animation::saveGIF({
for(lon in 0:100) {
cat(".")
str <- paste0("+proj=aeqd +datum=WGS84 +lat_0=0 +lon_0=", lon)
p <- ozmap(str)
plot(p)
}},
"~/Desktop/crsanim.gif",
interval = .1
)
@djnavarro
Copy link
Author

crsanim

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