Published
Edited
Apr 30, 2021
3 forks
32 stars
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
Insert cell
Insert cell
Insert cell
Insert cell
html`
<link rel="stylesheet" href="${fonturl}">

<style>
@font-face {
font-family: 'xkcdscript';
src: url(${fonturl}) format('woff')
}

body, svg {
font-family: 'xkcdscript';
}
</style>
`
Insert cell
Insert cell
Insert cell
import {Text} from "@observablehq/inputs"
Insert cell
w = width
Insert cell
function titleSlice(txt){
let buf = []

if (txt.length>16){
let txtSplit = txt.split(" ")
let pushString ="";

for (let i = 0; i < txtSplit.length; ++i) {
if (pushString.length<16){

pushString= pushString+ txtSplit[i] + " "
} else {
buf.push(pushString)
pushString= txtSplit[i] + " "
}
}

if (pushString.length>0){
buf.push(pushString)
}
}else{
buf.push(txt)
}

return buf
}
Insert cell
h = height
Insert cell
Insert cell
image = FileAttachment("types_of_scientific_paper_2x.png").image()
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