# Write a streamlit program that demonstrates Data synthesis. Synthesize data from multiple sources to create new datasets. Use two datasets and demonstrate pandas dataframe query merge and join with two datasets in python list dictionaries: 1) List of Hospitals that are over 1000 bed count by city and state, and 2) State population size and square miles. Perform a calculated function on the merged dataset. import streamlit as st import pandas as pd # Define the hospital dataset with the top five largest hospitals in the US 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/"} ] # Define the state population and size dataset with the five states used in the hospital dataset 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"} ] # Convert the datasets to pandas dataframes hospitals_df = pd.DataFrame(hospitals) states_df = pd.DataFrame(states) # Merge the two datasets on the "state" column merged_df = pd.merge(hospitals_df, states_df, on="state") # Calculate the average hospital bed count per square mile for each state merged_df["bed_count_per_square_mile"] = merged_df["bed_count"] / merged_df["square_miles"] # Display the merged and calculated data in a table st.write(merged_df)