#' networks UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
#' @import networkD3
mod_networks_ui <- function(id){
ns <- NS(id)
tagList(
fluidPage(
sidebarLayout(
sidebarPanel(
dateRangeInput(ns("date"),
label = "Date range of tweets",
start = "2019-10-13",
end = format(
Sys.time(),
format = "%Y-%m-%d"),
language = "pl"
),
selectInput(ns("party"),
label = "Koło poselskie",
choices = c("PiS",
"KO",
"KP",
"Lewica",
"Konfederacja")),
sliderInput(ns("opacity"),
label = "Wybierz przezroczystość",min = 0,
max = 1,
value = 0.8
)
),
mainPanel(
forceNetworkOutput(ns("network_plot"))
)
)
)
)
}
#' networks Server Function
#'
#' @noRd
mod_networks_server <- function(input, output, session){
ns <- session$ns
}
## To be copied in the UI
# mod_networks_ui("networks_ui_1")
## To be copied in the server
# callModule(mod_networks_server, "networks_ui_1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.