Published
Edited
Aug 13, 2021
Importers
Insert cell
Insert cell
Insert cell
Insert cell
array_of_dois = (["10.1109/TVCG.2016.2599030",
"10.1109/TVCG.2011.185",
"10.1109/MCG.2018.032421649",
"10.1038/sdata.2016.18",
"10.1198/jcgs.2009.07098"])
Insert cell
Insert cell
collect_responses = {
let temp = [];
for (let i = 0; i < array_of_dois.length; i++) {
let query = `https://api.semanticscholar.org/v1/paper/` + array_of_dois[i];
let SS_response = await fetch(query).then(response => response.json());
yield temp = temp.concat(SS_response);
await Promises.delay(throttle_milliseconds); // hard-coded delay to stay within SemanticScholar API limits
}
return temp;
}
Insert cell
Insert cell
Insert cell
current_progress = collect_responses.length / array_of_dois.length
Insert cell
Insert cell
number_of_requests = 100
Insert cell
time_window_minutes = 5
Insert cell
throttle_milliseconds = (time_window_minutes * 60)/number_of_requests * 1000
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