Published
Edited
Nov 17, 2021
3 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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mutable counter1 = 0;
Insert cell
mutable counter2 = 0;
Insert cell
mutable counter3 = 0;
Insert cell
mutable counter4 = 0;
Insert cell
mutable counter5 = 0;
Insert cell
mutable counter6 = 0;
Insert cell
mutable counter7 = 0;
Insert cell
sheet = { // this is a JS Array of Objects; the key-value pairs consist of the column headers and the cell data
let sheet =[];
const url = "https://docs.google.com/spreadsheets/d/e/2PACX-1vSuH6U3a_e5HJxxguAJjVuNgxyI5wCRd-24f_RyaFE1FeC8HUBFmZVmhcqG74OdO_vPJxGeuwC_s0nh/pub?gid=1094830764&single=true&output=csv";
const spreadsheet = await d3.csv(url).then(data => data.forEach(d => sheet.push(d))); // d3.csv returns a Promise
return sheet;
}
Insert cell
playMusic = _url => {
audio.playAudio(_url);
audio.playAudio(_url);
audio.playAudio(_url);
audio.playAudio(_url);
}
Insert cell
playMusic2 = _url => {
audio.playAudio(_url);
}
Insert cell
playMusic3 = _url => {
audio.playAudio(_url);
}
Insert cell
playMusic4 = _url => {
audio.playAudio(_url);
audio.playAudio(_url);
}
Insert cell
playMusic5 = _url => {
audio.playAudio(_url);
audio.playAudio(_url);
}
Insert cell
mutable state = md`the audio is not playing at the moment`
Insert cell
audio = AudioInstance()
Insert cell
import {button} from "@jashkenas/inputs"

Insert cell
AudioInstance = () => {
let _a = new Audio();
_a.addEventListener(
'loadeddata',
() => (mutable state = md`the audio is loaded`)
);
_a.addEventListener(
'playing',
() => (mutable state = md`the audio is playing`)
);
_a.addEventListener(
'ended',
() => (mutable state = md`the audio has finished playing`)
);
_a.playAudio = _url => {
_a.setAttribute('src', _url);
_a.setAttribute('src', _url);
_a.load();
_a.play();
};
return _a;
}
Insert cell
soundUrl4 = _files[Aksharas2.indexOf(place3[counter17])]
Insert cell
soundUrl = _files[Aksharas2.indexOf(place3[0])]
Insert cell
soundUrl2 = _files[Aksharas2.indexOf(place3[1])]
Insert cell
soundUrl3 = _files[Aksharas2.indexOf(place3[counter18])]
Insert cell
playMusic(soundUrl.url)

Insert cell
playMusic2(soundUrl2.url)
Insert cell
playMusic3(soundUrl3.url)
Insert cell
playMusic4(soundUrl4.url)
Insert cell
Insert cell
Insert cell
Insert cell
_files = {
const fetchUrls = files.map(f =>
f.url().then(url => ({ url, name: f.name }))
);
const urls = await Promise.all(fetchUrls);
return urls;
}
Insert cell
sheetHeadings = Object.keys(sheet[0])
Insert cell
html`
<link type="text/css" href="https://gist.github.com/JackKausch/5cd67eab39732db672b1c29abb617b28" rel="stylesheet">
`
Insert cell
import { AngleSlider } from '@tomktjemsland/inputs'
Insert cell
import {textarea} from "@jashkenas/inputs"
Insert cell
//import { HorizontalStack } from '@tomktjemsland/inputs'
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
manual
Insert cell
a = {
b
return !this;
}
Insert cell
Insert cell
chart4.update(place)
Insert cell
Insert cell
Insert cell
Insert cell
chart5.update(place2)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
manual[2]
Insert cell
mutable counter = 0;
Insert cell
import { analytics } from '@chrispahm/simple-privacy-friendly-web-analytics'
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