Published
Edited
Sep 27, 2020
1 fork
Importers
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
function setPetSelection(pet) {
let val = ''
if( pet !== '') {
if( pet === "Dog") {
val = hat1
} else if (pet === "Cat") {
val = hat2
}else if ( pet === "Other/None") {
val = hat3
}
}
return val
}
Insert cell
function setActivitySelection(activity) {
let val = ''
if( activity !== '') {
if( activity === "Sleeping") {
val = wand1
} else if (activity === "Reading") {
val = wand2
}else if ( activity === "Hiking") {
val = wand3
} else if ( activity === "Yoga") {
val = wand4
}
}
return val
}
Insert cell
function monsterImage(selRole, selLoc, selLang, setPet, setActivity){
let val = monsterPlaceholder
if( selRole && selRole !== '') {
let eyes = setLanguage(selLang)
let mouth = setLocation(selLoc)
let hat = setPetSelection(setPet)
let wand = setActivitySelection(setActivity)
if( selRole === "Student") {
val = createMonster(1, eyes, mouth, hat, wand)
} else if (selRole === "Engineer") {
val = createMonster(2, eyes, mouth, hat, wand)
}else if ( selRole === "PM") {
val = createMonster(3, eyes, mouth, hat, wand)
} else if (selRole === "Data Scientist") {
val = createMonster(4, eyes, mouth, hat, wand)
} else if (selRole === "Other") {
val = createMonster(5, eyes, mouth, hat, wand)
}
} else {
val = createMonster(-1, '', '', '', '')
}
return val
}
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
import {radio} from "@jashkenas/inputs"
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