The objective of this project is to find the relationship between the hospital rating and the death rate of multiple types of diseases within the same area. By using the attributes these two data sets shared — city, state, and zip code, we can calculate the multiplier of rating and death rate of each disease. Thus, we could find out which disease are closely related to hospital quality and which are not. The result could be used for the patient to choose which hospital is most suitable for his/her treatment or recovery.
- Hospital General Information.csv
- Complications and Deaths - Hospital.csv
- Complications and Deaths - State.csv
- NCHS_-_Leading_Causes_of_Death__United_States.csv
- Install config using
pip install config
. - Install psycopg2 using
pip install psycopg2
. - Run
psql
in terminal.- create database called 'hospital' using
CREATE DATABASE hospital;
. (In this case, we are using hospital as the database name)
- create database called 'hospital' using
- Quit current database, run
psql hospital
in your terminal to enter databsehospital
Run schema.sql in the database 'hospital'.- go to the database
hospital
. - run
\i /.../schema.sql
to create data schema.
- go to the database
- Run
python load_data.py
in terminal to load all the data.
- Install tabulate using
pip install tabulate
. - Install flask using
pip install flask
. - At the file directory, run
export FLASK_APP=web.py
- Then run
Flask run
, and openhttp://127.0.0.1:5000
in your web browser, this should open the app
Any data which is not avalible in the database is assigend with value of -1.