|
|
|
|
|
import streamlit as st |
|
import pandas as pd |
|
|
|
|
|
hospitals = [ |
|
{"name": "Mayo Clinic", "city": "Rochester", "state": "MN", "bed_count": 3047, "link": "https://www.mayoclinic.org/"}, |
|
{"name": "Florida Hospital Orlando", "city": "Orlando", "state": "FL", "bed_count": 2218, "link": "https://www.adventhealth.com/hospital/adventhealth-orlando"}, |
|
{"name": "Jackson Memorial Hospital", "city": "Miami", "state": "FL", "bed_count": 1708, "link": "https://jacksonhealth.org/jackson-memorial-hospital/"}, |
|
{"name": "UPMC Presbyterian Shadyside", "city": "Pittsburgh", "state": "PA", "bed_count": 1620, "link": "https://www.upmc.com/locations/hospitals/presbyterian"}, |
|
{"name": "NewYork-Presbyterian Hospital", "city": "New York", "state": "NY", "bed_count": 1565, "link": "https://www.nyp.org/"} |
|
] |
|
|
|
|
|
states = [ |
|
{"state": "MN", "population": 5706494, "square_miles": 86936, "source": "U.S. Census Bureau"}, |
|
{"state": "FL", "population": 21538187, "square_miles": 65755, "source": "U.S. Census Bureau"}, |
|
{"state": "PA", "population": 13002700, "square_miles": 46054, "source": "U.S. Census Bureau"}, |
|
{"state": "NY", "population": 20201249, "square_miles": 54556, "source": "U.S. Census Bureau"}, |
|
{"state": "CA", "population": 39538223, "square_miles": 163696, "source": "U.S. Census Bureau"} |
|
] |
|
|
|
|
|
hospitals_df = pd.DataFrame(hospitals) |
|
states_df = pd.DataFrame(states) |
|
|
|
|
|
merged_df = pd.merge(hospitals_df, states_df, on="state") |
|
|
|
|
|
merged_df["bed_count_per_square_mile"] = merged_df["bed_count"] / merged_df["square_miles"] |
|
|
|
|
|
st.write(merged_df) |
|
|