image_trelliscope.Rd
Image Trelliscope
image_trelliscope(
data,
data_cognostics = NULL,
return_raw_data = F,
add_id_column = T,
filter_parameters = NULL,
remove_columns = NULL,
password = NULL,
image_url = NULL,
id_columns = NULL,
input_cognostics = NULL,
view_parameters = NULL,
trelliscope_path = NULL,
trelliscope_title = NULL,
sort_columns = NULL,
sort_level = "desc",
width = 650,
height = 500,
rows = 1,
columns = 2,
description = "",
push_to_github = F,
use_trelliscope2 = F,
use_jsonp = T,
markdown_description = "",
generate_thumbnail = F,
trelliscope_group = "common",
require_token = F,
trelliscope_id = NULL,
split_sig = NULL,
order = 1,
use_auto_cognostics = F,
disclaimer = F,
remove_data_columns = T,
conditional_cols = NULL
)
library(tidyverse)
library(trelliscopejs)
library(asbviz)
df <- govtrackR::dictionary_government_agencies()
data <-
df %>% janitor::clean_names() %>% mutate(url_image = "https://www.worldatlas.com/r/w1200/upload/8e/6f/eb/shutterstock-61933045.jpg")
my_input_cogs <-
input_cogs(
input_radio(
name = "correct",
desc = "Does the data for this panel appear to be correct?",
options = c("yes", "no")
),
input_radio(
name = "is_wasteful",
desc = "Is this a wasteful government agency or office?",
options = c("jeah", "nah")
),
input_text(
name = "comments",
desc = "Comments about the data in this panel",
width = 80,
height = 4
),
feedback_email = "[email protected]"
)
# tbl_cogs <- build_cognostics(data)
#
# tbl_cogs <- tbl_edit(tbl_cogs)
tbl_cogs <- structure(list(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19), c("id_agency", "name_agency", "name_office",
"id_department", "slug_agency", "source_office", "id_office",
"slug_office", "code_frec", "description_frec", "source_office_code",
"is_fpds_office", "name_agency_old", "name_office_old", "is_frec",
"description_mission", "url", "icon", "url_image"), c("Agency UIC",
"Ageny Name", "Office Name", "Department UIC", "Agency abbreviation",
"Source of Office Data", "Office OIC", "Office Abbreviation",
"FREC Code", "FREC Description", "Source of Office Code", "Is FPDS Office UIC Source?",
"Old Agency Name", "Old Office Name", "Is there a FREC?", "What is the mission of the office",
"Link to government website", "Government Icon", "Panel icon"
), c("Agency", "Agency", "Office", "Office", "Agency", "Office",
"Office", "Office", "FREC", "FREC", "Other", "Office", "Agency",
"Office", "FREC", "Office", "Other", "Other", "Other"), c(FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE
), c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE), c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE
), c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), c(TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), c(FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)), class = c("tbl_df",
"tbl", "data.frame"), row.names = c(NA, -19L), .Names = c("number_column",
"feature", "feature_description", "group", "type", "default_label",
"default_active", "filterable", "sortable", "log"))
data %>%
asbviz::image_trelliscope(
trelliscope_title = "Test of Image Panels with Govrnment Agency Directory",
image_url = "url_image",
id_columns = c(
"id_department",
"id_agency",
"name_agency",
"name_office",
"description_mission",
"url"
),
markdown_description = "Test of Image Panels",
sort_columns = c("id_department"),
data_cognostics = tbl_cogs,
input_cognostics = my_input_cogs,
trelliscope_path = "Desktop/test_image_panels",
password = "usa"
)
# setwd("~")
#
#
# image_trelliscope(
# data = data,
# image_url = "url_image",
# id_columns = c(
# "id_agency",
# "name_agency",
# "name_office",
# "description_mission",
# "url"
# ),
# markdown_description = "AAHHAHAHAH",
# sort_columns = "name_agency",
# trelliscope_title = "This is a trelliscope",
# description = "With the new features",
# input_cognostics = my_input_cogs,
# trelliscope_path = "Desktop/test",
#
# )