Getting Municipal Data for Mato Grosso do Sul: What Actually Works
If you need the current list of municípios de mato grosso do sul, the IBGE is the authoritative source, though working with their raw data requires a few steps most people don't anticipate. The state has 79 municipalities, each with a five-digit IBGE code, area, estimated population, and geographic coordinates. I found this out the hard way during a licensing project where the spreadsheet I was handed from a consultant was missing three towns and had the population figures from 2010 instead of the latest estimate.
How to get the official municípios de mato grosso do sul dataset
The download is free. Go to the IBGE Cidades page, search for Mato Grosso do Sul, and grab the municipal data file. The site also hosts GeoJSON and shapefile formats if you need geographic boundaries for mapping. The data comes as a CSV with ANSI encoding by default, which causes headaches if you open it in Excel on Windows without specifying the correct character set. The ç in Corumbá and the tilde in Dourados will turn into garbage characters unless you tell Excel to use Windows-1252 or UTF-8 when importing. I've used the annual version and the quadrennial version of the IBGE municipal database. The annual one, released each July with population estimates, is what most people need. The quadrennial census version has richer detail but only comes out every ten years, and the last one was 2022. Fieldwork in some rural municipalities is still being processed, so 2022 data for places like Amambai or Jateí might have more gaps than the interpolated estimates from the annual version.
For coordinate data, the IBGE publishes latitude and longitude for the municipal seat of each town. If you need the full geographic boundary, download the shapefile from the IBGE download center under "Limites dos Municípios." I cross-referenced their shapefile with the state environmental agency's (SMA/MS) own municipal polygons a while back, and there were minor boundary discrepancies near the borders with Minas Gerais and São Paulo where survey lines don't perfectly align between datasets. For most purposes this doesn't matter, but if you're doing anything with precise land boundaries, use the state-level data instead.
👉 Clique no botão abaixo para saber mais sobre o assunto!
Common problems and workarounds
A couple years ago I was pulling all 79 municípios de mato Grosso do Sul for an environmental licensing system, and the biggest issue wasn't finding the data—it was the municipal code mismatch. The IBGE uses code 5000102 for Campo Grande, but the state treasury system and some legacy software use a different numbering scheme. I spent half a day reconciling because two of our partner agencies were feeding us data using state-created IDs that didn't map cleanly to IBGE codes. The workaround was building a lookup table manually and validating it against the official IBGE directory, which you can also download as a simple text file from the same page. Another thing nobody warns you about: the municipality of Miranda changed its territory slightly after 2017 due to a federal court decision involving indigenous land demarcation. The IBGE adjusted the area figure but the population and code stayed the same, which tripped up a GIS project I was running because the old shapefile no longer matched the new polygon. If you're doing spatial analysis, always check the year stamp on the boundary file against the population data file. Mixing 2022 boundaries with 2021 population estimates introduces small but measurable errors in density calculations.
Population estimates for smaller municipalities can swing wildly year to year. Places like Fátima do Sul or Brasilândia occasionally show changes of several hundred residents between annual estimates, which is usually just the model adjusting rather than actual migration. The IBGE itself notes this in their methodology documentation. Don't treat the numbers as precise counts unless they come from an official census.
What the dataset includes and what it doesn't
The standard IBGE municipal file for Mato Grosso do Sul gives you the name, IBGE code, area in square kilometers, population estimate, density, elevation of the seat, and coordinates. It does not give you socioeconomic indicators, GDP per capita, or HDI at the municipal level—those are in separate tables on the same site. For health data, look at DATASUS. For education metrics, check the IBGE Pnad Contínua municipal tables. All of these use the IBGE code as the linking key, so keeping your 500xx codes consistent across files is essential. The state government of Mato Grosso do Sul also publishes its own municipal compendium through the Secretaria de Estado de Planejamento, which adds data on public spending and service coverage. It's useful if you're doing something policy-related, but the formatting is inconsistent between editions and the data lag is usually two years behind the IBGE figures. I tend to use IBGE as the primary source and the state compendium as a supplement for spending data only.
If you need all 79 municipalities in a ready-to-use format rather than raw files, there are GitHub repositories maintained by Brazilian data journalists and developers who clean and convert the IBGE data into Parquet, GeoJSON, and SQLite formats. They save time but introduce a dependency on someone else's cleaning logic, so always spot-check the output against the original IBGE file before trusting it for anything important.