Difficulty in relating the municipalities of the NHIS with those of IBGE [closed]

1

I am trying to set up a database that includes the population served by the sanitation service and the per capita GDP of each municipality. The first one I have already been able to access through SNIS. The second one is available at IBGE and I already have it in hand.

However, the IBGE system does not use the municipal code. The SNIS data already has a column with the municipal code, but it is not the same number of other databases - it contains only 6 digits. It seems to me that the only alternative would be to aggregate the data by the name of the municipalities, which I do not know how to do and could generate infinite incongruities.

If anyone could help me, I would be very grateful.

    
asked by anonymous 30.11.2016 / 19:48

2 answers

1

There are several Brazilian municipalities that have the same name, I thought they were few, but the check the list of all of them , I saw that there are many cases. I think the worst case is Bom Jesus, the name of a municipality in Piauí, Rio Grande do Norte, Paraíba, Santa Catarina and Rio Grande do Sul. Arapuá (MG) and Arapuã (PR).

However, a state can not have two municipalities with the same name and not two municipalities that only differ in accentuation. So if you can get the name or acronym of the state of each municipality and concatenate the name, each municipality name will be unique.

There may be differences in case, accents, and apostrophes. For example, a base can give you " Waterhole of the Cunhãs (MA) " and the other " DAGUA OF THE CUNES (MA) ". In this case you convert everything to uppercase, strip the accents and take the apostrophes to unify the name.

So, if you can get the name, acronym or state code along with the name of the municipality from the bases, then just list the names of the counties together with the states for you to do this mapping [solution 1] .

If you can not get the name, acronym or state code directly, it may be part of the county code. For example, the first two digits of the municipality code used by IBGE on the bases I know are the same digits of the state. I do not know what the SNIS data you're using is, but I think it's just the IBGE municipal code without the last digit, because at least that's what I found when looking for some files to download from the SNIS website. p>

Disregarding the last digit of the IBGE code is safe, since this is just a check digit. From what I found in the spreadsheets I found on the SNIS website, that's exactly the case. For example, the municipality of Americana has the IBGE code 3501608, and in the spreadsheet that I found somewhere in the SNIS website is code 350160. In both cases, 35 is the state code of São Paulo. In this case, just disregard the last digit of the IBGE code and the codes will match. [solution 2]

If your code is anything that does not have similarity to the IBGE code and you do not have the state information available directly, then you should still try to find a pattern that from the code you discover the state . If this pattern does not exist, then you dance, for in this case you will not be able to know who is who in the case of Bom Jesus, for example. However, I find it unlikely that the base of the SNIS you are using will link the municipality without reporting anything at all about the state in question.

    
05.12.2016 / 02:30
0

Friend yesterday has this thing is on the website cider. It is very difficult to find the link of the database downloads. But make sure all that you need is Download cider updated municipalities

    
05.12.2016 / 02:39