geobr icon indicating copy to clipboard operation
geobr copied to clipboard

Add capitals

Open ibarraespinosa opened this issue 3 years ago • 3 comments

Hello!

What about adding capitals?

ibarraespinosa avatar May 22 '21 13:05 ibarraespinosa

Hi @ibarraespinosa. A function that returns a data.frame with the names and codes of capitals would be a good idea. Is this what you had in mind?

rafapereirabr avatar May 22 '21 14:05 rafapereirabr

That would be very useful.

Em sáb., 22 de mai. de 2021 às 11:05, Rafael H M Pereira < @.***> escreveu:

Hi @ibarraespinosa https://github.com/ibarraespinosa. A function that returns a data.frame with the names and codes of capitals would be a good idea. Is this what you had in mind?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ipeaGIT/geobr/issues/243#issuecomment-846413088, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGRM74BFJJLDVMLXAWWNZCLTO623XANCNFSM45KVESOA .

ibarraespinosa avatar May 22 '21 14:05 ibarraespinosa

Hi all. My question is, should the function return the boundaries of the municipalities as MULTIPOLYGON or the the location of municipal seats as POINT ?

rafapereirabr avatar Feb 11 '22 18:02 rafapereirabr

The dev version of geobr in R now has a read_capitals() function.

This function downloads either a spatial sf object with the location of the municipal seats (sede dos municipios) of state capitals, or a data.frame with the names of codes of state capitals.

# Read spatial data with the  municipal seats of state capitals
capitals_sf <- read_capitals(as_sf = TRUE)

# Read simple data.frame of state capitals
capitals_df <- read_capitals(as_sf = FALSE)

rafapereirabr avatar Jan 29 '23 16:01 rafapereirabr

thanks

ibarraespinosa avatar Feb 13 '23 16:02 ibarraespinosa