Public
Edited
Feb 9, 2024
Insert cell
Insert cell
frames = {

let text = `Vegan / Plants = |Veg| / |Plt|
Health / Wellness = |Hlth| / |Well|
Sustainability / Eco = |Sus| / |Eco|
Sex Positive/Intimacy = |S+|/|Int|
Simplicity / Minimalism = |Simp| / |Mini|
Fun / Play = |Fun| / |Play|
Happiness / Joy = |Hap| / |Joy|
Spiritual / Magic = |Spir|/|Mag|
Nature / Animals = |Natr| / |Anm|
Peace / Rest = |Peac| / |Rest|
Love/Kindness/Care = |Lov|/|Kind|/|Cr|
Giving / Abundance = |Giv| / |Abu|
Social / Connection = |Scl| / |Cnct|
Learning / Understanding = |Lrn| / |Und|
Healing / Transforming = |Heal| / |Tsfm|
Cooperation / Oneness = |Coop| / |One|
Freedom / Liberation = |Free| / |Lib|
Movement / Active = |Mov| / |Actv|
Innovation / Creativity = |Inv| / |Cre|
Exploration/Curious = |Exp|/|Cur|
Resilience / Strength = |Resi| / |Strg|
Appreciation / Others = |Appr| / |Oth|
Feminism / Women = |Fem| / |Wom|
Truth / Insights = |Tru| / |In|
Art / Expression = |Art| / |Exps|
Building / Making = |Bld| / |Mk|`
// Split the text into lines
let lines = text.trim().split('\n');

let lists = lines.map((row, idx) => {

let parts = row.split('=')
let long = parts[0].trim().split('/')
long = long.map(word => word.trim())
let short = parts[1].trim().split('/')
short = short.map(word => word.trim().replace(/\|/g, ''))

let id = short[0].toLowerCase()

let pref = 0

return {id, pref, long, short}
})

return lists
}
Insert cell
JSON.stringify(frames)
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