Public
Edited
Feb 9, 2023
Insert cell
Insert cell
url = "http://export.arxiv.org/api/query?search_query=cat:cs.AI&max_results=10&sortBy=submittedDate&sortOrder=descending"
Insert cell
result = fetch("https://ohq-cors.onrender.com/" + url).then((r) => r.text()) //
Insert cell
parser = new DOMParser()
Insert cell
doc = parser.parseFromString(await result, "text/xml")
Insert cell
data = [...doc.querySelectorAll("entry")]
.map((i) =>
[
i.querySelector("title"),
i.querySelector("id"),
i.querySelector("published"),
i.querySelector("summary")
].map((j) => j.textContent)
)
.map(
(i) => `Title: ${i[0]}

ID: ${i[1].replace("http://arxiv.org/abs/", "")}

Published: ${i[2]}

Abstract: ${i[3].trim()}

---`
)
.join("\n")
Insert cell
Insert cell
["- dog", "- cat"].join("\n\n").split(/\n\n-?\s+/g)
// .slice(0, 1)
Insert cell
[..."hi"].map((s, idx) => "hi".charCodeAt(idx))
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