NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

rm(list = ls())

function(input, output, session) {

# withProgress(message = 'Loading Data', value = 0, style = 'old',{
# incProgress(1/3, detail = 'Fething Data from DataBase')
# db_con <<- db_connect()
# tmp_all_data <<- get_tmp_all_data(db_con)
# all_data <<- get_all_data(tmp_all_data)
# all_data_file <<- get_all_data_file()
# all_ner <<- get_all_ner()
# all_ner_relations <<- get_all_ner_relations()
# dbDisconnect(db_con)
#
# incProgress(1/3, detail = 'Running Models')
# first_snaps <<- get_first_snaps(all_data)
# data_iso <<- get_data_iso(all_data)
# first_snaps <<- do_pca(data_iso, first_snaps)
# pred_iso <<- get_pred_iso(first_snaps)
# all_data <- get_outlier_score(all_data, pred_iso)
# first_snaps <<- get_score(first_snaps, pred_iso)
# texts_df <<- get_text_df(all_data_file)
# data_rf <<- get_data_rf(first_snaps)
# # lime_exp_com <<- get_lime_complexity(data_rf)
# rf_iso_data <<- get_iso_data(first_snaps)
# # lime_exp_out <<- get_out_complexity(rf_iso_data)
# incProgress(1/3, detail = 'Done')
#
# # colnames(all_data)
# })


# if(input$out_table_rows_selected) {
# showTab('main_tabs', target = 'case_details')
# }
# observeEvent(input$reset_button, {
#
# })

observeEvent(input$reset_filters, {
reset('filters')
# reset('product_type')
# reset('loss_cat')
# reset('producing_office')
# reset('reported_to')
# reset('reported_by')
# reset('loss_cat')
# reset('loss_cat')
})

# Select the data based on user selections (REACTIVE)
selected_data <- reactive({
tmp_data <- all_data
if (length(input$policy_status) != '0L') {
tmp_data <- tmp_data[tmp_data$policy_status %in% input$policy_status, ]
}
if (length(input$product_type) > 0) {
tmp_data <- tmp_data[tmp_data$product_type %in% input$product_type, ]
}

if (length(input$producing_office) > 0) {
tmp_data <- tmp_data[tmp_data$producing_office %in% input$producing_office, ]
}

if (length(input$loss_cat) > 0) {
tmp_data <- tmp_data[tmp_data$category %in% input$loss_cat, ]
}

if (length(input$reported_to) > 0) {
tmp_data <- tmp_data[tmp_data$reported_to %in% input$reported_to, ]
}

if (length(input$reported_by) > 0) {
tmp_data <- tmp_data[tmp_data$reported_by %in% input$reported_by, ]
}


tmp_data
})

output$claims_total <- renderText({
nrow(selected_data())
})
output$claims_authorized <- renderText({
nrow(selected_data()[which(selected_data()$policy_status == 'Authorized'),])
})
output$claims_unauthorized <- renderText({
nrow(selected_data()[which(selected_data()$policy_status == 'Not Authorized'),])
})
output$claims_lapsed <- renderText({
nrow(selected_data()[which(selected_data()$policy_status == 'Lapsed'),])
})
output$claims_cancelled <- renderText({
nrow(selected_data()[which(selected_data()$policy_status == 'Cancelled'),])
})


# Plot all cases by policy_status
output$status <- renderPlotly({

validate(
need(nrow(selected_data()) > 0, 'There is no data for this selection.')
)


status_pal <- wes_palette(wes_p, type = 'continuous', n_distinct(unique(all_data$policy_status)))
status_plot <- ggplot(selected_data(),
aes(x = factor(policy_status, levels = c('Authorized','Not Authorized', 'Lapsed', 'Cancelled')),
fill = policy_status)) +
geom_bar() +
geom_text(
aes(label = ..count..),
stat = 'count',
nudge_x = -0.2
) +
geom_text(
aes(label =paste(round( ..count.. / length(selected_data()$case_id) * 100, 2), '%') ),
stat = 'count',
nudge_x = 0.0
) +
gg_theme +
ggtitle(paste(nrow(selected_data()) , 'Total Cases Found: ')) +
xlab('Status') +
ylab('Count of Cases') +
labs(fill = 'Policy Status') +
scale_fill_manual(values = c('Authorized' = status_pal[2],
'Cancelled' = status_pal[3],
'Lapsed' = status_pal[4],
'Not Authorized' = status_pal[1])) +
theme(legend.position = 'none')
ggplotly(status_plot)
})

output$reported_by_count <- renderPlotly({
validate(
need(nrow(selected_data()) > 0, 'There is no data for this selection.')
)
reported_by_count <- ggplot(selected_data()[selected_data()$received_incident_days_gap >= input$re_in_gap[1] & selected_data()$received_incident_days_gap <= input$re_in_gap[2],],
aes(x = reported_by, fill = reported_by)) +
geom_bar() +
gg_theme+
ggtitle('# Cases by Reported Party') +
xlab('Reported By') +
ylab('Count of Cases') +
labs(fill = 'Reported By')+
# geom_text(
# aes(label = ..count..),
# stat = 'count',
# nudge_x = -0.35
# ) +
geom_text(
aes(label =paste(round( ..count.. / length(selected_data()$case_id) * 100, 1), '%', ' ') ),
stat = 'count',
nudge_x = 0.0
) +
scale_fill_manual(values = wes_palette(wes_p,
type = 'continuous',
n_distinct(unique(selected_data()$reported_by)))) +
theme(legend.position = 'none')
ggplotly(reported_by_count)
})

# Plot reported_by boxplots and violin
output$reported_by_box <- renderPlotly({

validate(
need(nrow(selected_data()) > 0, 'There is no data for this selection.')
)

# # Calculate means and medians for the selected data
# means <- aggregate(received_incident_days_gap ~ reported_by, selected_data(), mean)
# medians <- aggregate(received_incident_days_gap ~ reported_by, selected_data(), median)

reported_by_box <- ggplot(selected_data()[selected_data()$received_incident_days_gap >= input$re_in_gap[1] & selected_data()$received_incident_days_gap <= input$re_in_gap[2],],
aes(x = reported_by, y = received_incident_days_gap, fill = reported_by)) +
geom_boxplot() +
geom_violin(alpha = 0.5)+
stat_summary(fun.y = mean, geom = 'point',shape = 3) +
gg_theme+
ggtitle('Boxplot of Days to Claim Received from Incident') +
xlab('Reported By') +
ylab('Days Between Incident and Claim Received') +
labs(fill = 'Reported By') +
scale_fill_manual(values = wes_palette(wes_p,
type = 'continuous',
n_distinct(unique(selected_data()$reported_by)))) +
theme(legend.position = 'none')
ggplotly(reported_by_box)
})

# Plot trend of insurance effective
output$effective_trend <- renderPlotly({


effective <- ggplot(selected_data()) +
aes(x = effective_month) +
geom_bar(stat = 'count', fill = wes_palette(wes_p)[2]) +
xlim(as.Date(c('1/1/2012', '31/12/2017'), format = '%d/%m/%Y')) +
scale_x_date(date_breaks = '4 months',
date_labels = '%b %Y',
limit = c(as.Date('2012-01-01'), as.Date('2017-12-31'))) +
ylim(0,1000) +
gg_theme +
theme(axis.text.x = element_text(angle = 90)) +
labs(title = '# Policies Effective per Month')

ggplotly(effective)
})

# Plot trend of incidents
output$incidents_trend <- renderPlotly({
incident <- ggplot(selected_data()) +
aes(x = incident_month) +
geom_bar(stat = 'count', fill = wes_palette(wes_p)[1]) +
xlim(as.Date(c('1/1/2012', '31/12/2017'), format = '%d/%m/%Y')) +
scale_x_date(date_breaks = '4 months',
date_labels = '%b %Y',
limit = c(as.Date('2012-01-01'), as.Date('2017-12-31'))) +
ylim(0,1000) +
gg_theme +
theme(axis.text.x = element_text(angle = 90)) +
labs(title = '# Incidents per Month')
ggplotly(incident)
})

# Plot trend of received
output$received_trend <- renderPlotly({
incident <- ggplot(selected_data()) +
aes(x = received_month) +
geom_bar(stat = 'count', fill = wes_palette(wes_p)[1]) +
xlim(as.Date(c('1/1/2012', '31/12/2017'), format = '%d/%m/%Y')) +
scale_x_date(date_breaks = '4 months',
date_labels = '%b %Y',
limit = c(as.Date('2012-01-01'), as.Date('2017-12-31'))) +
ylim(0,1000) +
gg_theme +
theme(axis.text.x = element_text(angle = 90)) +
labs(title = '# Claims Received per Month')
ggplotly(incident)
})

# Plot density ridge of insurance effective
output$effective_ridge <- renderPlot({
ggplot(selected_data()[selected_data()$effective_date >= input$eff_in_date[1] & selected_data()$effective_date <= input$eff_in_date[2],],
aes(x = effective_month_factor,
y = effective_year_factor,
group = effective_year_factor ,
fill = effective_year_factor)) +
geom_density_ridges(
# aes(height = ..count..),
size = 0.3,
alpha = 1,
# stat = 'density',
scale = 0.9) +
gg_theme +
theme(legend.position = 'bottom') +
scale_fill_manual(values = wes_palette(wes_p,
type = 'continuous',
n_distinct(unique(selected_data()$effective_year_factor)))) +
labs(title = 'Density plot of Insurance Effective per month',
x = 'Month No.',
y = 'Density') +
theme(legend.position = 'none')
})

# Plot density ridge of incidents
output$incident_ridge <- renderPlot({
ggplot(selected_data()[selected_data()$incident_date >= input$eff_in_date[1] & selected_data()$incident_date <= input$eff_in_date[2],],
aes(x = incident_month_factor,
y = incident_year_factor,
group = incident_year_factor ,
fill = incident_year_factor)) +
geom_density_ridges(
# aes(height = ..count..),

alpha = 1,
size = 0.3,
# stat = 'density',
scale = 0.9) +
gg_theme +
theme(legend.position = 'bottom') +
scale_fill_manual(values = wes_palette(wes_p,
type = 'continuous',
n_distinct(unique(selected_data()$effective_year_factor)))) +
labs(title = 'Density plot of Incidents per month',
x = 'Month No.',
y = 'Density') +
theme(legend.position = 'none')
})

# Plot density ridge of received
output$received_ridge <- renderPlot({
ggplot(selected_data()[selected_data()$date_received >= input$eff_in_date[1] & selected_data()$date_received <= input$eff_in_date[2],],
aes(x = received_month_factor,
y = received_year_factor,
group = received_year_factor ,
fill = received_year_factor)) +
geom_density_ridges(
# aes(height = ..count..),

alpha = 1,
size = 0.3,
# stat = 'density',
scale = 0.9) +
gg_theme +
theme(legend.position = 'bottom') +
scale_fill_manual(values = wes_palette(wes_p,
type = 'continuous',
n_distinct(unique(selected_data()$effective_year_factor)))) +
labs(title = 'Density plot of Claims Received per month',
x = 'Month No.',
y = 'Density') +
theme(legend.position = 'none')
})

# pred <- reactive({
# iso <- isolation.forest(first_snaps[,c('PC1', 'PC2')], ntrees = 100)
# pred_iso <- predict(iso, first_snaps[,c('PC1', 'PC2')])
# pred_iso
# })


# Generate new data to plot with outlier classes based on threshold input from user
data_iso_plot <- reactive ({
first_snaps$outlier <- as.factor(ifelse(pred_iso >= input$isolation_threshold, 'outlier', 'normal'))
first_snaps$outlier_score <- round(first_snaps$outlier_score, 2)
first_snaps
})

# Plot isolation forest outputs
output$isolation_plot <- renderPlotly({
# set.seed(6)
iso_scatter_pal <- wes_palette(wes_p, type = 'discrete', n = 2)
iso_scatter_plot <- ggplot(data_iso_plot(), aes(x = PC1,
y = PC2,
color = outlier,
label = case_id)) +
geom_point(shape = 16) +

geom_text(data = data_iso_plot() %>%
filter(outlier == 'outlier'),
aes(label = case_id),
check_overlap = T,
nudge_y = 100) +
geom_label() +
scale_color_manual(values = c('outlier' = iso_scatter_pal[1],
'normal' = iso_scatter_pal[2])) +

ggtitle('Scatter Plot of Normal and Outlier Cases') +
xlab('Principal Component 1') +
ylab('Principal Component 2') +
labs(color = 'Prediction')+
gg_theme
ggplotly(iso_scatter_plot)
# set.seed(6)
})

# Display dataframe containing the outlier cases
output$out_table <- DT::renderDataTable((DT::datatable({

outliers <- data_iso_plot()[which(data_iso_plot()$outlier == 'outlier'),]
outliers$fraud_score <- round(outliers$fraud_score,1)
outliers$outlier_score <- round(outliers$outlier_score,1)
outliers[,c(1, 9, 49, 48, 53,50)]
}, selection = 'single', options=list(scrollX=TRUE, lengthMenu=c(5,10,20)))))



observeEvent(input$out_table_rows_selected, {
updateTabsetPanel(session, 'main_tabs', selected = 'case_details')
})


# Plot histogram of the selected variable
output$hist_op <- renderPlot({
tmp = as.name(input$hist_var)
ggplot(data_iso_plot(), aes(x = data_iso_plot()[, input$hist_var])) +
geom_histogram(color = wes_palette(wes_p)[2], fill = wes_palette(wes_p)[5] , position = 'dodge', bins = 100) +
labs(title = paste('Histogram of ', input$hist_var),
x = input$hist_var,
y = 'Count') +
gg_theme
})

# Violin on boxplot outlier vs normal
output$boxplot <- renderPlot({
iso_box_pal <- wes_palette(wes_p, type = 'discrete', n = 2)
ggplot(data_iso_plot(), aes(x = data_iso_plot()$outlier ,
y = data_iso_plot()[, input$hist_var],
fill = data_iso_plot()$outlier)) +
geom_boxplot(width = 0.5) +
geom_violin(trim = FALSE, alpha = 0.5, width = 1) +
labs(title = paste('Boxplot with Violin Chart of ', input$hist_var),
x = 'Normal vs Outlier (Thickness of Violin Indicates Count',
y = input$hist_var) +
scale_fill_manual(values = c('outlier' = iso_box_pal[1],
'normal' = iso_box_pal[2])) +
gg_theme
})

# Display dataframe containing ALL cases
output$all_table <- DT::renderDataTable((DT::datatable({
first_snaps$fraud_score <- round(first_snaps$fraud_score,1)
first_snaps$outlier_score <- round(first_snaps$outlier_score,1)
first_snaps[ ,c(1,2,9,10,12,48,49,50,53)]

}, selection = 'single', options=list(scrollX=TRUE))))

observeEvent(input$all_table_rows_selected, {
updateTabsetPanel(session, 'main_tabs', selected = 'case_details')
})


#Display 'Claim Details'
output$details <- renderText('Claim Details')
# if (input$tabs == 'out_tab') {
#
#
# }

# data_iso_plot()
# sel_case_id <- reactive({
#
# })


x <- all_data
rv <- reactiveVal(x)
observeEvent(input$all_table_rows_selected, {
df <- rv()
df <- all_data[input$all_table_rows_selected,'case_id']
rv(df)
})


observeEvent(input$out_table_rows_selected, {
df <- rv()
df <- data_iso_plot()[which(data_iso_plot()$outlier == 'outlier'),]
df <- df[input$out_table_rows_selected,'case_id']
rv(df)
})

select_case_id <- reactive({
rv()
})

select_case_fnol <- reactive({
all_data[all_data$case_id == select_case_id(), ]
# all_data[input$all_table_rows_selected,]
# all_data[input$all_table_rows_selected,]
})
# output$test_tab <- renderPrint(input$main_tabs)
# select_case_fnol <- eventReactive(input$all_table_rows_selected | input$out_table_rows_selected , {
# # if (input$main_tabs == 'out_tab'){
# #
# # return(all_data[input$out_table_rows_selected,])
# # } else if(input$main_tabs == 'all_cases_tab') {
# # return(all_data[input$all_table_rows_selected,])
# #
# # }
#
# all_data[input$all_table_rows_selected,]
# })

# select_case_fnol <- reactive({
# all_data[input$out_table_rows_selected,]
# })
#
# #Display Claim Number
# output$claim_number <- renderText(paste( 'Claim No. : ',
# as.character(select_case_fnol()[,'case_id'])))
#
# #Display primary language
# output$primary_lang <- renderText(paste( 'Primary Lang. : ',
# as.character(select_case_fnol()[,'primary_language'])))
# #Display primary language confidence
# output$primary_lang_conf <- renderText(paste( 'Lang. Conf. : ',
# as.character(select_case_fnol()[,'primary_lang_confidence']),
# '%'))
#
# #Display case sentiment
# output$case_sentiment <- renderText(paste( 'Sentiment : ',
# as.character(round(select_case_fnol()[,'sentiment'],2) * 100),
# '%n(Range: -1 to +1)'))

#Display Claim Number
output$claim_number <- renderText(as.character(select_case_fnol()[,'case_id']))

#Display primary language
output$primary_lang <- renderText(as.character(select_case_fnol()[,'primary_language']))

#Display primary language confidence
output$primary_lang_conf <- renderText(paste(as.character(select_case_fnol()[,'primary_language_confidence']),
'%'))

#Display case sentiment
output$case_sentiment <- renderText(paste(as.character(round(select_case_fnol()[,'sentiment'],2)),
'n(Range: -1 to +1)'))


output$complexity <- renderText(as.character(select_case_fnol()[,'Complexity']))

output$cause_of_loss <- renderText(as.character(select_case_fnol()[,'Cause.of.Loss']))

output$fraud_score <- renderText(paste(as.character(select_case_fnol()[,'fraud_score']),' / 5'))

output$outlier_score <- renderText(as.character(paste(round(select_case_fnol()[,'outlier_score'] , 2), ' / 1')))

output$total_payment <- renderText(as.character(select_case_fnol()[,'TotalPaid']))

output$indemnity_payment <- renderText(as.character(select_case_fnol()[,'Indemnity_Payment']))

output$expense_payment <- renderText(as.character(select_case_fnol()[,'Expense_Payment']))

#Select case texts and file_names
select_case <- reactive({
texts_df[which(texts_df$case_id == select_case_fnol()[,'case_id']),]
})

output$lime_complexity <- renderPlot({


explanation_rf_sel <- explanation_rf[explanation_rf$case == select_case_id(),]


plot_features(explanation_rf_sel) +
guides(fill = guide_legend(reverse = T)) +
theme(axis.text = element_text(size = 14),
plot.title = element_text(size = 16),
legend.text = element_text(size = 14))

})


output$lime_outlier <- renderPlot({

explanation_iso_sel <- explanation_iso[explanation_iso$case == select_case_id(),]


plot_features(explanation_iso_sel) +
guides(fill = guide_legend(reverse = T)) +
theme(axis.text = element_text(size = 14),
plot.title = element_text(size = 16),
legend.text = element_text(size = 14))

})

output$notes_timeline <- renderTimevis({

notes_sel <- notes[notes$N_CLAIM_NUMBER == select_case_id(), ]
notes_dates <- data.frame(
id = 1:dim(notes_sel)[1],
content = notes_sel$T_SHRT_DESC,
start = notes_sel$D_CREATE_TS,
end = notes_sel$end,
title = notes_sel$T_FILE_NTE_DESC
)
timevis(notes_dates,
# width = 1200,
height = 600)

})




#Chatter Plot
output$word_freq_plot <- renderPlot({
withProgress(message = 'Making Chatter Plot', value = 0, {


incProgress(1/2)
p <- text_doc_tidy[text_doc_tidy$case_id == select_case_id(),] %>%
ggplot(aes(sentiment, n, label = word)) +
geom_text_repel(segment.alpha = 0,
aes(colour=sentiment, size=n)) +
scale_color_gradient(low=graph_pal[1], high = graph_pal[2],
guide = guide_colourbar(direction = "horizontal",
title.position ="top")) +
scale_size_continuous(range = c(5,8),
guide = FALSE,
trans = 'log10') +
scale_y_log10() +
ggtitle(paste0("Chatter Plot"),
subtitle = "Size represents count and color represents sentiment") +
labs(y = "Word Frequency (Log Scale)", x = "Avg Sentiment (Linear Scale)") +
gg_theme
incProgress(2/2)
print(p)

})
})

#Plot phi coeeficient word correlations
output$word_freq_graph <- renderPlot({

test <- texts_df[texts_df$case_id == select_case_id(), ]
validate(
need(dim(test)[1] >= 5, 'Less than 5 files in claim')
)

withProgress(message = 'Building Correlation Graphs', value = 0, {



incProgress(1/4)
# word_tokens <- tibble(chapter = seq_along(select_case()$text),
# texts = select_case()$text) %>%
# unnest_tokens(word,texts) %>%
# filter(!word %in% stop_words$word)

incProgress(2/4)
p <- text_doc_corr_tokens[text_doc_corr_tokens$case_id == select_case_id(),]
plot <- p %>%
mutate(chapter = as.numeric(as.factor(p$fnames))) %>%
group_by(word) %>%
filter(n() >= round(dim(p)[1]/500)) %>%
pairwise_cor(word, chapter) %>%
filter(!is.na(correlation),
correlation > 0.75) %>%
graph_from_data_frame() %>%
ggraph(layout = 'kk') +
geom_edge_link(aes(alpha = correlation), show.legend = F, color = graph_pal[2] ) +
geom_node_point(color = graph_pal[4], size = 5) +
geom_node_text(aes(label = gsub('[[:digit:]]+', '', gsub( '[[:punct:]]+', '', name))),
repel = F, colour = 'black',
parse = F, size = 5) +
theme_graph() +
ggtitle(paste0("Word Pairwise Correlation Plot"),
subtitle = "Words that are connected are either present together or not present at all across files.
nClusters of words that are disconnected do not occur together at all and are present only in some specific documents.
nTtransparency of link signifies correlation. Bolder means higher correlation")



incProgress(3/4)
print(plot)
})
})

# output$named_entities <- renderPrint({
# selected_ner <- all_ner[(all_ner$case_id == select_case_fnol()[,'case_id']) & (all_ner$ent_label == input$ner_type) ,]
# selected_ner[,c(4,5)]
# })


output$named_entities <- DT::renderDataTable((DT::datatable({
selected_ner <- all_ner_relations[(all_ner_relations$case_id == select_case_fnol()[,'case_id']) & (all_ner_relations$edge == input$ner_type) ,c('source', 'target', 'edge')]
# selected_ner <- all_ner[(all_ner$case_id == select_case_fnol()[,'case_id']) & (all_ner$ent_label == input$ner_type) ,]
colnames(selected_ner) <- c('ent_text1', 'ent_text', 'ent_label')
selected_ner <- selected_ner %>%
distinct(ent_text, .keep_all = T)
selected_ner[,c('ent_text', 'ent_label')]
}, selection = 'single', options=list(scrollX=TRUE, lengthMenu=c(10,15,30,45,60)))))


output$ner_graph <- renderPlot({

relations <- all_ner_relations[(all_ner_relations$case_id == select_case_fnol()[,'case_id']) & (all_ner_relations$edge == input$ner_type) ,c('source', 'target', 'edge')]
gr <- graph_from_data_frame(relations)
a <- grid::arrow(type = 'closed', length = unit(0.15, 'inches'))
ggraph(gr, layout = 'kk') +
geom_edge_link(aes(), show.legend = F , color = graph_pal[2]) +
geom_node_point(color = graph_pal[5], size = 5)+
geom_node_text(aes(label = name), vjust = 1, hjust = 1, parse = F, color = 'black') +
theme_graph() +
ggtitle('Relations Between Entities')



})


select_file_df <- reactive({

filter_empty_text <- all_data_file[all_data_file$case_id == select_case_fnol()[,'case_id'],]
filter_empty_text <- filter_empty_text[nchar(filter_empty_text$summary) > 50,]
filter_empty_text <- filter_empty_text %>%
filter(grepl('msg', file_name))
filter_empty_text
})


output$f_names <- renderUI({
selectInput('fname',
'Select File',
choices = all_data_file[all_data_file$case_id == select_case_fnol()[,'case_id'],'file_name'])
})



# output$file_sentiment <- renderPrint({
# paste('Sentiment: ',
# as.character(round(select_file_df()[ (select_file_df()$file_name == input$fname), 'sentiment'], 2) * 100),
# ' %'
# )
# })

output$file_sentiment <- reactive({
paste(as.character(round(select_file_df()[ (select_file_df()$file_name == input$fname), 'sentiment'], 2) ) )
})

output$file_summary <- renderText({
select_file_df()[select_file_df()$file_name == input$fname , 'summary']
})


# #Display top positive sentences
# output$top_pos_sent <- renderText(paste('Top 2 Positive Sentences : nSentence: ',
# as.character(all_data[input$all_table_rows_selected,'pos_0_sentence']),
# 'nSentiment: ',
# as.character(all_data[input$all_table_rows_selected,'pos_0_setiment']),
# ' (Range: -1 to +1) nSentence: ',
# as.character(all_data[input$all_table_rows_selected,'pos_1_sentence']),
# 'nSentiment: ',
# as.character(all_data[input$all_table_rows_selected,'pos_0_setiment']),
# ' (Range: -1 to +1)'))
#
# #Display neg positive sentences
# output$top_neg_sent <- renderText(paste('Top 2 Negative Sentences : nSentence: ',
# as.character(all_data[input$all_table_rows_selected,'neg_0_sentence']),
# 'nSentiment: ',
# as.character(all_data[input$all_table_rows_selected,'neg_0_setiment']),
# ' (Range: -1 to +1) nSentence: ',
# as.character(all_data[input$all_table_rows_selected,'neg_1_sentence']),
# 'nSentiment: ',
# as.character(all_data[input$all_table_rows_selected,'neg_0_setiment']),
# ' (Range: -1 to +1)'))









}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.