ipeaGIT / geobr

Easy access to official spatial data sets of Brazil in R and Python
https://ipeagit.github.io/geobr/
789 stars 118 forks source link

Add capitals #243

Closed ibarraespinosa closed 1 year ago

ibarraespinosa commented 3 years ago

Hello!

What about adding capitals?

rafapereirabr commented 3 years ago

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?

ibarraespinosa commented 3 years ago

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 .

rafapereirabr commented 2 years ago

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 commented 1 year ago

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)
ibarraespinosa commented 1 year ago

thanks