Public
Edited
Jan 7, 2023
1 fork
25 stars
Insert cell
Insert cell
mylikes.csv
SELECT *
FROM "mylikes"
WHERE 1
-- AND title LIKE 'Hello%'
-- AND YEAR(time) >= 2022
-- AND creator_login IN ('oliviafvane', 'mourner')
ORDER BY "time" DESC
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
WordCloud(words, {
width,
word: d => d[0],
size: d => d[0][1],
maxWords: 1400,
padding: 3,
height: 500,
invalidation // a promise to stop the simulation when the cell is re-run
})
Insert cell
import {WordCloud} from "@d3/word-cloud"
Insert cell
words = [
...d3
.rollup(
d3
.map(searched, (d) => d.title)
.join(" ")
.split(/[\s.]+/g)
.map((w) => w.replace(/^[“‘"\-—()\[\]{}]+/g, ""))
.map((w) => w.replace(/[;:.!?()\[\]{},"'’”\-—]+$/g, ""))
.map((w) => w.replace(/['’]s$/g, ""))
.map((w) => w.substring(0, 30))
.map((w) => w.toLowerCase()),
(v) => v.length,
(d) => d
)
]
.filter(([w, c]) => w.length !== 2 && !stopwords.has(w))
Insert cell
stopwords = new Set("i,me,my,myself,we,us,our,ours,ourselves,you,your,yours,yourself,yourselves,he,him,his,himself,she,her,hers,herself,it,its,itself,they,them,their,theirs,themselves,what,which,who,whom,whose,this,that,these,those,am,is,are,was,were,be,been,being,have,has,had,having,do,does,did,doing,will,would,should,can,could,ought,i'm,you're,he's,she's,it's,we're,they're,i've,you've,we've,they've,i'd,you'd,he'd,she'd,we'd,they'd,i'll,you'll,he'll,she'll,we'll,they'll,isn't,aren't,wasn't,weren't,hasn't,haven't,hadn't,doesn't,don't,didn't,won't,wouldn't,shan't,shouldn't,can't,cannot,couldn't,mustn't,let's,that's,who's,what's,here's,there's,when's,where's,why's,how's,a,an,the,and,but,if,or,because,as,until,while,of,at,by,for,with,about,against,between,into,through,during,before,after,above,below,to,from,up,upon,down,in,out,on,off,over,under,again,further,then,once,here,there,when,where,why,how,all,any,both,each,few,more,most,other,some,such,no,nor,not,only,own,same,so,than,too,very,say,says,said,shall,de,vs,en,la,via,sur,ca,w,par,get,now,un,les,use".split(","))
Insert cell
Insert cell
access_levels = ({
shared: 'unlisted',
public: 'published',
live_unlisted: 'live (unlisted)',
live: 'live'
})
Insert cell
expandEntry = ({
id,
title,
creator_login,
creator_name,
update_time,
owner_is_team,
edits,
likes,
thumbnail,
url
}, i) => ({
id,
title,
likes,
update_time,
thumbnail: thumbnail ?? "6f32214ede696164ab6d35744421774dae627cdf849963720d9b1ee234f86738", // default thumbnail
version: edits,
owner: {
login: creator_login,
name: creator_name,
type: owner_is_team ? "team" : "individual",
},
creator: {
},
slug: url.split('/').slice(1).join('/')
})
Insert cell
import {notebookTable} from "@mootari/sortable-notebook-list"
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more