# nas-quickstats

> A simple node library for accessing the National Agriculture Service QuickStats database.

Latest version **0.1.0** (published 2016-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install nas-quickstats
pnpm add nas-quickstats
yarn add nas-quickstats
bun add nas-quickstats
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-03-13 |
| First published | 2016-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Robby N Shaw |
| Maintainers | robbynshaw |
| Keywords | database, agriculture, nas, government |

## Links

- npm: https://www.npmjs.com/package/nas-quickstats
- Repository: https://github.com/robbynshaw/nas-quickstats
- Issues: https://github.com/robbynshaw/nas-quickstats/issues
- npm.io page: https://npm.io/package/nas-quickstats

## Recent versions

- 0.1.0 (latest) — 2016-03-13

## README

# nas-quickstats
A simple node library for accessing the National Agriculture Service QuickStats database.

For a quick example...

    $node test

API
------------------
1.  Add the library into your file

    ```javascript
    var nas = require('nas-quickstats');
    ```

1.  Declare your key that you obtained from the
    [nas site](http://quickstats.nass.usda.gov/api 'nas api').

    ```javascript
    nas.key = 'asldfaj-sadfas-adsf-asdfsdf';
    ```

1.  Create a query using the variables from the
    [nas site](http://quickstats.nass.usda.gov/api 'nas api').

    ```javascript
    var q = nas.query({
      commodity_desc: 'BEETS',
      statisticcat_desc: 'YIELD'
    });
    ```

    'query' takes an options object which can contain any
    number of key value pairs describing the query.

1.  Create a request declaring a type and passing in your query
    and a callback.

    Available types are: get, params, and counts.

    ```javascript
    var r = nas.request(nas.type.get, q, function(data){
      console.log(data);
    });
    ```

1.  Send the request, and be on your merry way.

    ```javascript
    r.send();
    ```


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.

---
_Source: https://npm.io/package/nas-quickstats · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
