{"id":19282795,"url":"https://github.com/kanaries/web-data-loader","last_synced_at":"2025-04-22T01:32:18.706Z","repository":{"id":57123813,"uuid":"232739564","full_name":"Kanaries/web-data-loader","owner":"Kanaries","description":"data loader for data analytic product in working in browser","archived":false,"fork":false,"pushed_at":"2023-07-13T05:21:30.000Z","size":148,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-19T05:07:35.907Z","etag":null,"topics":["csv","data-loader","sampling","streaming"],"latest_commit_sha":null,"homepage":"https://kanaries.github.io/web-data-loader/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kanaries.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-09T06:34:15.000Z","updated_at":"2023-05-20T07:40:59.000Z","dependencies_parsed_at":"2024-06-18T22:37:05.039Z","dependency_job_id":"df89735a-8753-45fa-a971-323330bb75f5","html_url":"https://github.com/Kanaries/web-data-loader","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":0.4444444444444444,"last_synced_commit":"d3a2b1f7afd38d96157fa43fef43d19cb388d7cd"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kanaries%2Fweb-data-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kanaries%2Fweb-data-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kanaries%2Fweb-data-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kanaries%2Fweb-data-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kanaries","download_url":"https://codeload.github.com/Kanaries/web-data-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223886718,"owners_count":17219798,"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":["csv","data-loader","sampling","streaming"],"created_at":"2024-11-09T21:28:26.249Z","updated_at":"2024-11-09T21:28:26.851Z","avatar_url":"https://github.com/Kanaries.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# web-data-loader\n![](https://img.shields.io/github/license/kanaries/web-data-loader?color=%23FF7575)\n![](https://img.shields.io/npm/v/@kanaries/web-data-loader?color=5BE7C6)\n![](https://travis-ci.com/Kanaries/web-data-loader.svg?branch=master)\n\ndata loader for data analytic product in working in browser\n\nweb-data-loader allows you to load larget data files in browser. It supports stream data and runs in webworker which will not block the main thread while loading the data. web-data-loader also support stream data sampling, it now support `Reservoir Sampling` methods.\n\n## Usage\n\n### Install\n```bash\nnpm i --save @kanaries/web-data-loader\n```\n\n### Examples\nin your project file:\n\nget user upload file\n```html\n\u003cinput type=\"file\" id=\"#file\" /\u003e\n```\n\nuse web-data-loader to load the data with sampling.\n```js\n(document.querySelector(\"#file\") as HTMLInputElement).onchange = (\n  ev: Event\n) =\u003e {\n  const file = (ev.target as HTMLInputElement).files[0];\n  FileReader.csvReader(\n    {\n      file: file,\n      config: {\n        type: \"reservoirSampling\",\n        size: 400\n      },\n      onLoading: value =\u003e {\n        console.log((value * 100).toFixed(2) + '%');\n      }\n    }\n  ).then(data =\u003e console.log(data));\n  // FileReader.csvReader(file).then(data =\u003e console.log(data));\n};\n\n```\n\n## Docs\ndocuments can be found at [API Reference](https://kanaries.github.io/web-data-loader/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanaries%2Fweb-data-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanaries%2Fweb-data-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanaries%2Fweb-data-loader/lists"}