awacke1 commited on
Commit
b0d5f99
·
1 Parent(s): a4ee2ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -45,11 +45,11 @@ def add_medical_center_paths(m, source, med_centers):
45
  ).add_to(m)
46
 
47
  # Streamlit UI
48
- st.title('Google Maps and Massachusetts Medical Centers 🌊')
49
  st.sidebar.header('Directions')
50
 
51
- source_location = st.sidebar.text_input("Source Location", "Logan International Airport, Boston, MA")
52
- destination_location = st.sidebar.text_input("Destination Location", "Boston Harbor, MA")
53
 
54
  if st.sidebar.button('Get Directions'):
55
  steps, coords = get_directions_and_coords(source_location, destination_location)
@@ -63,23 +63,23 @@ if st.sidebar.button('Get Directions'):
63
  else:
64
  st.write("No available routes.")
65
 
66
- # Top 10 medical centers in Massachusetts
67
- massachusetts_med_centers = [
68
- ('Massachusetts General Hospital', 42.3626, -71.0704, 'Teaching hospital', 'Boston'),
69
- ('Brigham and Women\'s Hospital', 42.3356, -71.1077, 'Teaching hospital', 'Boston'),
70
- ('Dana-Farber Cancer Institute', 42.3371, -71.1081, 'Cancer specialty', 'Boston'),
71
- ('Beth Israel Deaconess Medical Center', 42.3394, -71.1043, 'Teaching hospital', 'Boston'),
72
- ('Boston Children\'s Hospital', 42.3671, -71.1077, 'Pediatrics', 'Boston'),
73
- ('Tufts Medical Center', 42.3495, -71.0634, 'Teaching hospital', 'Boston'),
74
- ('Lahey Hospital and Medical Center', 42.5106, -71.2187, 'Community hospital', 'Burlington'),
75
- ('Baystate Medical Center', 42.1208, -72.6051, 'Teaching hospital', 'Springfield'),
76
- ('Newton-Wellesley Hospital', 42.3304, -71.2436, 'Community hospital', 'Newton'),
77
- ('South Shore Hospital', 42.1751, -70.9545, 'Community hospital', 'South Weymouth')
78
  ]
79
 
80
  # Annotate distances and paths for each medical center
81
- st.markdown("## 🏥 Massachusetts Medical Centers 🌊")
82
- m2 = folium.Map(location=[42.3601, -71.0589], zoom_start=6)
83
  marker_cluster = MarkerCluster().add_to(m2)
84
- add_medical_center_paths(m2, source_location, massachusetts_med_centers)
85
  folium_static(m2)
 
45
  ).add_to(m)
46
 
47
  # Streamlit UI
48
+ st.title('Google Maps and Texas Medical Centers 🤠')
49
  st.sidebar.header('Directions')
50
 
51
+ source_location = st.sidebar.text_input("Source Location", "Dallas Fort Worth Airport, TX")
52
+ destination_location = st.sidebar.text_input("Destination Location", "Corpus Christi Beach, TX")
53
 
54
  if st.sidebar.button('Get Directions'):
55
  steps, coords = get_directions_and_coords(source_location, destination_location)
 
63
  else:
64
  st.write("No available routes.")
65
 
66
+ # Top 10 medical centers in Texas
67
+ texas_med_centers = [
68
+ ('MD Anderson Cancer Center', 29.7072, -95.3973, 'Cancer specialty', 'Houston'),
69
+ ('Baylor University Medical Center', 32.7894, -96.7805, 'Teaching hospital', 'Dallas'),
70
+ ('Methodist Hospital', 29.7099, -98.5262, 'Community hospital', 'San Antonio'),
71
+ ('Parkland Memorial Hospital', 32.8121, -96.8103, 'Teaching hospital', 'Dallas'),
72
+ ('UT Southwestern Medical Center', 32.8199, -96.8419, 'Teaching hospital', 'Dallas'),
73
+ ('Texas Health Presbyterian Hospital Dallas', 32.8821, -96.7702, 'Community hospital', 'Dallas'),
74
+ ('Memorial Hermann-Texas Medical Center', 29.7096, -95.4017, 'Teaching hospital', 'Houston'),
75
+ ('St. Luke\'s Episcopal Hospital', 29.7096, -95.4019, 'Community hospital', 'Houston'),
76
+ ('Texas Children\'s Hospital', 29.7075, -95.4034, 'Pediatrics', 'Houston'),
77
+ ('Tarrant County Hospital', 32.7571, -97.3311, 'Community hospital', 'Fort Worth')
78
  ]
79
 
80
  # Annotate distances and paths for each medical center
81
+ st.markdown("## 🏥 Texas Medical Centers 🤠")
82
+ m2 = folium.Map(location=[31.9686, -99.9018], zoom_start=6)
83
  marker_cluster = MarkerCluster().add_to(m2)
84
+ add_medical_center_paths(m2, source_location, texas_med_centers)
85
  folium_static(m2)