Skip to content

Commit 7bd3831

Browse files
committed
working through the bugs...
1 parent 0963e72 commit 7bd3831

4 files changed

Lines changed: 33 additions & 31 deletions

File tree

‎R/Event_Mappings.R‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ check_POV_name <- function(mapname){
1818

1919
get_POV_name_list <- function(){
2020

21-
# n <- unlist(lapply(1:length(Global_POV),function(i){
22-
# unlist(Global_POV[[i]][["name"]]) }))
23-
2421
# just return the global variable
2522
n <- unlist(Global_POV_Name)
2623

‎R/ThreadNet_Core.R‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ ThreadOccByPOV <- function(o,THREAD_CF,EVENT_CF){
288288
start_row = end_row + 1
289289
thrd=thrd+1
290290
} # tlen>0
291-
}
291+
} # p in povlist
292292

293293
incProgress(3/n)
294294

@@ -320,7 +320,13 @@ ThreadOccByPOV <- function(o,THREAD_CF,EVENT_CF){
320320
# e=clusterEvents(occ, 'OneToOne', 'Network Proximity', THREAD_CF, EVENT_CF,'threads')
321321
e=clusterEvents(occ, '', 'Network Proximity', THREAD_CF, EVENT_CF,'threads')
322322

323-
})
323+
# sort them by threadnum and seqnum
324+
e = e[order(e[['threadNum']],e[['seqNum']]),]
325+
326+
incProgress(5/n)
327+
328+
} ) # with progress...
329+
324330

325331
# for debugging, this is really handy
326332
# save(occ,e,file="O_and_E_1.rdata")
@@ -333,7 +339,7 @@ ThreadOccByPOV <- function(o,THREAD_CF,EVENT_CF){
333339
shinyjs::show(selector = "#navbar li a[data-value=movingWindow]")
334340
shinyjs::show(selector = "#navbar li a[data-value=parameterSettings]")
335341

336-
incProgress(5/n)
342+
337343

338344
return( e )
339345

‎R/server.R‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ server <- shinyServer(function(input, output, session) {
139139
OccToEvents_By_Chunk(
140140
chunkInputEvents(),
141141
input$Chunks_method_Button, # which method?
142-
mapName2,
142+
input$EventMapName2,
143143
input$fixed_chunk_size,
144144
input$chunk_time_gap_threshold,
145145
'mins', #get_timeScale()
146146
input$chunk_CFs,
147-
get_POV_THREAD_CF(mapName2),
148-
get_POV_EVENT_CF(mapName2),
149-
get_POV_COMPARISON_CF(mapName2, get_CF())
147+
get_POV_THREAD_CF(input$EventMapName2),
148+
get_POV_EVENT_CF(input$EventMapName2),
149+
get_POV_COMPARISON_CF(input$EventMapName2, get_CF())
150150
)
151151
)
152152
output$EventValidate2 = renderText(paste('New POV named', input$EventMapName2 ,'has been created'))
@@ -178,10 +178,10 @@ server <- shinyServer(function(input, output, session) {
178178
isolate(
179179
OccToEvents3(
180180
regexInputEvents(),
181-
mapName3,
182-
get_POV_THREAD_CF(mapName3),
183-
get_POV_EVENT_CF(mapName3),
184-
get_POV_COMPARISON_CF(mapName3, get_CF()),
181+
input$EventMapName3,
182+
get_POV_THREAD_CF(input$EventMapName3),
183+
get_POV_EVENT_CF(input$EventMapName3),
184+
get_POV_COMPARISON_CF(input$EventMapName3, get_CF()),
185185
'threadNum',
186186
get_Zoom_REGEX(),
187187
regexInput(),
@@ -239,10 +239,10 @@ server <- shinyServer(function(input, output, session) {
239239
isolate(
240240
OccToEvents3(
241241
freqNgramInputEvents(),
242-
mapName4,
243-
get_POV_THREAD_CF(mapName4),
244-
get_POV_EVENT_CF(mapName4),
245-
get_POV_COMPARISON_CF(mapName4, get_CF()),
242+
input$EventMapName4,
243+
get_POV_THREAD_CF(input$EventMapName4),
244+
get_POV_EVENT_CF(input$EventMapName4),
245+
get_POV_COMPARISON_CF(input$EventMapName4, get_CF()),
246246
'threadNum',
247247
get_Zoom_freqNgram(),
248248
selected_ngrams(),

‎R/server/subsets.R‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ output$chunk_controls_0 <- renderUI({
77
align = "left",
88
selectizeInput(
99
"ChunkInputMapID",
10-
label = h4("Start with this view:"),
11-
get_event_mapping_names()
10+
label = h4("Start with this POV:"),
11+
get_POV_name_list()
1212
)
1313
)
1414
})
1515

1616
output$chunk_controls_1 <- renderUI({
1717
zoom_limit <- zoom_upper_limit( chunkInputEvents())
1818
if (zoom_limit == 1) {
19-
tags$h4("Zooming not available with this mapping")
19+
tags$h4("Zooming not available with this POV")
2020
} else {
2121
sliderInput(
2222
"chunkZoomID",
@@ -32,8 +32,7 @@ output$chunk_controls_2 <- renderUI({
3232
checkboxGroupInput(
3333
"chunk_CFs",
3434
"Start new event when ALL of these change:",
35-
intersect(colnames(chunkInputEvents()), union(get_EVENT_CF(),get_COMPARISON_CF())),
36-
inline=TRUE
35+
intersect(colnames(chunkInputEvents()), union(get_POV_EVENT_CF(input$ChunkInputMapID),get_COMPARISON_CF()))
3736
)
3837
)
3938
})
@@ -61,7 +60,7 @@ output$chunk_controls_5 <- renderUI({
6160
tags$div(
6261
align = "left",
6362
textInput("EventMapName2", label = h4("Enter label to save result")),
64-
actionButton("EventButton2", "Create New Mapping"),
63+
actionButton("EventButton2", "Create New POV"),
6564
span(textOutput("EventValidate2"), style="color:red")
6665
)
6766
})
@@ -100,8 +99,8 @@ output$Regular_Expression_controls_1 <- renderUI({
10099
align = "left",
101100
selectizeInput(
102101
"RegExInputMapID",
103-
label = h4("Start with this view:"),
104-
get_event_mapping_names()
102+
label = h4("Start with this POV:"),
103+
get_POV_name_list()
105104
)
106105
)
107106
})
@@ -180,14 +179,14 @@ output$Regular_Expression_controls_7 <- renderUI({
180179
output$Frequent_Ngram_controls_1 <- renderUI({
181180
tags$div(
182181
align="left",
183-
selectizeInput("freqNgramInputMapID",label = h4("Start with this view:"), get_event_mapping_names())
182+
selectizeInput("freqNgramInputMapID",label = h4("Start with this POV:"), get_POV_name_list())
184183
)
185184
})
186185

187186
output$Frequent_Ngram_controls_2 <- renderUI({
188187
zoom_limit <- zoom_upper_limit(freqNgramInputEvents())
189188
if (zoom_limit == 1) {
190-
tags$h4("Zooming not available with this view")
189+
tags$h4("Zooming not available with this POV")
191190
} else {
192191
sliderInput(
193192
"freqNgramZoomID",
@@ -258,7 +257,7 @@ output$Cluster_Event_controls_1 <- renderUI({
258257
tags$div(
259258
align="left",
260259
tags$h4("Group similar events to together to allow zooming"),
261-
selectizeInput("ClusterEventsInputID",label = h4("Start with this view:"), get_event_mapping_names() ))
260+
selectizeInput("ClusterEventsInputID",label = h4("Start with this POV:"), get_POV_name_list() ))
262261
})
263262

264263
output$Cluster_Event_controls_2 <- renderUI({
@@ -294,7 +293,7 @@ output$dendroClusterResult <- renderDendroNetwork({
294293

295294
# Controls for the whole set of tabs
296295
output$SelectSubsetControls_1 <- renderUI({
297-
selectizeInput("SelectSubsetMapInputID",label = h4("Choose input mapping:"),get_event_mapping_names())
296+
selectizeInput("SelectSubsetMapInputID",label = h4("Choose input POV:"),get_POV_name_list())
298297
})
299298

300299
output$SelectSubsetControls_2 <- renderUI({
@@ -318,7 +317,7 @@ output$Manage_Event_Map_controls <- renderUI({
318317
tags$div(
319318
align = "left",
320319
tags$h4("Select event mapping to export or delete"),
321-
selectizeInput("ManageEventMapInputID",label = h4("Choose mapping:"), get_event_mapping_names() ),
320+
selectizeInput("ManageEventMapInputID",label = h4("Choose mapping:"), get_POV_name_list() ),
322321
actionButton("ExportMappingRData", "Export RData file"),
323322
actionButton("ExportMappingCsv", "Export to csv"),
324323
actionButton("DeleteMappingButton", "Delete")

0 commit comments

Comments
 (0)