mapbox / mapbox/stats-online

Examples on Readme don't work

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2
Forks
2
PR merge metrics
No merged PRs in 30d

Description

I am curious to see how this library works. The `Standard Deviation` example works great! 👍

But, the examples for `mean` and `variance` don't work when copy+pasted as is. I receive the following error message:

```
TypeError: Property 'mean' of object # is not a function
at repl:3:17
at REPLServer.self.eval (repl.js:110:21)
at repl.js:249:20
at REPLServer.self.eval (repl.js:122:7)
at Interface. (repl.js:239:12)
at Interface.emit (events.js:95:17)
at Interface._onLine (readline.js:203:10)
at Interface._line (readline.js:532:8)
at Interface._ttyWrite (readline.js:761:14)
at ReadStream.onkeypress (readline.js:100:10)
```

The results for `Sample Size` are not helpful to understand what it actually does.

```
NaN
false
NaN
false
NaN
false
NaN
false
NaN
false
NaN
false
NaN
false
NaN
false
NaN
false
NaN
false
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README examples for mean, variance, and Sample Size, then run each example exactly as shown to confirm the reported errors and output. Update the examples so they work when copy-pasted and make the Sample Size result understandable; verify the revised snippets directly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.