File size: 3,317 Bytes
7ae1707
339611a
7ae1707
 
 
 
 
 
 
 
 
b0d40a9
7ae1707
 
 
 
25a25ba
b0d40a9
25a25ba
 
 
 
 
 
 
 
 
 
7ae1707
 
 
0100187
1cb0f1d
6deed07
3dea82b
1cb0f1d
 
6deed07
 
 
 
 
 
 
 
 
 
1cb0f1d
6deed07
 
 
 
1cb0f1d
6deed07
 
 
 
 
 
 
1cb0f1d
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import streamlit as st
import graphviz as gv
from graphviz import Graph

# Define the cluster relations graph using gvmap
g = Graph(format='svg')
g.graph_attr['bgcolor'] = '#FFFFFF'
g.graph_attr['outputorder'] = 'edgesfirst'
g.graph_attr['size'] = '10,10'
g.node_attr['style'] = 'filled'
g.node_attr['shape'] = 'box'
g.node_attr['fillcolor'] = '#FFDAB9'

with g.subgraph(name='cluster_MN') as c:
    c.graph_attr['bgcolor'] = '#ADD8E6'
    c.node_attr['color'] = '#000000'
    c.node_attr['fontcolor'] = '#000000'
    c.attr(label='Minnesota', fontsize='24')
    c.node('Allina Health', URL='https://www.allinahealth.org/', target='_blank', tooltip='Allina Health: Abbott Northwestern Hospital')
    c.node('Fairview Health Services', URL='https://www.fairview.org/', target='_blank', tooltip='Fairview Health Services: University of Minnesota Medical Center')
    c.node('HealthPartners', URL='https://www.healthpartners.com/', target='_blank', tooltip='HealthPartners: Regions Hospital')
    c.node('Mayo Clinic', URL='https://www.mayoclinic.org/', target='_blank', tooltip='Mayo Clinic: Saint Marys Hospital')
    c.node('CentraCare', URL='https://www.centracare.com/', target='_blank', tooltip='CentraCare: St. Cloud Hospital')
    c.node('Essentia Health', URL='https://www.essentiahealth.org/', target='_blank', tooltip='Essentia Health: St. Mary’s Medical Center')
    c.node('Hennepin Healthcare', URL='https://www.hennepinhealthcare.org/', target='_blank', tooltip='Hennepin Healthcare: HCMC')
    c.node('Children\'s Minnesota', URL='https://www.childrensmn.org/', target='_blank', tooltip='Children\'s Minnesota: Children\'s Hospitals and Clinics of Minnesota')
    c.node('Sanford Health', URL='https://www.sanfordhealth.org/', target='_blank', tooltip='Sanford Health: Sanford Bemidji Medical Center')
    c.node('St. Luke\'s Hospital', URL='https://www.slhduluth.com/', target='_blank', tooltip='St. Luke\'s Hospital: St. Luke\'s Hospital')

# Render the graph using streamlit
st.graphviz_chart(g)


import folium
from streamlit_folium import folium_static

# Define hospitals data
hospitals = [('Allina Health', 'Abbott Northwestern Hospital', 44.957071, -93.262609),
             ('Fairview Health Services', 'University of Minnesota Medical Center', 44.973944, -93.230865),
             ('HealthPartners', 'Regions Hospital', 44.948451, -93.093207),
             ('Mayo Clinic', 'Saint Marys Hospital', 44.020716, -92.467034),
             ('CentraCare', 'St. Cloud Hospital', 45.570253, -94.168973),
             ('Essentia Health', 'St. Mary’s Medical Center', 46.802551, -92.099605),
             ('Hennepin Healthcare', 'HCMC', 44.973946, -93.261186),
             ("Children's Minnesota", "Children's Hospitals and Clinics of Minnesota", 44.946371, -93.233535),
             ('Sanford Health', 'Sanford Bemidji Medical Center', 47.496691, -94.864009),
             ("St. Luke's Hospital", "St. Luke's Hospital", 46.774196, -92.104049)]

# Create a map centered on Minnesota
m = folium.Map(location=[46.729553, -94.6859], zoom_start=7)

# Add markers for each hospital
for hospital in hospitals:
    folium.Marker(
        location=[hospital[2], hospital[3]],
        popup=f'{hospital[1]}<br>{hospital[2]},{hospital[3]}'
    ).add_to(m)

# Display the map in Streamlit
folium_static(m)