Spaces:
Sleeping
Sleeping
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 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)
|