This interactive map highlights the cities where I have lived throughout different stages of my life. The locations span multiple regions of the United States as well as South Korea, reflecting both personal and professional experiences.
Each location represents a different chapter of my life, including assignments, home cities, and places I have spent significant time. Leaflet allows these experiences to be visualized in a single interactive map.
The purpose of this project is to demonstrate the use of R Markdown and the Leaflet package to create an interactive web-based map. Users can click on each marker to learn more about the locations represented on the map.
places <- data.frame(
city = c(
"Phoenix, Arizona",
"San Antonio, Texas",
"Chicago, Illinois",
"Savannah, Georgia",
"Alexandria, Virginia",
"Long Beach, California",
"Austin, Texas",
"Seoul, South Korea",
"Daegu, South Korea",
"Pyeongtaek, South Korea"
),
country = c(
"US","US","US","US","US","US","US",
"KR","KR","KR"
),
lat = c(
33.4484,
29.4241,
41.8781,
32.0809,
38.8048,
33.7701,
30.2672,
37.5665,
35.8714,
36.9921
),
lng = c(
-112.0740,
-98.4936,
-87.6298,
-81.0912,
-77.0469,
-118.1937,
-97.7431,
126.9780,
128.6014,
127.1127
)
)
We create two different icon styles:
us_icon <- makeIcon(
iconUrl = "https://cdn-icons-png.flaticon.com/512/197/197484.png",
iconWidth = 25,
iconHeight = 25
)
kr_icon <- makeIcon(
iconUrl = "https://cdn-icons-png.flaticon.com/512/197/197582.png",
iconWidth = 25,
iconHeight = 25
)
This map visually distinguishes between places lived in the United States and South Korea using custom icons, making the geographic distribution easier to interpret.
Map icons are based on country flag icons provided by Flaticon.
Sources: - United States flag icon: https://www.flaticon.com - South Korea flag icon: https://www.flaticon.com