-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
103 lines (96 loc) · 5.47 KB
/
Copy pathui.R
File metadata and controls
103 lines (96 loc) · 5.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
######################################
## Author: Riti Kumari (sinhariti61@gmail.com)
## Date: 2018-02-13
## Title: Socail Network Analysis
## Purpose: Analysis of EU Employee datasets
# Analysis & visualization of employee and department level interaction
# Visualization of the degree centrality , in-degree, out-degree and betweeness
# Depiction of the important persons of the organisation
# Analysis of the horizaontality of the organization
######################################
library(shiny)
library(networkD3)
library(dplyr)
shinyUI(fluidPage(
#titlePanel
titlePanel("RitiKumari_Social_Network_Analysis"),
br(),
#sidebarLayout
sidebarLayout
(
#sidebarPanel
#Upload the file
sidebarPanel(fileInput("file1","Please upload the Emmployee Email Data file in txt format"),
fileInput("file2","Please upload the Department Data file in txt format"),
textInput("hopCount","Please input the number of connections for plotting",value="40"),
sliderInput("topN","Choose the Top N value for plotting : ", max=10,min=0, value =c(1)),
#sliderInput("receiverRange","Enter Receiver code range : ", max=1005,min=0, value =c(10,11))
br(),
br(),
#img(src="R.jpg", height=100, width=200)
img(src="Shiny-image.png", height=100, width=250)
),
#mainPanel
mainPanel
(
tabsetPanel(type="tab",
tabPanel("Preface",
tags$style("body{background-color:linen; color:brown}"),
br(),
h2("Social Network Analysis"),
br(),
p("The network was generated using email data from a large European research institution.
We have anonymized information about all incoming and outgoing email between
members of the research institution. There is an edge (u, v) in the network if person
u sent person v at least one email. The e-mails only represent communication between
institution members (the core), and the dataset does not contain incoming messages
from or outgoing messages to the rest of the world."),
br(),
p("The dataset also contains ”ground-truth” community memberships of the nodes.
Each individual belongs to exactly one of 42 departments at the research institute.
This network represents the ”core” of the email-EuAll network, which also contains
links between members of the institution and people outside of the institution (although
the node IDs are not the same).")
),
tabPanel("Data",
fluidRow(
br(),
column(4, h3("Employee Email Data"), dataTableOutput("tb1")),
column(4, h3("Department Data"), dataTableOutput("tb2"))
)),
navbarMenu( "Interaction" ,
tabPanel("Employee Interaction",
#For making grid
fluidRow(
br(),
column(4, h3("Senders Interaction"), dataTableOutput("sender")),
column(4, h3("Receivers Interaction"), dataTableOutput("receiver"))
)
),
tabPanel("Department Interaction",
fluidRow(column(4,h3("Department Interaction"), dataTableOutput("department"))))
),
navbarMenu("Plot",
tabPanel("Connection Plot", h3("Connection Plot"), simpleNetworkOutput("plot")),
tabPanel("Department Interaction Plot", h3("Department Interaction Plot"),plotOutput("deptplot")),
tabPanel("Centrality Plot", h3("Centrality Plot"),forceNetworkOutput("centralityPlot")),
tabPanel("Betweenness Plot",h3("Betweenness Plot") ,forceNetworkOutput("betweennessPlot")),
tabPanel("In Degree Centrality Plot",h3("In Degree Centrality Plot"), forceNetworkOutput("inPlot"))
),
navbarMenu("2-hop Connection" ,
tabPanel("Sender Connection",h3("Sender Connection Plot") ,simpleNetworkOutput("ShopConnection")),
tabPanel("Receiver Connection", h3("Receiver Connection Plot"),simpleNetworkOutput("RhopConnection"))
),
tabPanel("Comuptation",
fluidRow(
br(),
column(4,h3("Degree Centrality"),dataTableOutput("DegreeCentrality")),
column(4,h3("In-Degree Centrality"),dataTableOutput("InCentrality")),
column(4,h3("BetweenNess"),dataTableOutput("Betweeness"))
)
)
),
h5(strong(tags$footer("@ Shiny App", align ="center")))
)
)
))