Interactive Map of the Seven Wonders of the Modern World

This map displays the locations of the Seven Wonders of the Modern World. Each wonder has a custom marker with a representative image and a popup window with brief information.

library(leaflet)
library(magrittr)

# List of wonders with coordinates, images, and descriptions
wonders <- data.frame(
  name = c(
    "Chichén Itzá", "Christ the Redeemer", "Roman Colosseum", 
    "Leaning Tower of Pisa", "Eiffel Tower", "Big Ben", "Taj Mahal"
  ),
  latitude = c(20.683, -22.9519, 41.8902, 
               43.7230, 48.8584, 51.5007, 27.1751),
  longitude = c(-88.5686, -43.2105, 12.4922, 
                10.3966, 2.2945, -0.1246, 78.0421),
  image = c(
    "figure/fig31.png", "figure/fig71.png", "figure/fig61.png",
    "figure/fig51.png", "figure/fig11.png", "figure/fig41.png", "figure/fig21.png"
  ),
  description = c(
    "Chichén Itzá is a Mayan city in Mexico, famous for its Kukulkán pyramid.",
    "Christ the Redeemer is an iconic statue in Rio de Janeiro, Brazil, inaugurated in 1931.",
    "The Roman Colosseum in Italy is an ancient amphitheater where gladiator fights took place.",
    "The Leaning Tower of Pisa in Italy is famous for its tilt due to unstable ground.",
    "The Eiffel Tower in France is a symbol of Paris, built in 1889 by Gustave Eiffel.",
    "Big Ben in London is one of the world's most famous clock towers.",
    "The Taj Mahal in India is a mausoleum built in the 17th century in honor of Mumtaz Mahal."
  ),
  wikipedia = c(
    "https://en.wikipedia.org/wiki/Chichen_Itza",
    "https://en.wikipedia.org/wiki/Christ_the_Redeemer_(statue)",
    "https://en.wikipedia.org/wiki/Colosseum",
    "https://en.wikipedia.org/wiki/Leaning_Tower_of_Pisa",
    "https://en.wikipedia.org/wiki/Eiffel_Tower",
    "https://en.wikipedia.org/wiki/Big_Ben",
    "https://en.wikipedia.org/wiki/Taj_Mahal"
  )
)

# Create custom icons with local images (smaller size)
customIcons <- icons(
  iconUrl = wonders$image,
  iconWidth = 25, iconHeight = 25  # Smaller icons
)

# Create the map with a dark theme
wonders_map <- leaflet() %>%
  addProviderTiles(providers$CartoDB.DarkMatter) %>%  # Dark-themed map
  addMarkers(
    lng = wonders$longitude, lat = wonders$latitude,
    icon = customIcons,
    popup = paste0(
      "<b>", wonders$name, "</b><br>",
      "<img src='", wonders$image, "' width='200px'><br>",
      wonders$description, "<br>",
      "<a href='", wonders$wikipedia, "' target='_blank'>More information on Wikipedia</a>"
    )
  )

# Display the map
wonders_map