First gather the prefix for each link by going to https://datasus.saude.gov.br/transferencia-de-arquivos/ and choosing your source. For example, to download "Equipes de saúde em MG de 2007 a 2021" we get an arbitrary link to extract the prefix, I got ftp://ftp.datasus.gov.br/dissemin/publicos/CNES/200508_/Dados/EP/EPMG2101.dbc which I then remove the date and suffix and end up with ftp://ftp.datasus.gov.br/dissemin/publicos/CNES/200508_/Dados/EP/EPMG. Then I
- Put the prefix obtainded in
get_links.py's variable namedlink_baseand run it. It should output alinks.jsonfile. - Run
python download_data.pyin this folder to download every.dbcfile into the folderbases_raw. - Now that you've downloaded the data, run
python uncompress_data.pyto decompress every file from.dbcto.csvinto the directorybases_descomprimidas.
And you're done!