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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more