Published
Edited
Jul 8, 2022
1 star
Insert cell
Insert cell
Insert cell
Insert cell
tbl2_final_7k = html`<div>${viewof table2Show_7k}</div><div>${
table2Show == "tem" ? tabel2_temporal_7k : table2_7k
} </div>`
Insert cell
Insert cell
viewof table2Show = radio({
title: "Table 2 Version",
options: [
{ label: "Summary", value: "bar" },
{ label: "Temporal", value: "tem" }
],
value: "tem"
})
Insert cell
viewof table2Show_7k = radio({
title: "Table 2 Version",
options: [
{ label: "Summary", value: "bar" },
{ label: "Temporal", value: "tem" }
],
value: "tem"
})
Insert cell
Insert cell
table2 = barheatmap(
tbl2_data.objects(),
"Video Location Method",
"Political Label",
["YT Homepage", "Search", "YT Channel", "YT Video", "External URLs", "Other"],
["fL", "L", "C", "AW", "R", "fR"]
)
Insert cell
table2_7k = barheatmap(
tbl2_7k_processed_data.objects(),
"Video Location Method",
"Political Label",
["YT Homepage", "Search", "YT Channel", "YT Video", "External URLs", "Other"],
["fL", "L", "C", "AW", "R", "fR"]
)
Insert cell
Insert cell
tabel2_temporal = timesHeatMap(
tbl2t3_processed.objects(),
"Access Point",
"Political Label",
"Percent of Videos",
["#ff1100", "#ffe100", "#26ff00", "#0040ff", "#ae00ff", "black"],
["#2166AC", "#92C5DE", "#7FC97F", "gray", "#F4A582", "#B2182B"],
["YT Homepage", "Search", "YT Channel", "YT Video", "External URLs", "Other"],
["fL", "L", "C", "AW", "R", "fR"],
["Far Left", "Left", "Center", "Anti-Woke", "Right", "Far Right"],
null
)
Insert cell
tabel2_temporal_7k = timesHeatMap(
tbl2t3_7k_processed.objects(),
"Access Point",
"Political Label",
"Percent of Videos",
["#ff1100", "#ffe100", "#26ff00", "#0040ff", "#ae00ff", "black"],
["#2166AC", "#92C5DE", "#7FC97F", "gray", "#F4A582", "#B2182B"],
["YT Homepage", "Search", "YT Channel", "YT Video", "External URLs", "Other"],
["fL", "L", "C", "AW", "R", "fR"],
["Far Left", "Left", "Center", "Anti-Woke", "Right", "Far Right"],
null
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof tbl2_7k_processed_data = tbl2t3_7k_processed
.rename({
avg_value: "value",
avg_subvalue: "subvalue"
})
.select(aq.not("temporal"))
.view()
Insert cell
Insert cell
viewof tbl2_7k_raw_data = aq
.from(await FileAttachment("table2_ledwich.csv").csv())
.view()
Insert cell
Insert cell
Insert cell
Insert cell
viewof tbl2t3_7k_raw_data = aq
.from(await FileAttachment("table2_ledwich_tempral.csv").csv())
.view()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { radio, select, slider } from "@jashkenas/inputs"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more