[This article was first published on r.iresmi.net, and kindly contributed to R-bloggers]. (You can report a problem with the content on this page here)
Want to share your content on R bloggers? click here if you have a blog, or here if you don’t.
Day 18 of 30 Day Card Challenge: « Not of this world » (earlier).
Perseverance is still walking…
library(dplyr) library(sf) library(ggplot2) library(glue)
Facts
Scrape Where is perseverance?.
if (!file.exists("M20_waypoints.json")) {
download.file("https://mars.nasa.gov/mmgis-maps/M20/Layers/json/M20_waypoints.json",
"M20_waypoints.json")
}
perseverance <- read_sf("M20_waypoints.json")Card
perseverance |>
ggplot() +
geom_sf(aes(color = sol)) +
scale_color_viridis_c() +
labs(title = "Perseverance",
caption = glue("data: https://science.nasa.gov/mission/mars-2020-\\
perseverance/location-map/
https://r.iresmi.net/ - {Sys.Date()}")) +
theme(panel.background = element_rect(fill = NA),
plot.background = element_rect(fill = "sienna3",
color = "sienna4"),
text = element_text(color = "sienna4"),
axis.text = element_text(color = "sienna4"),
panel.grid = element_line(color = "sienna4"),
legend.background = element_rect(fill = NA),
plot.caption = element_text(size = 6))
Figure 1: Map of Perseverance route on Mars
Don’t ask me about the Mars date or the projections, I have no idea how it works…
Related
#Perseverance #bloggers


