I am trying to plot polygon data using ggmap, but the system crashes, not sure why. My area
dataframe looks like this:
> head(area)
long lat order hole piece id group
1 190393.2 5794527 1 FALSE 1 0 0.1
2 190474.4 5794516 2 FALSE 1 0 0.1
3 190573.0 5794533 3 FALSE 1 0 0.1
4 190619.4 5794580 4 FALSE 1 0 0.1
5 190619.4 5794620 5 FALSE 1 0 0.1
6 190619.4 5794661 6 FALSE 1 0 0.1
I get a map as the base layer:
chile <- get_map(location = "Chile", zoom = 6, maptype = "toner", source = "stamen")
And now I plot it:
ggmap(chile, base_layer = ggplot(data = area, aes(long, lat))) +
geom_path(aes(color = id))
I have tried this code many time and it takes forever and eventually crashes. Ideas on what is going on?