Giter Club home page Giter Club logo

healthcare-analysis's Introduction

Brazilian Public Healthcare Data Analysis

Made withJupyter GitHub license

Project Live Presentation (in Portuguese)

Table of Contents

Introduction

Brazil's publicly funded healthcare system, SUS (Sistema Único de Saúde), is the largest nondiscriminatory government-run public health care system in the world. The system is entirely free of any cost at the point of service for any person, including foreigners.[1]

With this in mind, we'll take a look and analyze some datasets from the brazilian public healthcare system, using a "top-down" approach, meaning that we´ll look first in the aspects of the entire country and move on to analyze a specific region (the Northeastern one) and finally change our focus to only one state, the State of Ceará.

The main notebook with the full analysis and code can be found here (in Portuguese).

A PDF summary of the analysis can be found here (also in Portuguese). This contains all the text and charts from the main notebook, but none of the code and data cleaning steps, as I felt the code for these parts was becoming too extensive for a quick view.

Data

The data used in this analysis was directly obtained from the official website DATASUS on the week of May 22 to May 29 of 2021. The raw datasets can be found here. Please note that the data is constatly being updated, that's why is importante to keep the versions used for the analysis.

The datasets chosen were as follows:

  • Number of Hospital Admissions
    • From the whole country
    • Focused only in the State of Ceará
  • Total Spending in Hospital Admissions
    • From the whole country
    • From the State of Ceará
  • Average Price per Hospital Admission
    • From the whole country
    • From the State of Ceará

All this data ranges from January 2008 to March 2021.

A detailed description of each dataset and its meaning is also provided in the official DATASUS website at Notas Técnicas (Technical Notes).

Methodology

We'll proceed in a top-down approach, meaning we will start at the highest level, the country level, and go down focusing on the Northeastern region of Brazil and then on the State of Ceará, comparing its main city and capital, Fortaleza, with the sum of all the other 183 municipalities. Exactly like in the image below:

The data was first loaded, then cleaned in order to be analyzed graphically using various charts, giving us a better view of what we have in the datasets.

With this, we were able to obtain many statistics about the relevant variables observed, as seen in the Conclusion.

Technologies Used

The main .ipynb notebook was produced in Jupyter Lab using Python 3.8.5, mainly for its flexibility and number of features. The libraries used were:

  • Pandas, the backbone of data analysis in Python, used to manipulate datasets;
  • Numpy, for manipulation of numpoy arrays;
  • Matplotlib, for the plotting of the charts;
  • Locale, this was used to change the locale to portuguese in order to use the datetime library correctly;
  • Datetime, to convert the dates.

Conclusion

After the analysis, we have arrived at the following conclusions:

Looking at the number of hospital admissions in Brazil:

  • The State of Ceará is the 9th highest in the number of hospital admissions in Brazil from January 2008 to March 2021, accounting for 4.25% of the country's total admissions, with 6 322 342 total hospital admissions in this period of time;
  • The Northeastern Region accounts for 27.29% of the total hospital admissions in Brazil from January 2008 to March 2021;
  • Considering only the Northeastern Region, the State of Ceará comes in third in the number of hospital admissions in this period, accounting for 15.57%;
  • As observed, the number of hospital admissions has a seasonal variation, with the highs in the months of March to June of every year, and the lows in the months of October to January of each year.

Looking at the number of total admissions only in the State of Ceará, considering the place of admission:

  • Ceará's capital city, Fortaleza, accounts for 41.62% of all admissions from January 2008 to March 2021;
  • The other 183 municipalities in the State account for the other 58.28% in the same period.

Looking at the number of total admissions only in the State of Ceará, considering the place of residence:

  • 29.12% of all hospital admissions in the State of Ceará are from people living in Fortaleza;
  • The other 70,88% are from people living in any of the other 183 municipalities.

Comparing with the total population we have:

  • 29.60% of residents of the State of Ceará live in Fortaleza;
  • 70.40% of residents of the State of Ceará live in the other 283 municipalities.

With this, we can clearly see the the number of total hospital admissions in the State of Ceará are in accordance with the population.

Looking at the total spending in hospital admissions in Brazil:

  • The State of Ceará ranks at 10th place in Brazil considering the total spent with hospital admissions from January 2008 to March 2021, and this accounts for 3.88% of the total, or 6 573 100 152.04 BRL;
  • The Northeastern Region accounts for 23.46% of the total spent with hospital admissions in Brazil from January 2008 to March 2021;
  • Considering only the Northeastern Region, the State of Ceará comes in third in the total spent with hospital admissions in this period, accounting for 16.55%;

Looking at the total spending in hospital admissions only in the State of Ceará:

  • The total spending with hospital admissions in Ceará's capital, Fortaleza, accounts for 61.77% of the total in the years analyzes;
  • All the other 183 municipalities account for the rest 28.23%.

This show the disparity between the cities. Even though Fortaleza has less hospital admissions that the other 183 municipalities combined, it still has the highest total spending in this area.

Average Price per Hospital Admission in Brazil:

  • The average price per hospital admission is pretty leveled in all the 5 regions.
  • The State of Ceará is the 12th highest in the average price per hospital admission from January 2008 to March 2021;
  • The Northeastern Region is in 4th place from all 5 regions in Brazil;
  • Considering only the Northeastern Region, Ceará comes in at 3rd place.

Average Price per Hospital Admission only in the State of Ceará:

Here we can really grasp the diverging amount of money spent in Fortaleza against the other municipalities.

  • The average price per hospital admission in Fortaleza is 1 537.72 BRL;
  • The average price per hospital admission in the other 183 municipalities is 380.28 BRL.

Acknowledgments

This project was proposed as a first project in the Alura's Data Science Bootcamp, acting as an introduction to the world of Python to obtain insights from data.

References

Contact

Any tips or suggestions? Feel free to contact me!

healthcare-analysis's People

Contributors

diascarolina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.