Data and Code


Brazilian Data Resources

I work with a wide range of administrative datasets from Brazil. I will post here useful data and cleaning scripts. Please feel free to make use of these resources, or reach out with questions, comments or suggestions through e-mail (ekatovich@wisc.edu) or Github.

Recreate Brazil’s Geodesic Offshore Projection Maps (Oil & Gas Royalty Distribution)
This repository contains R code, raw data, and supporting documentation to reconstruct orthogonal and parallel projections of state and municipal coastal boundaries used by Brazil’s National Oil Agency to allocate offshore oil and gas revenues.
R Code and Data Package

ANP Oil Royalties and Special Participation Transfers to Municipalities (1999-2017)
This repository contains raw data and Stata code to build a balanced monthly panel of royalty and special participation transfers to Brazilian municipalities from 1999-2017.
Raw Data and Stata Code Royalties and Special Participations Monthly Panel (.dta)

Municipality Name to Municipality/Microregion/Mesoregion/UF Code Crosswalk
This repository contains raw data and Stata code to attach Brazilian municipality names to 6 and 7 digit IBGE numeric municipality identifiers, as well as microregion, mesoregion, and state identifiers. This facilitates merges with datasets that report only municipality names.
Crosswalk (Stata) Brazilian Geographical Units Data (Municipality, Microregion, Mesoregion, and UF)


Useful Links
Base dos Dados
This is a major initiative to make Brazilian datasets available and accessible. New datasets are being cleaned and added every day.

Cleaning RAIS in Stata (1985-2018)
Ricardo Dahis provides Stata code to clean the Relação Anual de Informações Sociais (RAIS), a matched employer-employee dataset with information on all formal establishments and workers in Brazil.

geobr spatial datasets in R
The geobr package in R offers an easy way to download official Brazilian shapefiles.

Crosswalk to create Minimum Comparable Areas for Brazilian Municipalities
Philipp Ehrl has created Stata code to create “Minimum Comparable Areas” from Brazilian municipalities. These are coherent geographical units that take account of municipal splits and unions over different time periods.

IPEA Data
IPEA makes available a large number of macroeconomic, social, and regional panel datasets for Brazil, many at the municipal level.

Elections and Donation Data
Brazil’s Supreme Electoral Tribunal (TSE) publishes data on all federal, state, and municipal election candidates, parties, and donors, with some series going back to 1945.

Oil Sector Data
Brazil’s National Oil Agency (ANP) makes available a huge variety of data on the country’s oil sector, including royalties and production.

FOIA (Lei de Acesso à Informação)
Brazil’s Information Access Law requires public agencies to respond to requests for public documents or data within 10 days. The system, which recently migrated from e-SIC to Fala.BR, works well. Simply create an account and submit your request (very clear and specific) to the appropriate institution.


Other Resources

Create beautiful watercolor streetmaps with Open Street Map and ggplot2
This repository contains R code and a template to create poster-quality streetmaps of any city. (easy intro to ggplot2)
R Code and PowerPoint Template

CV Template
Latex code used to create my CV.
Latex Template

Github Website Template
Github Pages code to recreate this website.
Github Pages Code