Public
Edited
Jul 17, 2023
8 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
formatTime = d3.timeFormat("%B %d, %H:%M");
Insert cell
Insert cell
Insert cell
scaleR = d3.scaleTime().domain([new Date('2021-01-01'), new Date('2021-03-08')])
.range([0, Math.PI*2]);
Insert cell
new Date('2021-01-01')
Insert cell
Insert cell
Insert cell
Insert cell
scaleR.ticks(2)
Insert cell
innerRadius = 50
Insert cell
Insert cell
Insert cell
Insert cell
DOM.uid("month")
Insert cell
range = d3.max(data, d=>d.num_comments)
Insert cell
Insert cell
parseData = data.map(d=> {
d.date = new Date(d.date)
return d
})
Insert cell
Insert cell
popAuthors = nestByAuthor.filter(t=>t.values.length>1)
Insert cell
dfvArr = nestByAuthor.filter(t=>t.key==='DeepFuckingValue')
Insert cell
popMod = parseData.filter(t=> moderatorList.indexOf(t.author)>-1 )
Insert cell
popAuthorsArr = popAuthors.map(d=>d.key)
Insert cell
Insert cell
Insert cell
eliteDataFiltered = eliteData.filter(t=>t.date>=new Date('2021-01-01') )
Insert cell
data.filter(t=>( (t.title).toLowerCase()).indexOf('silver')>-1 || ( (t.title).toLowerCase()).indexOf('slv')>-1)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3.sum(data, t=>t.score)
Insert cell
Insert cell
Insert cell
hedgeData = data.filter( t=>t.title.toLowerCase().includes('hedg')||(t.selftext &&t.selftext.toLowerCase().includes('hedg')) )
Insert cell
hedgeData.map(t=>t.title)
Insert cell
secData = data.filter( t=>t.title.toLowerCase().includes('sec')||(t.selftext &&t.selftext.toLowerCase().includes('sec')) )
Insert cell
secData.map(t=>t.title)
Insert cell
Insert cell
flairData = data.filter(t=> t.link_flair_text=='Meme') // YOLO: 70; Discussion: 193; Meme: 206;
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require("d3@5")
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