Hospital Data Analysis

Project Overview
This project is divided into two parts:
SQL Data Preparation: Combining and cleaning two datasets:
HCAHPS (Hospital Consumer Assessment of Healthcare Providers and Systems) survey data.
Hospital beds data.
Tableau Dashboard: Creating an interactive dashboard to visualise hospital performance based on survey responses and hospital sizes.
Features
Cleaning raw data by formatting dates and correcting CMS certification numbers.
Handling duplicates by selecting the most recent hospital bed reports.
Joining HCAHPS data with hospital bed data for enhanced insights.
Exporting the cleaned data to a
.csv
file for use in Tableau.
Prerequisites
PostgreSQL with PGAdmin installed.
Tableau (or any data visualisation tool capable of processing
.csv
files).
Datasets
HCAHPS Data: Contains survey responses, hospital names, and survey metrics.
Hospital Beds Data: Contains hospital names, the number of beds, and fiscal year reporting.
SQL Steps
Create Tables:
- Define tables for HCAHPS data and hospital beds data.
Clean Data:
- Format dates and pad CMS certification numbers to six digits.
Handle Duplicates:
- Use
ROW_NUMBER()
to select the most recent records for each hospital.
- Use
Join Data:
- Combine the two datasets into one unified dataset.
Export Data:
- Save the cleaned dataset as
tableau_file.csv.
- Save the cleaned dataset as