execution that covers more than half of the total municipalities of Brazil and represents over 40% of the country’s population. Our procurement dataset allows users to see information on specific tenders, such as the number, reserve price, and description of items being sold, the number of participants in competitive tenders, and the identity of participants and winning parties. On the budget execution side, the data includes information on each commitment, verification (an important step in the budget spending when buyers recognize that a good or service was delivered), and payments, again allowing users to see the identity of payees and the amount and dates of each step of the budget execution. In particular, we can compute the time to pay a particular transaction by using the time elapsed between the verification and payment stages.

The dataset we build is fully and publicly available on the Data Basis ( _Base dos Dados_ ) platform (Dahis et al., 2022).<sup>4</sup> The platform provides high-quality data at scale, with tools such as a curated search engine and an SQL-powered data lake where tables share a unified schema. The platform allows users to seamlessly query and merge hundreds of tables, across a variety of themes, directly on Google BigQuery.<sup>5</sup> All code used to generate our dataset is publicly available on GitHub.<sup>6</sup> We collect our data from State Audit Courts ( _Tribunais de Contas dos Estados_ , TCEs). These courts are independent institutions that supervise the public finances of the municipalities of their states. One important concern is the quality of the data – are municipalities providing accurate information on procurement and budget execution, or are they providing incomplete and selective information? We test the quality of our data by generating aggregates from our microdata and comparing them with information from the Brazilian Public Sector Accounting and Tax Information System ( _Sistema de Informações Contábeis e Fiscais do Setor Público Brasileiro_ , SICONFI), a dataset maintained by the National Treasury to “facilitate the production and analysis of accounting and tax information, standardize consolidation mechanisms and increase the quality and reliability of accounting information, financial and fiscal statistics received from municipalities, states, the Federal District and the central government.” We show that our aggregates closely match those of the SICONFI, not only at the municipalityyear level but often at the more disaggregated level of function, which is a classification that groups expenditures according to their purpose (e.g., health, education, security).

We exemplify possible applications of our data by exploring two features of municipal public finances. First, we evaluate the extent to which local governments buy from suppliers located in the same municipalities. García-Santana and Santamaría (2023) show compelling evidence of home bias in the European Union and discuss its implications for the value-formoney of public procurement. We show how our microdata allow us to identify each gov-

> 4 Available as the _Microdados de Despesas de Entes Subnacionais_ (MiDES) dataset at https://basedosdados.org/dataset/d3874769-bcbd-4ece-a38a-157ba1021514.

> 5In Section A.1, we illustrate how the dataset can be seamlessly queried to perform descriptive analyses using R.

> 6Available at https://github.com/basedosdados.

3