All data used to construct our dataset are publicly available, often in transparency portals provided by the TCEs.<sup>9</sup> The structure, coverage, and quality of the raw data vary across states and often across municipalities in the same state.<sup>10</sup> For those reasons, the data require extensive upfront work to be harmonized, cross-checked, and cleaned for usage. The dataset we build is fully and publicly available on the Data Basis ( _Base dos Dados_ ) platform.<sup>11</sup> This is an ongoing project that currently covers 3,076 (out of 5,570) municipalities in 7 states (out of 27), and we expect to keep expanding the data to the extent possible.<sup>12</sup> We provide all code used to download, clean, and produce the final datasets on GitHub. Below we provide more explanation of the institutional context and key variables related to public procurement and budget execution.

# **2.1 Public procurement**

Public procurement is the process through which governments acquire goods and services. As a rule, governments are expected to run competitive tenders when buying goods and services. The specific method used, such as reverse auctions, invitations to tender or framework agreements, will depend on the nature of the object to be acquired and its estimated value. In exceptional circumstances (such as when there is only one feasible supplier or during an emergency) or when purchase values are small, officials can waive tenders and directly contract with suppliers (see Table A.2 for more details).

Our municipal public procurement dataset is organized into three tables: _tender_ , _tenderitem_ , and _tender-participant_ .

In the _tender_ table, one observation is a tendering procedure that some agency in a given municipality executes. Tenders are often comprised of several _items_ , so they should be thought of as a batch of items that are separately sold – one tender might contain, for example, ten different items that are purchased from four different suppliers. Each tender often includes a general description of the items being purchased (like “purchase of cleaning goods for city hall” or “hiring of mechanical services”), classifiers for groups of goods/services, the modality used for the purchase, and the status of the tender (if it was completed, canceled or deserted, for example). It will also sometimes include the total estimated or budgeted value for that batch of goods. Each tender process is uniquely identified by the variable id_licitacao_bd.

In the _tender-item_ table, each observation is an item, linked to a specific tender. Items will often include a textual description of the specific purchase (e.g., “cleaning detergent 0.5L” or

> 9 We provide links to all the raw data we use in Table A.1. 10In Appendix B we discuss in detail some aspects of the quality of the final harmonized dataset, such as the existence of unique identifiers to link different stages of the budget execution process. 11 Available as the _Microdados de Despesas de Entes Subnacionais_ (MiDES) dataset at https://basedosdados.org/dataset/d3874769-bcbd-4ece-a38a-157ba1021514. 12The first seven states included in the dataset were chosen due to data availability, granularity and ease of access. For some states we could not find any public data on the website of TCEs; in others, data were available for download but required complex scraping; yet others provide public data for download but the quality is low e.g. no detailed budget execution information.

5