nas-quickstats
A simple node library for accessing the National Agriculture Service QuickStats database.
For a quick example...
$node test
API
-
Add the library into your file
var nas = ; -
Declare your key that you obtained from the nas site.
naskey = 'asldfaj-sadfas-adsf-asdfsdf'; -
Create a query using the variables from the nas site.
var q = nas;'query' takes an options object which can contain any number of key value pairs describing the query.
-
Create a request declaring a type and passing in your query and a callback.
Available types are: get, params, and counts.
var r = nas; -
Send the request, and be on your merry way.
r;
More details about the NAS api itself can be found @ http://quickstats.nass.usda.gov/api. Be sure to obtain an API key (it's instant) and read the terms and conditions of use.
This product uses the NASS API but is not endorsed or certified by NASS.