Public
Edited
Jul 2, 2024
2 forks
Importers
Insert cell
Insert cell
Insert cell
cmiConstituentsAugust = FileAttachment("CMI_constituents_20220818.json").json()
Insert cell
cmiConstituentsSeptember20220902 = FileAttachment("CMI - 20220902.csv").csv()
Insert cell
cmiConstituentsSeptember20220929 = FileAttachment("CMI_20220929@1.json").json()
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
cmiConstituentsNovember20221102 = FileAttachment(
"CMI_constituents_20221102_urls.json"
).json()
Insert cell
CMI_Constituents_20240702.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
latestCMIConstituents = cmiConstituents20240702.filter(
(a) => a.symbolDisplay !== "LRC" && a.symbolDisplay !== "REN"
)
Insert cell
latestCMIAssets = latestCMIConstituents.map(({ symbolDisplay, symbol }) => ({
symbol: symbol.toLowerCase(),
symbolDisplay
}))
Insert cell
latestCMIAssetsFull = latestCMIConstituents.map((a) => ({
apiSymbol: a.symbol.toLowerCase(),
value: a.symbolDisplay,
label: a.name,
sector: a.dacsSector
}))
Insert cell
latestCMIAssetsDisplay = latestCMIConstituents.map((a) =>
a.symbolDisplay.toLowerCase()
)
Insert cell
assetsBySector = R.pipe(R.groupBy(R.prop("sector")))(latestCMIAssetsFull)
Insert cell
R = require("ramda")
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