Public
Edited
Apr 7
Insert cell
Insert cell
Insert cell
Insert cell
color1 = d3.scaleDiverging([-20, 0,20], d3.interpolateRdBu)
Insert cell
color1(5)
Insert cell
Bourse US - Depuis_mercredi.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
{
let data_bourse_s2 =
data_bourse.map(
function (d) {
let evolution_parsed = +(d.New_evo2.replace(',', '.').replace('%', ''))
let thisObj = {}
thisObj['ticker'] = d.ticker
thisObj['name'] = d.names
thisObj['Evolution'] = evolution_parsed
thisObj['color'] = color1(evolution_parsed)
return thisObj
})
const out = html`<div><p></p></div>`
yield out;
let this_text = (data_bourse_s2.map(d=> `${d.name}: ${d.color}`).join('<br>'))
out.querySelector("p").innerHTML=this_text
}
Insert cell
data_secteurs = FileAttachment("Bourse US - Feuille 4 (2).csv").csv()
Insert cell
{
let data_secteurs2 =
data_secteurs.map(
function (d) {
let evolution_parsed = +(d.Evolution.replace(',', '.').replace('%', ''))
let thisObj = {}
thisObj['secteur'] = d.secteur
thisObj['Evolution'] = evolution_parsed
thisObj['color'] = color1(evolution_parsed)
return thisObj
})
const out = html`<div><p></p></div>`
yield out;
let this_text = (data_secteurs2.map(d=> `${d.secteur}: ${d.color}`).join('<br>'))
out.querySelector("p").innerHTML=this_text
}
Insert cell
data_industries = FileAttachment("Bourse US - Feuille 5 (1).csv").csv()
Insert cell
{
let data_industries2 =
data_industries.map(
function (d) {
let evolution_parsed = +(d.Evolution.replace(',', '.').replace('%', ''))
let thisObj = {}
thisObj['Categorie'] = d.Categorie
thisObj['Evolution'] = evolution_parsed
thisObj['color'] = color1(evolution_parsed)
return thisObj
})
const out = html`<div><p></p></div>`
yield out;
let this_text = (data_industries2.map(d=> `${d.Categorie}: ${d.color}`).join('<br>'))
out.querySelector("p").innerHTML=this_text
}
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