awacke1 commited on
Commit
a4ee2ba
Β·
1 Parent(s): 208bb38

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 Washington Medical Centers 🌲')
49
  st.sidebar.header('Directions')
50
 
51
- source_location = st.sidebar.text_input("Source Location", "Space Needle, Seattle, WA")
52
- destination_location = st.sidebar.text_input("Destination Location", "Seattle-Tacoma International Airport, WA")
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 Washington
67
- washington_med_centers = [
68
- ('University of Washington Medical Center', 47.6496, -122.3096, 'Teaching hospital', 'Seattle'),
69
- ('Virginia Mason Hospital and Seattle Medical Center', 47.6097, -122.3265, 'General medical and surgical', 'Seattle'),
70
- ('Swedish First Hill Campus', 47.6092, -122.3244, 'General medical and surgical', 'Seattle'),
71
- ('Providence Regional Medical Center Everett', 47.9770, -122.2015, 'Community hospital', 'Everett'),
72
- ('Overlake Medical Center', 47.6153, -122.2039, 'General medical and surgical', 'Bellevue'),
73
- ('St. Joseph Medical Center', 47.2442, -122.4358, 'Community hospital', 'Tacoma'),
74
- ('Kadlec Regional Medical Center', 46.2566, -119.2833, 'Community hospital', 'Richland'),
75
- ('MultiCare Tacoma General Hospital', 47.2590, -122.4543, 'General medical and surgical', 'Tacoma'),
76
- ('EvergreenHealth Medical Center', 47.7154, -122.1786, 'Community hospital', 'Kirkland'),
77
- ('Swedish Issaquah Campus', 47.5659, -122.0136, 'Community hospital', 'Issaquah')
78
  ]
79
 
80
  # Annotate distances and paths for each medical center
81
- st.markdown("## πŸ₯ Washington Medical Centers 🌲")
82
- m2 = folium.Map(location=[47.6062, -122.3321], zoom_start=6)
83
  marker_cluster = MarkerCluster().add_to(m2)
84
- add_medical_center_paths(m2, source_location, washington_med_centers)
85
  folium_static(m2)
 
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
  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)