Perseverance
R-bloggers 2025-11-21
[This article was first published on r.iresmi.net, and kindly contributed to R-bloggers]. (You can report issue about 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.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Day 18 of 30DayMapChallenge: « Out of this world » (previously).
Perseverance is still hiking…
library(dplyr)library(sf)library(ggplot2)library(glue)
Data
Scraping 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")Map
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))

Don’t ask me about Mars datum or projections, I have no idea how it works…
To leave a comment for the author, please follow the link and comment on their blog: r.iresmi.net.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
