Published
Edited
Oct 10, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof singersD = Inputs.table(did, {})
Insert cell
did = {
let what = []
let whom = _.trim(who) // https://lodash.com/docs/4.17.15#trim (remove space)

giitaayanW.map((d) => {
let singer = _.split(d.Singers, ','); // lodash library - split as there baybe more than artist
singer.map( s => { if (_.trim(s) === whom) what.push(d) })

let comp = _.split(d.Composer, ',');
comp.map( c => { if (_.trim(c) === whom) what.push(d) })

let lyric = _.split(d.Lyricist, ',');
lyric.map( c => { if (_.trim(c) === whom) what.push(d) })
})

return _.uniq(what) //
}
Insert cell
allSingers = {
let sings = []
giitaayanW.map(d => {
let singer = _.split(d.Singers, ','); // lodash library - split as there are more than one singer sometimes
singer.map( s => sings.push(_.trim(s)) )
})
return _.uniq(sings) // https://lodash.com/docs/4.17.15#uniq
}
Insert cell
giitaayanW = FileAttachment("giitaayanW.json").json()
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