THE CNES Datasus Processor is a suite of scritps to fetch and pre-process data on infrastructure and staff from the Brazilian Universal Healthcare System (SUS)
- Download zipped file from the DataSUS server
- Unzip the file into a temporary folder (both the file and the folder are deleted at the end)
- Import files into Pandas Dataframes
- Merge Dataframes with respect to business rules
- Export files to <YYYYMM>_output (where <YYYYMM> is the date of the file)
Edit main.py
and replace the daterefs
with all the dates you want to process.
NOTE
This data pipeline was tested only with files from January 2019 to now (March 2020). It might not work on previous data.
I update this data on Kaggle monthly. Get it: https://www.kaggle.com/jairofreitas/brazilian-universal-health-care-data