srakaastro.blogg.se

Rcode for latinamerica map
Rcode for latinamerica map











rcode for latinamerica map

To turn this scatterplot into a map, we use geom_polygon() instead, which draws each county as a distinct polygon. In this plot, each row in the data frame is plotted as a single point, producing a scatterplot that shows the corners of every county. To get a better sense of what the data contains, we can plot mi_counties using geom_point(), as shown in the left panel below. In this data set we have four variables: lat and long specify the latitude and longitude of a vertex (i.e. a corner of the polygon), id specifies the name of a region, and group provides a unique identifier for contiguous areas within a region (e.g. if a region consisted of multiple islands).













Rcode for latinamerica map