{"id":15059685,"url":"https://github.com/f0i/statistics","last_synced_at":"2026-01-03T01:03:14.299Z","repository":{"id":62418476,"uuid":"267821929","full_name":"f0i/statistics","owner":"f0i","description":"Statistic functions for elm","archived":false,"fork":false,"pushed_at":"2022-06-25T18:40:23.000Z","size":115,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T19:48:36.105Z","etag":null,"topics":["elm","libraries","statistics"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f0i.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-29T09:44:50.000Z","updated_at":"2022-10-03T11:45:28.000Z","dependencies_parsed_at":"2022-11-01T16:48:24.315Z","dependency_job_id":null,"html_url":"https://github.com/f0i/statistics","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f0i%2Fstatistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f0i%2Fstatistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f0i%2Fstatistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f0i%2Fstatistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f0i","download_url":"https://codeload.github.com/f0i/statistics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681083,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elm","libraries","statistics"],"created_at":"2024-09-24T22:46:39.634Z","updated_at":"2026-01-03T01:03:14.255Z","avatar_url":"https://github.com/f0i.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fast Statistic functions for Lists of Float and Int\n\nThis package provides functions to get common statistic functions over lists of numbers.\n\nIf you need a function that is currently not included,\nplease let me know by creating an [Issue in Github](https://github.com/f0i/statistics/issues/new)\nor send me an email at [elm-statistics@f0i.de](mailto:elm-statistics@f0i.de?subject=github:f0i/statistics).\nSame thing for performance improvements, ideas, sponsoring and job offers.\n\nPerformance tests and comparision to other libraries can be found in the benchmark directory or at [f0i.de/projects/elm-statistics](https://f0i.de/projects/elm-statistics).\n\n## Install\n\n```bash\nelm install f0i/statistics\n```\n\n## Examples\n\n```elm\n$ elm repl\n\n\u003e import List.Statistics as Stats\n-- This is the test data for the following examples:\n\u003e data = [1, 1, 2, 2, 4, 8, 8, 9]\n[1,1,2,2,4,8,8,9]\n\n\u003e data |\u003e Stats.avg\nJust 4.375 : Maybe Float\n\n\u003e data |\u003e Stats.mean -- alias for avg\nJust 4.375 : Maybe Float\n\n\u003e data |\u003e Stats.occurrences\nDict.fromList [(1,2),(2,2),(4,1),(8,2),(9,1)]\n    : Dict.Dict number Int\n\n\u003e data |\u003e Stats.minmax\nJust (1,9) : Maybe ( number, number )\n\n\u003e data |\u003e Stats.stdDeviation\nJust 3.1991209730174317 : Maybe Float\n\n-- Get the element 25% into the list (interpolated between closest values)\n\u003e data |\u003e Stats.percentile 0.25\nJust 1.75 : Maybe Float\n\n-- Some functions have a separate implementation for list of Int\n\u003e data |\u003e Stats.percentileInt 0.75\nJust 8 : Maybe Int\n\n\u003e\n```\n\nThe complete list of function definitions can be found in\n[the package documentation](https://package.elm-lang.org/packages/f0i/statistics/latest/List-Statistics)\n\n## Development\n\nThis package uses elm-test and elm-benchmark.\nThere are make inside the [makefile](makefile) to run these tests whenever a file changes.\n\n## Alternatives\n\nThere are some other libraries which provide statistics functions:\n\n* \u003chttps://package.elm-lang.org/packages/gampleman/elm-visualization/latest/\u003e\n* \u003chttps://package.elm-lang.org/packages/BrianHicks/elm-trend/latest/\u003e\n* \u003chttps://package.elm-lang.org/packages/jxxcarlson/elm-stat/latest\u003e\n\nSee \u003chttps://f0i.de/projects/elm-statistics\u003e for performance comparision.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff0i%2Fstatistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff0i%2Fstatistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff0i%2Fstatistics/lists"}