Spaces:
Sleeping
Sleeping
Commit
·
57c39e9
1
Parent(s):
aba8231
Added icons and better colors
Browse files- app/.DS_Store +0 -0
- app/app.py +14 -9
- app/given_data/.DS_Store +0 -0
app/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
app/app.py
CHANGED
@@ -75,38 +75,38 @@ with ui.layout_columns(col_widths=[8, 4]):
|
|
75 |
|
76 |
with ui.layout_column_wrap(width="450px"):
|
77 |
with ui.layout_columns(col_widths=(6, 6)):
|
78 |
-
with ui.value_box(theme="
|
79 |
"Red line"
|
80 |
@render.text
|
81 |
def render_line_score():
|
82 |
return str(int(lineScore().get("red", 0)))
|
83 |
|
84 |
-
with ui.value_box(theme="
|
85 |
|
86 |
"Blue line"
|
87 |
@render.text
|
88 |
def render_line_score1():
|
89 |
return str(int(lineScore().get("blue", 0)))
|
90 |
|
91 |
-
with ui.value_box(theme="
|
92 |
-
"
|
93 |
@render.text
|
94 |
def render_line_score2():
|
95 |
return str(int(lineScore().get("orange", 0)))
|
96 |
|
97 |
-
with ui.value_box(theme="
|
98 |
"Purple line"
|
99 |
@render.text
|
100 |
def render_line_score3():
|
101 |
return str(int(lineScore().get("purple", 0)))
|
102 |
|
103 |
-
with ui.value_box(theme="
|
104 |
"Green line"
|
105 |
@render.text
|
106 |
def render_line_score4():
|
107 |
return str(int(lineScore().get("green", 0)))
|
108 |
|
109 |
-
with ui.value_box():
|
110 |
"Total score"
|
111 |
@render.text
|
112 |
def render_line_score5():
|
@@ -115,10 +115,15 @@ with ui.layout_columns(col_widths=[8, 4]):
|
|
115 |
|
116 |
with ui.card(min_height="600px"):
|
117 |
ui.card_header("Stop Data")
|
|
|
|
|
118 |
with ui.navset_pill(id="tab"):
|
119 |
-
with ui.nav_panel("Score
|
120 |
-
|
121 |
|
|
|
|
|
|
|
|
|
122 |
@render.plot(alt="A pie chart of score contributions from age, income, and density.")
|
123 |
def contribution_pie_chart():
|
124 |
print("Generating pie chart of contributions")
|
|
|
75 |
|
76 |
with ui.layout_column_wrap(width="450px"):
|
77 |
with ui.layout_columns(col_widths=(6, 6)):
|
78 |
+
with ui.value_box(theme="text-red", showcase=fa.icon_svg("bus", width="50px"),):
|
79 |
"Red line"
|
80 |
@render.text
|
81 |
def render_line_score():
|
82 |
return str(int(lineScore().get("red", 0)))
|
83 |
|
84 |
+
with ui.value_box(theme="text-blue",showcase=fa.icon_svg("bus", width="50px"),):
|
85 |
|
86 |
"Blue line"
|
87 |
@render.text
|
88 |
def render_line_score1():
|
89 |
return str(int(lineScore().get("blue", 0)))
|
90 |
|
91 |
+
with ui.value_box(theme="text-yellow" ,showcase=fa.icon_svg("bus", width="50px"),):
|
92 |
+
"Yellow line"
|
93 |
@render.text
|
94 |
def render_line_score2():
|
95 |
return str(int(lineScore().get("orange", 0)))
|
96 |
|
97 |
+
with ui.value_box(theme="text-purple",showcase=fa.icon_svg("bus", width="50px"),):
|
98 |
"Purple line"
|
99 |
@render.text
|
100 |
def render_line_score3():
|
101 |
return str(int(lineScore().get("purple", 0)))
|
102 |
|
103 |
+
with ui.value_box(theme="text-green",showcase=fa.icon_svg("bus", width="50px"),):
|
104 |
"Green line"
|
105 |
@render.text
|
106 |
def render_line_score4():
|
107 |
return str(int(lineScore().get("green", 0)))
|
108 |
|
109 |
+
with ui.value_box(theme="text-black",showcase=fa.icon_svg("route", width="50px")):
|
110 |
"Total score"
|
111 |
@render.text
|
112 |
def render_line_score5():
|
|
|
115 |
|
116 |
with ui.card(min_height="600px"):
|
117 |
ui.card_header("Stop Data")
|
118 |
+
|
119 |
+
|
120 |
with ui.navset_pill(id="tab"):
|
121 |
+
with ui.nav_panel("Score"):
|
|
|
122 |
|
123 |
+
@render.text
|
124 |
+
def totalScore():
|
125 |
+
score = scores()
|
126 |
+
return "Total score: " + str(int(score["total_score"]))
|
127 |
@render.plot(alt="A pie chart of score contributions from age, income, and density.")
|
128 |
def contribution_pie_chart():
|
129 |
print("Generating pie chart of contributions")
|
app/given_data/.DS_Store
CHANGED
Binary files a/app/given_data/.DS_Store and b/app/given_data/.DS_Store differ
|
|