Spaces:
Running
Running
Update app.R
Browse files
app.R
CHANGED
@@ -4,6 +4,7 @@ library(shinythemes)
|
|
4 |
library(shinyWidgets)
|
5 |
library(shinyalert)
|
6 |
library(spsComps)
|
|
|
7 |
library(bslib)
|
8 |
library(dplyr)
|
9 |
library(reactable)
|
@@ -161,7 +162,24 @@ output$down_nodes <- downloadHandler(
|
|
161 |
paste("Node",".csv",sep = "")
|
162 |
},
|
163 |
content = function(file){
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
)
|
167 |
|
@@ -170,7 +188,24 @@ output$down_edges <- downloadHandler(
|
|
170 |
paste("Edge",".csv",sep = "")
|
171 |
},
|
172 |
content = function(file){
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
)
|
176 |
|
|
|
4 |
library(shinyWidgets)
|
5 |
library(shinyalert)
|
6 |
library(spsComps)
|
7 |
+
library(data.table)
|
8 |
library(bslib)
|
9 |
library(dplyr)
|
10 |
library(reactable)
|
|
|
162 |
paste("Node",".csv",sep = "")
|
163 |
},
|
164 |
content = function(file){
|
165 |
+
# Show the progress alert
|
166 |
+
progressSweetAlert(
|
167 |
+
session = session,
|
168 |
+
id = "download_progress",
|
169 |
+
title = "Generating Nodes CSV...",
|
170 |
+
display_pct = TRUE,
|
171 |
+
value = 0
|
172 |
+
)
|
173 |
+
|
174 |
+
# Simulate progress updates
|
175 |
+
for (i in seq(1, 100, by = 20)) {
|
176 |
+
Sys.sleep(0.5) # Simulate processing time
|
177 |
+
updateProgressBar(session, id = "download_progress", value = i)
|
178 |
+
}
|
179 |
+
|
180 |
+
fwrite(nodes_df(),file,row.names = F)
|
181 |
+
|
182 |
+
closeSweetAlert(session)
|
183 |
}
|
184 |
)
|
185 |
|
|
|
188 |
paste("Edge",".csv",sep = "")
|
189 |
},
|
190 |
content = function(file){
|
191 |
+
# Show the progress alert
|
192 |
+
progressSweetAlert(
|
193 |
+
session = session,
|
194 |
+
id = "download_progress",
|
195 |
+
title = "Generating Nodes CSV...",
|
196 |
+
display_pct = TRUE,
|
197 |
+
value = 0
|
198 |
+
)
|
199 |
+
|
200 |
+
# Simulate progress updates
|
201 |
+
for (i in seq(1, 100, by = 20)) {
|
202 |
+
Sys.sleep(0.5) # Simulate processing time
|
203 |
+
updateProgressBar(session, id = "download_progress", value = i)
|
204 |
+
}
|
205 |
+
|
206 |
+
fwrite(edges_df(),file,row.names = F)
|
207 |
+
|
208 |
+
closeSweetAlert(session)
|
209 |
}
|
210 |
)
|
211 |
|