This webpage features an interactive map created using the Leaflet package in R. The map focuses on several prominent landmarks within Ho Chi Minh City (HCMC), Vietnam. The document meets all project requirements, including displaying the creation date and featuring an interactive Leaflet map.
The map below displays the location of a few famous landmarks in the center of Ho Chi Minh City.
# Create a sample data frame of famous HCMC landmarks
# Coordinates: Lat (Latitude), Lng (Longitude)
landmarks_hcmc <- data.frame(
name = c("Central Post Office", "Ben Thanh Market", "Bitexco Financial Tower", "Nguyen Hue Walking Street"),
lat = c(10.7797, 10.7723, 10.7719, 10.7766),
lng = c(106.7001, 106.6980, 106.7032, 106.7042),
popup_text = c("Iconic French Colonial Architecture", "Traditional market and food hub", "HCMC's Central Financial Symbol", "Vibrant Public Space")
)
# Create the Leaflet map object
hcmc_map <- landmarks_hcmc %>%
leaflet() %>%
# Add the default tile layer (OpenStreetMap)
addTiles() %>%
# Set the initial view centered on HCMC (Lat: 10.7750, Lng: 106.7010)
# Zoom level 14 is suitable for city detail
setView(lng = 106.7010, lat = 10.7750, zoom = 14) %>%
# Add markers for each landmark
addMarkers(
lng = ~lng,
lat = ~lat,
popup = ~popup_text
)
# Display the map
hcmc_map