Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify HERE's stddev calculation #898

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Clarify HERE's stddev calculation #898

wants to merge 2 commits into from

Conversation

Nate-Wessel
Copy link
Contributor

What this pull request accomplishes:

  • clarifies some ambiguity in the stddev field for HERE data

Issue(s) this solves:

  • It was ambiguous whether this was the sample or population metric because there are 0's, where there should be NULLs.

What, in particular, needs to reviewed:

  • facts

What needs to be done by a sysadmin after this PR is merged

NA

@Nate-Wessel Nate-Wessel requested a review from chmnata March 5, 2024 20:04
@Nate-Wessel
Copy link
Contributor Author

Nate-Wessel commented Mar 5, 2024

As proof:

SELECT
    link_dir,
    tx,
    stddev,
    stddev_samp(obs.speed),
    stddev_pop(obs.speed)
FROM here.ta_path, 
LATERAL (SELECT unnest(ARRAY[min_spd,max_spd]) AS speed) AS obs
WHERE sample_size = 2
GROUP BY
    link_dir,
    tx,
    stddev
LIMIT 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants