I have a dataset which has Latitude and Longitude for all US cities. I want to assign Latitude and Longitude to df. However, there are multiple cities with different State. How can I assign Lat and Lon to right city and state?
Cities <- data.frame(City = c("Sunnyvale", "Sunnyvale","Sunnyvale","Sunnyvale"),
State = c("CA","MO", "NC", "TX"),
Lat = c(37.36889, 37.05083, 35.73889, 32.79639 ),
Lon = c(-122.03528, -94.495, -82.13611, -96.56056))
df <- data.frame(City2 = c("Sunnyvale", "Sunnyvale"),
State2 = c("CA", "NC"))