Public
Edited
Mar 6, 2024
Fork of Gaza deaths
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
statDiv("Deaths",10000)
Insert cell
Insert cell
width
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
telegramMessageData.slice().reverse()
Insert cell
Insert cell
Insert cell
compareHumDataAndManualData()
Insert cell
Insert cell
Insert cell
[...manualData].reverse().map(d=>({...d,date: new Date(d.timestamp)}));
Insert cell
Insert cell
Insert cell
Insert cell
combinedMOHData.slice(-10)
Insert cell
Insert cell
combinedMOHData = combineMOHData()
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
extractedTelegramMessageData.slice(-2)[0]
Insert cell
Insert cell
telegramMessageData = {
let a = allTelegramMessageData.filter(d=>d.deaths && d.injured).filter((d,i,a)=>!a[i+1]||d.timestamp < a[i+1].timestamp || d.deaths > a[i+1].deaths);

if (a.length < 2) {
fetch20();
}
return a;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function getProxyURL(url,useCache=false) {
let proxyURL = (useCache ? config.corsProxyWithCache : config.corsProxy) + encodeURIComponent(url);
console.log("getProxyURL",proxyURL);
return proxyURL;
}
Insert cell
viewof fetchOldMessages = Inputs.button("Fetch a page of old telegram messages",{reduce: fetch20})
Insert cell
mutable fetchedNewData = false
Insert cell
function fetch20() {
let beforeMessageNumber = Math.ceil((firstTelegramMessage.id)/20)*20;
console.log("Fetching messages before "+beforeMessageNumber);
fetchTelegramChannelAndExtract(config.telegramChannel, beforeMessageNumber);
}
Insert cell
firstTelegramMessage = {
fetchedNewData;
return allTelegramMessageData.filter(x => typeof x!==undefined).shift();
}

Insert cell
lastTelegramMessage = {
fetchedNewData;
return allTelegramMessageData.slice(-1)[0];
}

Insert cell
Insert cell
//allTelegramMessageData = fetchChannelHistory(config.telegramChannel,0,3800)
Insert cell
allTelegramMessageDataFiltered = {
fetchedNewData;
let a = allTelegramMessageData.filter(d=>d.deaths).filter((d,i,a)=>!a[i+1]||d.timestamp < a[i+1].timestamp);
return a;
}
Insert cell
allTelegramMessageData =[];
Insert cell
Insert cell
Insert cell
Insert cell
html`<style>
p { max-width: none; }
table { max-width: none; }
tr { max-width: none; }
td { max-width: none; }
</style>`
Insert cell
Insert cell
Insert cell
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