@stdlib/datasets-berndt-cps-wages-1985 0.0.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +36 -79
- package/SECURITY.md +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/main.js +0 -1
- package/package.json +6 -20
- package/bin/cli +0 -100
- package/docs/repl.txt +0 -43
- package/docs/types/test.ts +0 -32
- package/docs/usage.txt +0 -9
- package/etc/cli_opts.json +0 -17
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2024 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -18,6 +18,17 @@ limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
-->
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
<details>
|
|
23
|
+
<summary>
|
|
24
|
+
About stdlib...
|
|
25
|
+
</summary>
|
|
26
|
+
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
|
|
27
|
+
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
|
|
28
|
+
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
|
|
29
|
+
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
|
|
30
|
+
</details>
|
|
31
|
+
|
|
21
32
|
# CPS Wages Data
|
|
22
33
|
|
|
23
34
|
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
|
|
@@ -127,76 +138,7 @@ plot = new Plot( [ x ], [ y ], opts );
|
|
|
127
138
|
|
|
128
139
|
<!-- /.examples -->
|
|
129
140
|
|
|
130
|
-
* * *
|
|
131
|
-
|
|
132
|
-
<section class="cli">
|
|
133
|
-
|
|
134
|
-
## CLI
|
|
135
|
-
|
|
136
|
-
<section class="installation">
|
|
137
|
-
|
|
138
|
-
## Installation
|
|
139
|
-
|
|
140
|
-
To use the module as a general utility, install the module globally
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
npm install -g @stdlib/datasets-berndt-cps-wages-1985
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
</section>
|
|
147
|
-
|
|
148
|
-
<!-- CLI usage documentation. -->
|
|
149
|
-
|
|
150
|
-
<section class="usage">
|
|
151
|
-
|
|
152
|
-
### Usage
|
|
153
|
-
|
|
154
|
-
```text
|
|
155
|
-
Usage: berndt-cps-wages-1985 [options]
|
|
156
|
-
|
|
157
|
-
Options:
|
|
158
|
-
|
|
159
|
-
-h, --help Print this message.
|
|
160
|
-
-V, --version Print the package version.
|
|
161
|
-
--format fmt Output format: 'csv' or 'ndjson'.
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
</section>
|
|
165
|
-
|
|
166
|
-
<!-- /.usage -->
|
|
167
|
-
|
|
168
|
-
<section class="notes">
|
|
169
|
-
|
|
170
|
-
### Notes
|
|
171
|
-
|
|
172
|
-
- The CLI supports two output formats: comma-separated values ([CSV][csv]) and newline-delimited JSON ([NDJSON][ndjson]). The default output format is [CSV][csv].
|
|
173
|
-
|
|
174
|
-
</section>
|
|
175
|
-
|
|
176
|
-
<!-- /.notes -->
|
|
177
|
-
|
|
178
|
-
<section class="examples">
|
|
179
|
-
|
|
180
|
-
### Examples
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
$ berndt-cps-wages-1985
|
|
184
|
-
education,south,gender,experience,union,wage,age,race,occupation,sector,married
|
|
185
|
-
8,0,female,21,1,5.1,35,hispanic,other,manufacturing,0
|
|
186
|
-
9,0,female,42,1,4.95,57,white,other,manufacturing,0
|
|
187
|
-
12,0,male,1,1,6.67,19,white,other,manufacturing,1
|
|
188
|
-
12,0,male,4,1,4,22,white,other,other,1
|
|
189
|
-
12,0,male,17,1,7.5,35,white,other,other,0
|
|
190
|
-
...
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
</section>
|
|
194
|
-
|
|
195
|
-
<!-- /.examples -->
|
|
196
|
-
|
|
197
|
-
</section>
|
|
198
141
|
|
|
199
|
-
<!-- /.cli -->
|
|
200
142
|
|
|
201
143
|
<section class="references">
|
|
202
144
|
|
|
@@ -222,6 +164,11 @@ The data files (databases) are licensed under an [Open Data Commons Public Domai
|
|
|
222
164
|
|
|
223
165
|
<section class="related">
|
|
224
166
|
|
|
167
|
+
## See Also
|
|
168
|
+
|
|
169
|
+
- <span class="package-name">[`@stdlib/datasets-berndt-cps-wages-1985-cli`][@stdlib/datasets-berndt-cps-wages-1985-cli]</span><span class="delimiter">: </span><span class="description">CLI package for use as a command-line utility.</span>
|
|
170
|
+
|
|
171
|
+
|
|
225
172
|
</section>
|
|
226
173
|
|
|
227
174
|
<!-- /.related -->
|
|
@@ -247,7 +194,7 @@ For more information on the project, filing bug reports and feature requests, an
|
|
|
247
194
|
|
|
248
195
|
## Copyright
|
|
249
196
|
|
|
250
|
-
Copyright © 2016-
|
|
197
|
+
Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
251
198
|
|
|
252
199
|
</section>
|
|
253
200
|
|
|
@@ -257,11 +204,13 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
|
257
204
|
|
|
258
205
|
<section class="links">
|
|
259
206
|
|
|
207
|
+
[@stdlib/datasets-berndt-cps-wages-1985-cli]: https://www.npmjs.com/package/@stdlib/datasets-berndt-cps-wages-1985-cli
|
|
208
|
+
|
|
260
209
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/datasets-berndt-cps-wages-1985.svg
|
|
261
210
|
[npm-url]: https://npmjs.org/package/@stdlib/datasets-berndt-cps-wages-1985
|
|
262
211
|
|
|
263
|
-
[test-image]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/actions/workflows/test.yml/badge.svg
|
|
264
|
-
[test-url]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/actions/workflows/test.yml
|
|
212
|
+
[test-image]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/actions/workflows/test.yml/badge.svg?branch=v0.2.0
|
|
213
|
+
[test-url]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/actions/workflows/test.yml?query=branch:v0.2.0
|
|
265
214
|
|
|
266
215
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/datasets-berndt-cps-wages-1985/main.svg
|
|
267
216
|
[coverage-url]: https://codecov.io/github/stdlib-js/datasets-berndt-cps-wages-1985?branch=main
|
|
@@ -273,19 +222,27 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
|
273
222
|
|
|
274
223
|
-->
|
|
275
224
|
|
|
225
|
+
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
226
|
+
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
|
|
227
|
+
|
|
228
|
+
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
229
|
+
|
|
230
|
+
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
231
|
+
|
|
232
|
+
[cli-section]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985#cli
|
|
233
|
+
[cli-url]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/tree/cli
|
|
234
|
+
[@stdlib/datasets-berndt-cps-wages-1985]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/tree/main
|
|
235
|
+
|
|
276
236
|
[umd]: https://github.com/umdjs/umd
|
|
277
237
|
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
278
238
|
|
|
279
239
|
[deno-url]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/tree/deno
|
|
240
|
+
[deno-readme]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/blob/deno/README.md
|
|
280
241
|
[umd-url]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/tree/umd
|
|
242
|
+
[umd-readme]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/blob/umd/README.md
|
|
281
243
|
[esm-url]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/tree/esm
|
|
282
|
-
|
|
283
|
-
[
|
|
284
|
-
[chat-url]: https://gitter.im/stdlib-js/stdlib/
|
|
285
|
-
|
|
286
|
-
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
287
|
-
|
|
288
|
-
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
244
|
+
[esm-readme]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/blob/esm/README.md
|
|
245
|
+
[branches-url]: https://github.com/stdlib-js/datasets-berndt-cps-wages-1985/blob/main/branches.md
|
|
289
246
|
|
|
290
247
|
[csv]: https://tools.ietf.org/html/rfc4180
|
|
291
248
|
|
package/SECURITY.md
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";var s=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var t=s(function(f,a){
|
|
2
|
+
var i=require("path").resolve,n=require('@stdlib/fs-read-json/dist').sync,o=i(__dirname,"..","data","data.json"),u={encoding:"utf8"};function v(){var r=n(o,u);if(r instanceof Error)throw r;return r}a.exports=v
|
|
3
|
+
});var d=t();module.exports=d;
|
|
4
|
+
/** @license Apache-2.0 */
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../lib/main.js", "../lib/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar resolve = require( 'path' ).resolve;\nvar readJSON = require( '@stdlib/fs-read-json' ).sync;\n\n\n// VARIABLES //\n\nvar fpath = resolve( __dirname, '..', 'data', 'data.json' );\nvar opts = {\n\t'encoding': 'utf8'\n};\n\n\n// MAIN //\n\n/**\n* Returns a random sample of 534 workers from the Current Population Survey (CPS) from 1985.\n*\n* ## Notes\n*\n* - This function synchronously reads data from disk for each invocation. Such behavior is intentional and so is the avoidance of `require`. We assume that invocations are infrequent, and we want to avoid the `require` cache. This means that we allow data to be garbage collected and a user is responsible for explicitly caching data.\n*\n* @throws {Error} unable to read data\n* @returns {ObjectArray} data\n*\n* @example\n* var data = dataset();\n* // returns [ {...}, {...}, ... ]\n*/\nfunction dataset() {\n\tvar data = readJSON( fpath, opts );\n\tif ( data instanceof Error ) {\n\t\tthrow data;\n\t}\n\treturn data;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dataset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* A random sample of 534 workers from the Current Population Survey (CPS) from 1985.\n*\n* @module @stdlib/datasets-berndt-cps-wages-1985\n*\n* @example\n* var dataset = require( '@stdlib/datasets-berndt-cps-wages-1985' );\n*\n* var data = dataset();\n* // returns [{...},{...},...]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
|
+
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,MAAO,EAAE,QAC5BC,EAAW,QAAS,sBAAuB,EAAE,KAK7CC,EAAQF,EAAS,UAAW,KAAM,OAAQ,WAAY,EACtDG,EAAO,CACV,SAAY,MACb,EAmBA,SAASC,GAAU,CAClB,IAAIC,EAAOJ,EAAUC,EAAOC,CAAK,EACjC,GAAKE,aAAgB,MACpB,MAAMA,EAEP,OAAOA,CACR,CAKAN,EAAO,QAAUK,IC3BjB,IAAIE,EAAO,IAKX,OAAO,QAAUA",
|
|
6
|
+
"names": ["require_main", "__commonJSMin", "exports", "module", "resolve", "readJSON", "fpath", "opts", "dataset", "data", "main"]
|
|
7
|
+
}
|
package/docs/types/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/main.js
CHANGED
|
@@ -41,7 +41,6 @@ var opts = {
|
|
|
41
41
|
*
|
|
42
42
|
* - This function synchronously reads data from disk for each invocation. Such behavior is intentional and so is the avoidance of `require`. We assume that invocations are infrequent, and we want to avoid the `require` cache. This means that we allow data to be garbage collected and a user is responsible for explicitly caching data.
|
|
43
43
|
*
|
|
44
|
-
*
|
|
45
44
|
* @throws {Error} unable to read data
|
|
46
45
|
* @returns {ObjectArray} data
|
|
47
46
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/datasets-berndt-cps-wages-1985",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A random sample of 534 workers from the Current Population Survey (CPS) from 1985.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
|
-
"bin": {
|
|
17
|
-
"berndt-cps-wages-1985": "./bin/cli"
|
|
18
|
-
},
|
|
19
16
|
"main": "./lib",
|
|
20
17
|
"browser": "./lib/browser.js",
|
|
21
18
|
"directories": {
|
|
@@ -43,25 +40,14 @@
|
|
|
43
40
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
44
41
|
},
|
|
45
42
|
"dependencies": {
|
|
46
|
-
"@stdlib/
|
|
47
|
-
"@stdlib/
|
|
48
|
-
"@stdlib/fs-read-json": "^0.0.x",
|
|
49
|
-
"@stdlib/streams-node-stdout": "^0.0.x",
|
|
50
|
-
"@stdlib/utils-copy": "^0.0.x"
|
|
43
|
+
"@stdlib/fs-read-json": "^0.2.0",
|
|
44
|
+
"@stdlib/utils-copy": "^0.2.0"
|
|
51
45
|
},
|
|
52
46
|
"devDependencies": {
|
|
53
|
-
"@stdlib/assert-is-browser": "^0.0.x",
|
|
54
|
-
"@stdlib/assert-is-plain-object-array": "^0.0.x",
|
|
55
|
-
"@stdlib/assert-is-windows": "^0.0.x",
|
|
56
|
-
"@stdlib/bench": "^0.0.x",
|
|
57
|
-
"@stdlib/fs-write-file": "^0.0.x",
|
|
58
|
-
"@stdlib/plot": "^0.0.x",
|
|
59
|
-
"@stdlib/process-exec-path": "^0.0.x",
|
|
60
|
-
"@stdlib/regexp-eol": "^0.0.x",
|
|
61
47
|
"proxyquire": "^2.0.0",
|
|
62
48
|
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
63
49
|
"istanbul": "^0.4.1",
|
|
64
|
-
"tap-
|
|
50
|
+
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
|
|
65
51
|
},
|
|
66
52
|
"engines": {
|
|
67
53
|
"node": ">=0.10.0",
|
|
@@ -107,7 +93,7 @@
|
|
|
107
93
|
"multicollinearity"
|
|
108
94
|
],
|
|
109
95
|
"funding": {
|
|
110
|
-
"type": "
|
|
111
|
-
"url": "https://
|
|
96
|
+
"type": "opencollective",
|
|
97
|
+
"url": "https://opencollective.com/stdlib"
|
|
112
98
|
}
|
|
113
99
|
}
|
package/bin/cli
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) 2018 The Stdlib Authors.
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
'use strict';
|
|
22
|
-
|
|
23
|
-
// MODULES //
|
|
24
|
-
|
|
25
|
-
var createReadStream = require( 'fs' ).createReadStream;
|
|
26
|
-
var resolve = require( 'path' ).resolve;
|
|
27
|
-
var readFileSync = require( '@stdlib/fs-read-file' ).sync;
|
|
28
|
-
var stdout = require( '@stdlib/streams-node-stdout' );
|
|
29
|
-
var CLI = require( '@stdlib/cli-ctor' );
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// MAIN //
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Main execution sequence.
|
|
36
|
-
*
|
|
37
|
-
* @private
|
|
38
|
-
*/
|
|
39
|
-
function main() {
|
|
40
|
-
var flags;
|
|
41
|
-
var cli;
|
|
42
|
-
|
|
43
|
-
// Create a command-line interface:
|
|
44
|
-
cli = new CLI({
|
|
45
|
-
'pkg': require( './../package.json' ),
|
|
46
|
-
'options': require( './../etc/cli_opts.json' ),
|
|
47
|
-
'help': readFileSync( resolve( __dirname, '..', 'docs', 'usage.txt' ), {
|
|
48
|
-
'encoding': 'utf8'
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// Get any provided command-line options:
|
|
53
|
-
flags = cli.flags();
|
|
54
|
-
if ( flags.help || flags.version ) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if ( flags.format === 'ndjson' ) {
|
|
58
|
-
ndjson();
|
|
59
|
-
} else {
|
|
60
|
-
csv();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Prints data as newline-delimited JSON (ndjson).
|
|
65
|
-
*
|
|
66
|
-
* @private
|
|
67
|
-
*/
|
|
68
|
-
function ndjson() {
|
|
69
|
-
var data;
|
|
70
|
-
var i;
|
|
71
|
-
|
|
72
|
-
data = require( './../data/data.json' );
|
|
73
|
-
for ( i = 0; i < data.length; i++ ) {
|
|
74
|
-
console.log( JSON.stringify( data[i] ) ); // eslint-disable-line no-console
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Prints data as lines of comma-separated values (CSV).
|
|
80
|
-
*
|
|
81
|
-
* @private
|
|
82
|
-
*/
|
|
83
|
-
function csv() {
|
|
84
|
-
var fpath = resolve( __dirname, '..', 'data', 'data.csv' );
|
|
85
|
-
createReadStream( fpath )
|
|
86
|
-
.pipe( stdout )
|
|
87
|
-
.on( 'close', onClose );
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Exits the CLI.
|
|
92
|
-
*
|
|
93
|
-
* @private
|
|
94
|
-
*/
|
|
95
|
-
function onClose() {
|
|
96
|
-
cli.close( 0 );
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
main();
|
package/docs/repl.txt
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
{{alias}}()
|
|
3
|
-
Returns a random sample of 534 workers from the Current Population Survey
|
|
4
|
-
(CPS) from 1985, including their wages and and other characteristics.
|
|
5
|
-
|
|
6
|
-
Each array element has the following eleven fields:
|
|
7
|
-
|
|
8
|
-
- education: number of years of education.
|
|
9
|
-
- south: indicator variable for southern region (1 if a person lives in the
|
|
10
|
-
South; 0 if a person does not live in the South).
|
|
11
|
-
- gender: gender of the person.
|
|
12
|
-
- experience: number of years of work experience.
|
|
13
|
-
- union: indicator variable for union membership (1 if union member; 0 if
|
|
14
|
-
not a union member).
|
|
15
|
-
- wage: wage (in dollars per hour).
|
|
16
|
-
- age: age (in years).
|
|
17
|
-
- race: ethnicity/race (white, hispanic, and other).
|
|
18
|
-
- occupation: occupational category (management, sales, clerical, service,
|
|
19
|
-
professional, and other).
|
|
20
|
-
- sector: sector (other, manufacturing, or construction).
|
|
21
|
-
- married: marital status (0 if unmarried; 1 if married).
|
|
22
|
-
|
|
23
|
-
Based on residual plots, wages were log-transformed to stabilize the
|
|
24
|
-
variance.
|
|
25
|
-
|
|
26
|
-
Returns
|
|
27
|
-
-------
|
|
28
|
-
out: Array<Object>
|
|
29
|
-
CPS data.
|
|
30
|
-
|
|
31
|
-
Examples
|
|
32
|
-
--------
|
|
33
|
-
> var data = {{alias}}()
|
|
34
|
-
[ {...}, {...}, ... ]
|
|
35
|
-
|
|
36
|
-
References
|
|
37
|
-
----------
|
|
38
|
-
- Berndt, Ernst R. 1991. _The Practice of Econometrics_. Addison Wesley
|
|
39
|
-
Longman Publishing Co.
|
|
40
|
-
|
|
41
|
-
See Also
|
|
42
|
-
--------
|
|
43
|
-
|
package/docs/types/test.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license Apache-2.0
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2020 The Stdlib Authors.
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import dataset = require( './index' );
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// TESTS //
|
|
23
|
-
|
|
24
|
-
// The function returns an array of observations...
|
|
25
|
-
{
|
|
26
|
-
dataset(); // $ExpectType Observation[]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// The compiler throws an error if the function is provided arguments...
|
|
30
|
-
{
|
|
31
|
-
dataset( 3.12 ); // $ExpectError
|
|
32
|
-
}
|
package/docs/usage.txt
DELETED