Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,139 +1,139 @@
|
|
1 |
-
import streamlit
|
2 |
-
from streamlit_agraph import agraph, Node, Edge, Config
|
3 |
-
|
4 |
-
nodes = []
|
5 |
-
edges = []
|
6 |
-
|
7 |
-
#Departamento Direcci贸n
|
8 |
-
nodes.append( Node(id="CEO",
|
9 |
-
label="Direccion",
|
10 |
-
size=
|
11 |
-
shape="circularImage",
|
12 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
|
13 |
-
) # includes **kwargs
|
14 |
-
nodes.append( Node(id="EstrategiaCEO",
|
15 |
-
size=25,
|
16 |
-
#shape="circularImage",
|
17 |
-
shape="square",
|
18 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
19 |
-
)
|
20 |
-
|
21 |
-
#Gesti贸n Proyectos
|
22 |
-
nodes.append( Node(id="PM",
|
23 |
-
label="Gesti贸n Proyectos",
|
24 |
-
size=25,
|
25 |
-
shape="circularImage",
|
26 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
|
27 |
-
) # includes **kwargs
|
28 |
-
nodes.append( Node(id="EstrategiaPM",
|
29 |
-
size=25,
|
30 |
-
#shape="circularImage",
|
31 |
-
shape="square",
|
32 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
33 |
-
)
|
34 |
-
nodes.append( Node(id="Proyectos activos",
|
35 |
-
size=25,
|
36 |
-
#shape="circularImage",
|
37 |
-
shape="star",
|
38 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
39 |
-
)
|
40 |
-
|
41 |
-
#I+D
|
42 |
-
nodes.append( Node(id="I+D",
|
43 |
-
label="Innovaci贸n y Desarrollo",
|
44 |
-
size=25,
|
45 |
-
shape="circularImage",
|
46 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
|
47 |
-
) # includes **kwargs
|
48 |
-
nodes.append( Node(id="EstrategiaI+D",
|
49 |
-
size=25,
|
50 |
-
#shape="circularImage",
|
51 |
-
shape="square",
|
52 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
53 |
-
)
|
54 |
-
nodes.append( Node(id="Proyectos I+D activos",
|
55 |
-
size=25,
|
56 |
-
#shape="circularImage",
|
57 |
-
shape="star",
|
58 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
59 |
-
)
|
60 |
-
|
61 |
-
#Comercial
|
62 |
-
nodes.append( Node(id="ComercialIndustria",
|
63 |
-
label="Ventas",
|
64 |
-
size=25,
|
65 |
-
shape="circularImage",
|
66 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
|
67 |
-
) # includes **kwargs
|
68 |
-
nodes.append( Node(id="EstrategiaV",
|
69 |
-
size=25,
|
70 |
-
#shape="circularImage",
|
71 |
-
shape="square",
|
72 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
73 |
-
)
|
74 |
-
nodes.append( Node(id="Funnel",
|
75 |
-
size=25,
|
76 |
-
#shape="circularImage",
|
77 |
-
shape="star",
|
78 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
79 |
-
)
|
80 |
-
nodes.append( Node(id="ProductosIndustria",
|
81 |
-
size=25,
|
82 |
-
#shape="circularImage",
|
83 |
-
shape="hexagon",
|
84 |
-
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
85 |
-
)
|
86 |
-
|
87 |
-
#EDGES
|
88 |
-
#COMERCIAL INDUSTRIAL
|
89 |
-
edges.append( Edge(source="ComercialIndustria",
|
90 |
-
label="define",
|
91 |
-
target="EstrategiaV",
|
92 |
-
# **kwargs
|
93 |
-
)
|
94 |
-
)
|
95 |
-
edges.append( Edge(source="ComercialIndustria",
|
96 |
-
label="proyectos conseguidos",
|
97 |
-
target="Funnel",
|
98 |
-
# **kwargs
|
99 |
-
)
|
100 |
-
)
|
101 |
-
edges.append( Edge(source="ComercialIndustria",
|
102 |
-
label="productos que vende",
|
103 |
-
target="ProductosIndustria",
|
104 |
-
# **kwargs
|
105 |
-
)
|
106 |
-
)
|
107 |
-
#DIRECCION
|
108 |
-
edges.append( Edge(source="CEO",
|
109 |
-
label="dirige",
|
110 |
-
target="ComercialIndustria",
|
111 |
-
# **kwargs
|
112 |
-
)
|
113 |
-
)
|
114 |
-
edges.append( Edge(source="CEO",
|
115 |
-
label="dirige",
|
116 |
-
target="I+D",
|
117 |
-
# **kwargs
|
118 |
-
)
|
119 |
-
)
|
120 |
-
edges.append( Edge(source="CEO",
|
121 |
-
label="dirige",
|
122 |
-
target="PM",
|
123 |
-
# **kwargs
|
124 |
-
)
|
125 |
-
)
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
config = Config(width=750,
|
130 |
-
height=950,
|
131 |
-
directed=True,
|
132 |
-
physics=True,
|
133 |
-
hierarchical=False,
|
134 |
-
# **kwargs
|
135 |
-
)
|
136 |
-
|
137 |
-
return_value = agraph(nodes=nodes,
|
138 |
-
edges=edges,
|
139 |
-
config=config)
|
|
|
1 |
+
import streamlit
|
2 |
+
from streamlit_agraph import agraph, Node, Edge, Config
|
3 |
+
|
4 |
+
nodes = []
|
5 |
+
edges = []
|
6 |
+
|
7 |
+
#Departamento Direcci贸n
|
8 |
+
nodes.append( Node(id="CEO",
|
9 |
+
label="Direccion",
|
10 |
+
size=70,
|
11 |
+
shape="circularImage",
|
12 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
|
13 |
+
) # includes **kwargs
|
14 |
+
nodes.append( Node(id="EstrategiaCEO",
|
15 |
+
size=25,
|
16 |
+
#shape="circularImage",
|
17 |
+
shape="square",
|
18 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
19 |
+
)
|
20 |
+
|
21 |
+
#Gesti贸n Proyectos
|
22 |
+
nodes.append( Node(id="PM",
|
23 |
+
label="Gesti贸n Proyectos",
|
24 |
+
size=25,
|
25 |
+
shape="circularImage",
|
26 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
|
27 |
+
) # includes **kwargs
|
28 |
+
nodes.append( Node(id="EstrategiaPM",
|
29 |
+
size=25,
|
30 |
+
#shape="circularImage",
|
31 |
+
shape="square",
|
32 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
33 |
+
)
|
34 |
+
nodes.append( Node(id="Proyectos activos",
|
35 |
+
size=25,
|
36 |
+
#shape="circularImage",
|
37 |
+
shape="star",
|
38 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
39 |
+
)
|
40 |
+
|
41 |
+
#I+D
|
42 |
+
nodes.append( Node(id="I+D",
|
43 |
+
label="Innovaci贸n y Desarrollo",
|
44 |
+
size=25,
|
45 |
+
shape="circularImage",
|
46 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
|
47 |
+
) # includes **kwargs
|
48 |
+
nodes.append( Node(id="EstrategiaI+D",
|
49 |
+
size=25,
|
50 |
+
#shape="circularImage",
|
51 |
+
shape="square",
|
52 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
53 |
+
)
|
54 |
+
nodes.append( Node(id="Proyectos I+D activos",
|
55 |
+
size=25,
|
56 |
+
#shape="circularImage",
|
57 |
+
shape="star",
|
58 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
59 |
+
)
|
60 |
+
|
61 |
+
#Comercial
|
62 |
+
nodes.append( Node(id="ComercialIndustria",
|
63 |
+
label="Ventas",
|
64 |
+
size=25,
|
65 |
+
shape="circularImage",
|
66 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
|
67 |
+
) # includes **kwargs
|
68 |
+
nodes.append( Node(id="EstrategiaV",
|
69 |
+
size=25,
|
70 |
+
#shape="circularImage",
|
71 |
+
shape="square",
|
72 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
73 |
+
)
|
74 |
+
nodes.append( Node(id="Funnel",
|
75 |
+
size=25,
|
76 |
+
#shape="circularImage",
|
77 |
+
shape="star",
|
78 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
79 |
+
)
|
80 |
+
nodes.append( Node(id="ProductosIndustria",
|
81 |
+
size=25,
|
82 |
+
#shape="circularImage",
|
83 |
+
shape="hexagon",
|
84 |
+
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
|
85 |
+
)
|
86 |
+
|
87 |
+
#EDGES
|
88 |
+
#COMERCIAL INDUSTRIAL
|
89 |
+
edges.append( Edge(source="ComercialIndustria",
|
90 |
+
label="define",
|
91 |
+
target="EstrategiaV",
|
92 |
+
# **kwargs
|
93 |
+
)
|
94 |
+
)
|
95 |
+
edges.append( Edge(source="ComercialIndustria",
|
96 |
+
label="proyectos conseguidos",
|
97 |
+
target="Funnel",
|
98 |
+
# **kwargs
|
99 |
+
)
|
100 |
+
)
|
101 |
+
edges.append( Edge(source="ComercialIndustria",
|
102 |
+
label="productos que vende",
|
103 |
+
target="ProductosIndustria",
|
104 |
+
# **kwargs
|
105 |
+
)
|
106 |
+
)
|
107 |
+
#DIRECCION
|
108 |
+
edges.append( Edge(source="CEO",
|
109 |
+
label="dirige",
|
110 |
+
target="ComercialIndustria",
|
111 |
+
# **kwargs
|
112 |
+
)
|
113 |
+
)
|
114 |
+
edges.append( Edge(source="CEO",
|
115 |
+
label="dirige",
|
116 |
+
target="I+D",
|
117 |
+
# **kwargs
|
118 |
+
)
|
119 |
+
)
|
120 |
+
edges.append( Edge(source="CEO",
|
121 |
+
label="dirige",
|
122 |
+
target="PM",
|
123 |
+
# **kwargs
|
124 |
+
)
|
125 |
+
)
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
config = Config(width=750,
|
130 |
+
height=950,
|
131 |
+
directed=True,
|
132 |
+
physics=True,
|
133 |
+
hierarchical=False,
|
134 |
+
# **kwargs
|
135 |
+
)
|
136 |
+
|
137 |
+
return_value = agraph(nodes=nodes,
|
138 |
+
edges=edges,
|
139 |
+
config=config)
|