{"id":23029670,"url":"https://github.com/antononcube/raku-data-summarizers","last_synced_at":"2025-04-05T23:13:54.305Z","repository":{"id":41299355,"uuid":"420715918","full_name":"antononcube/Raku-Data-Summarizers","owner":"antononcube","description":"Raku package with summarization functions for different types of data.","archived":false,"fork":false,"pushed_at":"2024-08-02T13:33:08.000Z","size":103,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T05:38:52.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antononcube.png","metadata":{"files":{"readme":"README-work.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-24T15:03:36.000Z","updated_at":"2024-08-02T13:33:11.000Z","dependencies_parsed_at":"2024-06-13T21:13:35.629Z","dependency_job_id":null,"html_url":"https://github.com/antononcube/Raku-Data-Summarizers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Data-Summarizers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Data-Summarizers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Data-Summarizers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Data-Summarizers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antononcube","download_url":"https://codeload.github.com/antononcube/Raku-Data-Summarizers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411243,"owners_count":20934654,"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":[],"created_at":"2024-12-15T14:16:40.755Z","updated_at":"2025-04-05T23:13:54.285Z","avatar_url":"https://github.com/antononcube.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raku Data::Summarizers\n\n[![SparkyCI](http://ci.sparrowhub.io/project/gh-antononcube-Raku-Data-Summarizers/badge)](http://ci.sparrowhub.io)\n[![License: Artistic-2.0](https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg)](https://opensource.org/licenses/Artistic-2.0)\n\nThis Raku package has data summarizing functions for different data structures that are \ncoercible to full arrays.\n\nThe supported data structures (so far) are:\n  - 1D Arrays\n  - 1D Lists  \n  - Positional-of-hashes\n  - Positional-of-arrays\n\n------\n\n## Usage examples\n\n### Setup\n\nHere we load the Raku modules \n[`Data::Generators`](https://modules.raku.org/dist/Data::Generators:cpan:ANTONOV),\n[`Data::Reshapers`](https://modules.raku.org/dist/Data::Reshapers:cpan:ANTONOV),\n[`Text::Plot`](https://modules.raku.org/dist/Text::Plot:cpan:ANTONOV),\nand this module,\n[`Data::Summarizers`](https://github.com/antononcube/Raku-Data-Summarizers):\n\n```perl6\nuse Data::Generators;\nuse Data::Reshapers;\nuse Text::Plot;\nuse Data::Summarizers;\n```\n\n### Summarize vectors\n\nHere we generate a numerical vector, place some NaN's or Whatever's in it:\n\n```perl6\nmy @vec = [^1001].roll(12);\n@vec = @vec.append( [NaN, Whatever, Nil]);\n@vec .= pick(@vec.elems);\n@vec\n```\n\nHere we summarize the vector generated above:\n\n```perl6\nrecords-summary(@vec)\n```\n\n### Summarize tabular datasets\n\nHere we generate a random tabular dataset with 16 rows and 3 columns and display it:\n\n```perl6\nsrand(32);\nmy $tbl = random-tabular-dataset(16, \n                                 \u003cPet Ref Code\u003e,\n                                 generators=\u003e[random-pet-name(4), -\u003e $n { ((^20).rand xx $n).List }, random-string(6)]);\nto-pretty-table($tbl)\n```\n\n**Remark:** The values of the column \"Pet\" is sampled from a set of four pet names, and the values of the column\nand \"Code\" is sampled from a set of 6 strings.\n\nHere we summarize the tabular dataset generated above:\n\n```perl6\nrecords-summary($tbl)\n```\n\n### Summarize collections of tabular datasets \n\nHere is a hash of tabular datasets:\n\n```perl6\nmy %group = group-by($tbl, 'Pet');\n\n%group.pairs.map({ say(\"{$_.key} =\u003e\"); say to-pretty-table($_.value) });\n```\n\nHere is the summary of that collection of datasets:\n\n```perl6\nrecords-summary(%group)\n```\n\n### Pareto principle statistic\n\nHere is vector of 200 random (normally distributed) numbers:\n\n```perl6\nmy @vec = random-variate(NormalDistribution.new(30, 20), 200);\n```\n\nHere we compute the \n[Pareto principle statistic](https://en.wikipedia.org/wiki/Pareto_principle) \nand plot it:\n\n```perl6\ntext-list-plot(pareto-principle-statistic(@vec))\n```\n\n### Skim\n\n*TBD...*\n\n------\n\n## TODO\n\n- [ ] User specified `NA` marker\n  \n- [ ] Tabular dataset summarization tests\n\n- [ ] Skimmer\n\n- [ ] Peek-er\n\n------\n\n## References\n\n### Functions, repositories\n\n[AAf1] Anton Antonov,\n[RecordsSummary](https://resources.wolframcloud.com/FunctionRepository/resources/RecordsSummary),\n(2019),\n[Wolfram Function Repository](https://resources.wolframcloud.com/FunctionRepository).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fraku-data-summarizers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantononcube%2Fraku-data-summarizers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fraku-data-summarizers/lists"}