Skip to content

Instantly share code, notes, and snippets.

@eayoungs
Last active February 11, 2017 00:40
Show Gist options
  • Save eayoungs/da282fcd300dc6d5766f2df15fad569a to your computer and use it in GitHub Desktop.
Save eayoungs/da282fcd300dc6d5766f2df15fad569a to your computer and use it in GitHub Desktop.
Soda-Js adapted to C4SF Energy & Env project
/* SODA Library for importing the data-set: https://github.com/socrata/soda-js */
var soda = require('soda-js');
/* get the data and render the page */
var consumer = new soda.Consumer('data.sfgov.gov');
consumer.query()
.withDataset('j2j3-acqj')
.limit(2000)
/* .where({ namelast: 'SMITH' })
.order('namelast') */
.getRows()
.on('success', function(rows) { console.log(rows); })
.on('error', function(error) { console.error(error); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment