0

image of my current plotDoing an analysis on Nuclear Explosions (after watching Oppenheimer), and I was able to plot a map using ggmap().

However, I want to add the 'Name' of the bomb as a label on the map, so that "Trinity" for example is visible. I'm having a bit of difficulty. See below for my code

worldmap <- get_stamenmap(
  bbox = c(left = -137.01, bottom = 11.06, right = -32.77, top = 56.64),
  maptype = "terrain",
  zoom = 4,
  messaging = FALSE,
  urlonly = FALSE,
  force = FALSE,
  https = FALSE,
)

ggmap(worldmap)

ggmap(worldmap) +
  geom_point(data = df_new_complete,
             aes(x = Longitude, y = Latitude),
             size = 1.5) +
  geom_text(aes(label="Name"))+
  theme_map()

Here is the dataset https://www.kaggle.com/datasets/utkarshx27/nuclear-explosions-data

  • Note: Not just trinity, but I would like all of the labels to be visible on the map within the US. – Jordan Omar Roche Aug 10 '23 at 02:49
  • I think this will be difficult as in the data there is one longitude-latitude combination where 427 bombs were detonated. There will simply be too many labels on overlapping points for it to make sense to label all of them. – DaveArmstrong Aug 10 '23 at 03:04
  • @DaveArmstrong You're right. I guess I can annotate "Trinity" and maybe one in the ocean just for a visual. – Jordan Omar Roche Aug 10 '23 at 03:07

0 Answers0