IBGE municipality code
The official seven-digit code identifying a Brazilian município in the register kept by IBGE, the national statistics institute.
The IBGE code is the primary key of the register of Brazilian municipalities maintained by the Instituto Brasileiro de Geografia e Estatística.
Its first two digits are the federative unit, so the state a municipality belongs to follows from the code itself without a second lookup.
Not every code in the register is a municipality. The two Rio Grande do Sul lagoon entries are water bodies, and the 35 administrative regions of the Distrito Federal are districts of Brasília rather than municipalities of their own.
