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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more