Published
Edited
Jan 11, 2019
ვალუტის კურსის ინტერაქტიული ანალიზი
Freelance vs Not Freelance
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
Insert cell
Insert cell
Array.from(domTar.querySelectorAll('tbody tr td:nth-child(1)'))
.map(d=>d.innerText.trim())
.filter((d,i)=>i<11)
Insert cell
ccyData={
var sell = Array.from(domTar.querySelectorAll('tbody tr td:nth-child(3)')).map(d=>d.innerText.trim());
var buy = Array.from(domTar.querySelectorAll('tbody tr td:nth-child(2)')).map(d=>d.innerText.trim());
var comp = Array.from(domTar.querySelectorAll('tbody tr td:nth-child(1)')).map(d=>d.innerText.trim())
.filter((d,i)=>i<11)

var result = comp.map((d,i)=>{
if(d=="საქართველოს ბანკი"){
return bgOpt;
}
return {
comp:d,
buy:+buy[i],
sell:+sell[i]
}
});
// var result = [bgOpt];
result = result.filter(d=>d.comp!='ვითიბი ბანკი');
var maxBuy = d3.max(result,d=>d.buy);
var minSell = d3.min(result,d=>d.sell);
var minBuy = d3.min(result,d=>d.buy);
var maxSell = d3.max(result,d=>d.sell);
result.forEach(r=>{
r.comp = r.comp.replace('ბანკი','')
r.maxBuy="";
r.minSell="";
if(r.buy==minBuy){
r.minBuy=true;
}
if(r.buy==maxBuy){
r.maxBuy=true;
}
if(r.sell==minSell){
r.minSell=true;
}
if(r.sell==maxSell){
r.maxSell=true;
}
if(isNaN(r.buy)){
r.buy=0
}
if(isNaN(r.sell)){
r.sell=0
}
r.avg = (r.buy+r.sell)/2;
r.bloombergDiff = Math.round((r.avg-price)*10000)/10000
r.nbgDiff = Math.round((r.avg-nbgCcy)*10000)/10000
});
result.sort((a,b)=>a.comp>b.comp);
result.unshift({
comp:'NBG',
buy:nbgCcy,
sell:nbgCcy
})
result.unshift({
comp:'Bloomberg',
buy:price,
sell:price
})
result.forEach(r=>r.dateTime = new Date())
instituteDataHistory.push(result);

return result;
}
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
Insert cell
import {button} from "@jashkenas/inputs"
Insert cell
import {load,scrape} from "@bumbeishvili/fetcher"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

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