{"id":23029666,"url":"https://github.com/antononcube/raku-data-typesystem","last_synced_at":"2025-07-09T13:07:27.611Z","repository":{"id":172254203,"uuid":"649040080","full_name":"antononcube/Raku-Data-TypeSystem","owner":"antononcube","description":"Data type system for different data structures.","archived":false,"fork":false,"pushed_at":"2024-05-14T19:46:29.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T11:13:08.033Z","etag":null,"topics":["data","data-structures","rakulang","type-system"],"latest_commit_sha":null,"homepage":"https://raku.land/zef:antononcube/Data::TypeSystem","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":"2023-06-03T15:28:05.000Z","updated_at":"2024-05-14T19:46:33.000Z","dependencies_parsed_at":"2024-05-15T12:57:37.303Z","dependency_job_id":"44aad17a-8bad-4bff-b830-014545e69561","html_url":"https://github.com/antononcube/Raku-Data-TypeSystem","commit_stats":null,"previous_names":["antononcube/raku-data-typesystem"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Data-TypeSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Data-TypeSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Data-TypeSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Data-TypeSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antononcube","download_url":"https://codeload.github.com/antononcube/Raku-Data-TypeSystem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246886476,"owners_count":20849867,"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":["data","data-structures","rakulang","type-system"],"created_at":"2024-12-15T14:16:39.522Z","updated_at":"2025-04-02T20:25:38.373Z","avatar_url":"https://github.com/antononcube.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raku Data::TypeSystem\n\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 provides a type system for different data structures that are \ncoercible to full arrays. Its code was originally developed in \n[\"Data::Reshapers\"](https://github.com/antononcube/Raku-Data-Reshapers), [AAp1].\n\n\n------\n\n## Installation\n\nFrom [Zef ecosystem](https://raku.land):\n\n```\nzef install Data::TypeSystem\n```\n\nFrom GitHub:\n\n```\nzef install https://github.com/antononcube/Raku-Data-TypeSystem.git\n```\n\n------\n\n## Usage examples\n\nThe type system conventions follow those of Mathematica's \n[`Dataset`](https://reference.wolfram.com/language/ref/Dataset.html) \n-- see the presentation \n[\"Dataset improvements\"](https://www.wolfram.com/broadcast/video.php?c=488\u0026p=4\u0026disp=list\u0026v=3264).\n\nHere we get the Titanic dataset, change the \"passengerAge\" column values to be numeric, \nand show dataset's dimensions:\n\n```perl6\nuse Data::ExampleDatasets;\nmy $url = 'https://raw.githubusercontent.com/antononcube/Raku-Data-Reshapers/main/resources/dfTitanic.csv';\nmy @dsTitanic = example-dataset($url, headers =\u003e 'auto');\n@dsTitanic = @dsTitanic.map({$_\u003cpassengerAge\u003e = $_\u003cpassengerAge\u003e.Numeric; $_}).Array;\n@dsTitanic.elems\n```\n\nHere is a sample of dataset's records:\n\n```perl6\n.say for @dsTitanic.pick(5)\n```\n\nHere is the type of a single record:\n\n```perl6\nuse Data::TypeSystem;\ndeduce-type(@dsTitanic[12])\n```\n\nHere is the type of single record's values:\n\n```perl6\ndeduce-type(@dsTitanic[12].values.List)\n```\n\nHere is the type of the whole dataset:\n\n```perl6\ndeduce-type(@dsTitanic)\n```\n\nHere is the type of \"values only\" records:\n\n```perl6\nmy @valArr = @dsTitanic\u003e\u003e.values\u003e\u003e.Array;\ndeduce-type(@valArr)\n```\n\nHere is the type of the string values only records:\n\n```perl6\nmy @valArr = @dsTitanic.map({ $_.grep({ $_.value ~~ Str }).Hash })\u003e\u003e.values\u003e\u003e.Array;\n.say for @valArr.pick(4);\n```\n\n```perl6\ndeduce-type(@valArr);\n```\n\n-------\n\n## References\n\n[AAp1] Anton Antonov,\n[Data::Reshapers Raku package](https://github.com/antononcube/Raku-Data-Reshapers),\n(2021),\n[GitHub/antononcube](https://github.com/antononcube/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fraku-data-typesystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantononcube%2Fraku-data-typesystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fraku-data-typesystem/lists"}