Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
49 |
st.sidebar.header('Directions')
|
50 |
|
51 |
-
source_location = st.sidebar.text_input("Source Location", "
|
52 |
-
destination_location = st.sidebar.text_input("Destination Location", "
|
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
|
67 |
-
|
68 |
-
('
|
69 |
-
('
|
70 |
-
('
|
71 |
-
('
|
72 |
-
('
|
73 |
-
('
|
74 |
-
('
|
75 |
-
('
|
76 |
-
('
|
77 |
-
('
|
78 |
]
|
79 |
|
80 |
# Annotate distances and paths for each medical center
|
81 |
-
st.markdown("## π₯
|
82 |
-
m2 = folium.Map(location=[
|
83 |
marker_cluster = MarkerCluster().add_to(m2)
|
84 |
-
add_medical_center_paths(m2, source_location,
|
85 |
folium_static(m2)
|
|
|
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 |
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)
|