[GIS] How to get latitude and longitude data from the borders of a state in R

geoprocessinggoogle mapsr

Here is my problem: I need to get longitude and latitude data from the borders of the Brazilian states. With this data I can plot a map of each Brazilian state and, of course, of the whole country.

I know that R has some packages to plot maps and also to get latitude and longitude data from cities, countries, etc. but the problem is that I need latitude and longitude from the bordes of each state and not just the map or the data of specific place.

I need to have this data to after construct a map. So, I need both the data and the map! I don't know if it's possible to get this sort of data in R. Is it possible to extract this data from Google Maps?

I've found latitude and longitude data by cities on the website of the Brazilian Institute of Geography and Statistics but I couldn't find it by states.

Can someone help me?

P.S.: I'm an statistician. I dont't how to use some (and I don't have access) to some softwares that geographies use, such as ArcGIS. I only know how to use R, SAS, Access, Excel…

Best Answer

I would start here:

library(raster)
g <- getData('GADM', country='BRA', level=1)
plot(g)

You can extract the coordinates from g, but that is probably putting the horse behind the cart if you want to make a map.

xy <- geom(g)