Monday, July 1, 2019

geobr: shapefiles and official spatial data sets of Brazil in R

In 2012, I published here a blog post about where to find shapefiles of Brazil. Since then, this has become one of the most popular posts in 9 years of the blog. However, the links to the original data sets change every now and then, and it gets a bit tricky to find the most up to date data. My team and I at the Institute for Applied Economic Research (Ipea) have created geobr, an R package that allows users to easily access shapefiles of the Brazilian Institute of Geography and Statistics (IBGE) and other official spatial data sets of Brazil.

The geobr package currently includes a variety of data sets, such as the shapefiles of municipalities and states (from 1872 to 2018), census weighting areas, a spatial grid with population count at a resolution of 200 x 200 meters, a geolocated database of health facilities in the country etc. All the data sets are read into R as sf data. We will gradually add other databases to the package, but feel free to make specific requests and suggestions by opening new issues on the GitHub page of geobr or tweeting the hashtag #geobr.

The advantage of geobr: Intuitive syntax that provides easy and quick access to a wide variety shapefiles and official spatial data sets with updated geometries for various years using harmonazied attributes and geographic projections across geographies and years.




Here is a quick intro to geobr: