https://zeit.co/now (main page)
https://zeit.co/download (client app) --> just created this service https://files-yvdgbhwnzr.now.sh by dragging inde.js and package.json from https://github.com/jonasalmeida/apollo
The goal is to deploy a GraphQL middle layer that is called from a web application.
Share your achievements:
Chalange:
Get data from one of the SPARCS years and weave APIs for functions that query them or do something else
Almeida JS, Hajagos J, Saltz J, Saltz M. (2018) Serverless OpenHealth at data commons scale - traversing the 20 million patient records of New York's SPARCS dataset in real-time. PeerJ Preprints 6:e27209v1 https://doi.org/10.7287/peerj.preprints.27209v1. (see table 1 in https://peerj.com/preprints/27209.pdf).
From table 1:
urls={
"2009":{url:"https://health.data.ny.gov/resource/s8d9-z734.json"},
"2010":{url:"https://health.data.ny.gov/resource/dpew-wqcg/json"},
"2011":{url:"https://health.data.ny.gov/resource/n5y9-zanf.json"},
"2012":{url:"https://health.data.ny.gov/resource/rv8x-4fm3.json"},
"2013":{url:"https://health.data.ny.gov/resource/tdf6-7fpk.json"},
"2014":{url:"https://health.data.ny.gov/resource/pzzw-8zdv.json"},
"2015":{url:"https://health.data.ny.gov/resource/82xm-y6g8.json"},
"2016":{url:"https://health.data.ny.gov/resource/gnzp-ekau.json"}
}
Node doesn't have fetch as the browser so you may want to require it from https://www.npmjs.com/package/node-fetch
How to query Socrata : https://dev.socrata.com/docs/queries/, for example, to get just the first record you could do https://health.data.ny.gov/resource/gnzp-ekau.json?$limit=1
For examples of SoQL composition see links in the user-interface created by operating http://bit.ly/loadsparcs