ipeaGIT / geobr

Easy access to official spatial data sets of Brazil in R and Python
https://ipeagit.github.io/geobr/
778 stars 116 forks source link

Verification Digit calculation for cod_mun IBGE #357

Open lucasmation opened 1 month ago

lucasmation commented 1 month ago

does anyone know the formula to calculate the verification digit for IBGE cod_mun variable? That is, cod_mun is formed by 6digits (where first 2 refer to state code). Then one verification digit.

SS MMMM V

usually it is Mod10, mod11 in other Brazilian ID documents. If this is not publicly available in IBGE documentation, or IBGE coleagues don't know, we could also reverse engineer trying Mod10, Mod11, etc... although figuring the weights might be a bit hard.