I'm trying to do a map to identify specific areas by coloring them. First, I made this plot to check if the data was ok (Setor is the sector's number):
ggplot(aes(x = long, y = lat, fill = Setor), data = mapa2010) + geom_polygon(colour = 'black') # data is ok
Them I tried to made the plot, filling by another variable (AGSN):
ggplot(aes(x = long, y = lat, fill = AGSN), data = mapa2010) + geom_polygon(colour = 'black')
The data is exactly the same, there is no code lines between this 2 commands. I've already tried to reorder the data, but still wrong.
Anyone know why this happens, and how to solve it?