awacke1 commited on
Commit
7979670
·
1 Parent(s): e19b95a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +52 -0
app.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import graphviz as gv
3
+ from graphviz import Graph
4
+
5
+ # Define the cluster relations graph using gvmap
6
+ g = Graph(format='svg')
7
+ g.graph_attr['bgcolor'] = '#FFFFFF'
8
+ g.graph_attr['outputorder'] = 'edgesfirst'
9
+ g.graph_attr['size'] = '10,10'
10
+ g.node_attr['style'] = 'filled'
11
+ g.node_attr['shape'] = 'box'
12
+ g.node_attr['fillcolor'] = '#FFDAB9'
13
+
14
+ with g.subgraph(name='cluster_WI') as c:
15
+ c.graph_attr['bgcolor'] = '#ADD8E6'
16
+ c.node_attr['color'] = '#000000'
17
+ c.node_attr['fontcolor'] = '#000000'
18
+ c.attr(label='Wisconsin', fontsize='24')
19
+ c.node('Aurora Health Care', URL='https://www.aurorahealthcare.org/', target='_blank', tooltip='Aurora Health Care: St. Luke\'s Medical Center')
20
+ c.node('Froedtert & the Medical College of Wisconsin', URL='https://www.froedtert.com/', target='_blank', tooltip='Froedtert & the Medical College of Wisconsin: Froedtert Hospital')
21
+ c.node('Ascension Wisconsin', URL='https://healthcare.ascension.org/', target='_blank', tooltip='Ascension Wisconsin: St. Vincent Hospital')
22
+ c.node('Gundersen Health System', URL='https://www.gundersenhealth.org/', target='_blank', tooltip='Gundersen Health System: Gundersen Lutheran Medical Center')
23
+ c.node('SSM Health', URL='https://www.ssmhealth.com/', target='_blank', tooltip='SSM Health: St. Mary\'s Hospital Medical Center')
24
+ c.node('UW Health', URL='https://www.uwhealth.org/', target='_blank', tooltip='UW Health: University of Wisconsin Hospital')
25
+
26
+ # Render the graph using streamlit
27
+ st.graphviz_chart(g)
28
+
29
+
30
+ import folium
31
+ from streamlit_folium import folium_static
32
+
33
+ # Define hospitals data
34
+ hospitals = [('Aurora Health Care', "St. Luke's Medical Center", 45.408882, -91.639479),
35
+ ('Froedtert & the Medical College of Wisconsin', 'Froedtert Hospital', 43.038614, -88.231983),
36
+ ('Ascension Wisconsin', 'St. Vincent Hospital', 44.461670, -88.074355),
37
+ ('Gundersen Health System', 'Gundersen Lutheran Medical Center', 43.805459, -91.253002),
38
+ ('SSM Health', "St. Mary's Hospital Medical Center", 44.477875, -88.045661),
39
+ ('UW Health', 'University of Wisconsin Hospital', 43.076405, -89.414401)]
40
+
41
+ # Create a map centered on Wisconsin
42
+ m = folium.Map(location=[44.5, -89.5], zoom_start=7)
43
+
44
+ # Add markers for each hospital
45
+ for hospital in hospitals:
46
+ folium.Marker(
47
+ location=[hospital[2], hospital[3]],
48
+ popup=f'{hospital[1]}<br>{hospital[2]},{hospital[3]}'
49
+ ).add_to(m)
50
+
51
+ # Display the map in Streamlit
52
+ folium_static(m)