0

My apologies for my newbie question. I am so new to maps and quite lost at the vast info of internet.

I want to plot two german cities, Cologne and Berlin, in separate plots with ggplot2.

For now I only find the world data,

world <- map_data("world")
world

ggplot() +
  geom_map(
    data = world, map = world,
    aes(long, lat, map_id = region)
  ) 

Does anyone have a clue where and how I can find the data for these two cities?

thank you for your time

Corrector
  • 163
  • 9
  • geom_map is using lat/long coordinates as x and y. you can find this information on google... :) if it's really just those two cities, manually enter the coordinates into R and use them for plotting – tjebo Jan 26 '23 at 15:36
  • 1
    otherwise I'd give it a google like "list of coordinates of cities csv" or similar, but you would need a trustworthy source. – tjebo Jan 26 '23 at 15:37
  • 1
    google is your friend: https://taraskaduk.com/posts/2021-01-18-print-street-maps/ – Roman Jan 26 '23 at 15:38
  • @Roman, this is very nice. Probably more what the OP was after. – tjebo Jan 26 '23 at 15:39
  • thank you all for your answers. I think your link @Roman helps me start – Corrector Jan 26 '23 at 15:43

0 Answers0