Life Expectancy, Healthcare Expenditures, and Universal Healthcare Coverage

An exploratory analysis and visualization application

Understanding the relationship between life expectancy and health expenditure across various healthcare systems is crucial for informing public health policy and promoting equitable outcomes. This project provides an interactive application for exploratory data analysis and visualization of this relationship, including forecasting and a comparison between countries with and without universal healthcare coverage.

Application Overview

The core of this project is a Streamlit application designed for interactive exploration. It allows users to visualize the correlation between life expectancy at birth and health expenditure. A key feature is the differentiation between countries with universal healthcare coverage (often single-payer systems) and those without, highlighted through distinct coloring in the visualizations.

Regression analysis is integrated to forecast this relationship, providing insights into potential future trends. The application also presents relevant statistics comparing life expectancy and health expenditure across different healthcare system types, along with model performance metrics and coefficients.

Animated screenshot of the Streamlit application displaying data visualizations.
Figure 1: Animated screenshot of the Streamlit application interface, showing interactive data visualization and analysis of life expectancy and health expenditure.

Usage and Features

To run the application locally, you need to download the CountryLE_EXP_UHC.csv data file and the LEHE.py application script. Place both files in the same directory. Ensure you have Python installed with the necessary packages. A requirements.txt file is available in the GitHub repository for exact package versions.

From your terminal, activate your Python environment (with required packages installed) and navigate to the directory containing the files. Then, execute the command: streamlit run LEHE.py. The application will then open in your web browser.

The application features two primary visualization buttons:

Both plots include a regression line illustrating the relationship between life expectancy and health expenditure. Below these visualizations, detailed statistics are provided to compare life expectancy and health expenditure in countries based on their healthcare system type. Model information, including performance metrics and coefficients, is also displayed.

Data Sources

Data for this project was primarily collected via web scraping from Wikipedia pages, as detailed in the datacollection.ipynb notebook.

It should be noted that some data was excluded for the purpose of comparison. Regions not present on all data sets were filtered out to ensure consistent comparisons.

Project Repository and Contact

All work on this project was completed by Trystan Carruth.

Email: trystaned@gmail.com

View the full project on GitHub