library(dplyr)
library(sf)
library(ggplot2)
library(glue)Day 18 of 30DayMapChallenge: « Out of this world » (previously).
Perseverance is still hiking…
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…
