Published
Edited
Sep 9, 2022
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
baseFont = function (d) {
return fontFamilies[(Math.random() * fontFamilies.length)]
}
Insert cell
frequencyToSize = function (frequency) {
return Math.sqrt(frequency);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof height = Inputs.range([200,500], {label:" svg height",value:200, step:15})
Insert cell
viewof width = Inputs.range([200,500], {label:"svg width",value:200, step:15})
Insert cell
viewof cloudWidth = Inputs.range([200,500], {label:"cloud width",value:200, step:15})
Insert cell
viewof cloudHeight = Inputs.range([200,500], {label:"cloud height",value:200, step:15})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
selectedAnswer = { // generate the data for the answers that are necessary
const nlpAnswer = [];
updated_answers_29thapr.slice(answerIndex,answerIndex + 20).forEach((d,i) => {
nlpAnswer.push({
nlpData : getWords(d.Answers), //Answers are converted to nlp data
rows : Math.floor(i / 4),//Each data is assigned a row
cols : i % numCols, // and a col
})
})
return nlpAnswer
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
nlp = require('compromise@11.14.3')
Insert cell
d3 = {
const d3 = await require("d3@5", "d3-array@2");
d3.cloud = await require("d3-cloud@1");
return d3;
}
Insert cell
updated_answers_29thapr = FileAttachment("Updated_answers_29thApr.csv").csv({typed:true})
Insert cell
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