Published
Edited
Mar 10, 2020
1 fork
6 stars
Insert cell
Insert cell
Insert cell
graphqlServer = "https://api.kivaws.org/graphql"
Insert cell
Insert cell
graph = graphql(graphqlServer)
Insert cell
Insert cell
countries = ["US", "BR", "FR", "UR"]
Insert cell
lendsQuery = graph(`
{
lend {
loans (filters: {country: ${JSON.stringify(countries)}}, limit: 20) {
totalCount
values {
name
id
loanAmount
image {
url(presetSize: loan_default)
}
activity {
name
}
geocode {
country {
isoCode
name
}
}
lenders (limit: 0) {
totalCount
}
... on LoanPartner {
partnerName
}
... on LoanDirect {
trusteeName
}
}
}
}
}
`)
Insert cell
Insert cell
data = lendsQuery()
Insert cell
Insert cell
Insert cell
graphql = require("graphql.js")
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