{"id":13426098,"url":"https://github.com/elshor/dstools","last_synced_at":"2025-05-13T13:26:58.013Z","repository":{"id":57216760,"uuid":"114628868","full_name":"elshor/dstools","owner":"elshor","description":"Javascript tools and utilities for the data scientist","archived":false,"fork":false,"pushed_at":"2018-03-20T07:11:00.000Z","size":482,"stargazers_count":51,"open_issues_count":1,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-22T14:03:59.649Z","etag":null,"topics":["data-science","javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/elshor.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":"2017-12-18T10:41:04.000Z","updated_at":"2020-12-28T20:51:56.000Z","dependencies_parsed_at":"2022-08-28T21:40:14.178Z","dependency_job_id":null,"html_url":"https://github.com/elshor/dstools","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/elshor%2Fdstools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elshor%2Fdstools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elshor%2Fdstools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elshor%2Fdstools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elshor","download_url":"https://codeload.github.com/elshor/dstools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243792279,"owners_count":20348606,"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-science","javascript"],"created_at":"2024-07-31T00:01:26.268Z","updated_at":"2025-03-15T21:30:41.297Z","avatar_url":"https://github.com/elshor.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"Dstools - Data Science Tools for Javascript\n===========================================\n\ndstools is a collection of tools that assist in analyzing and visualizing data using Javascript code inside Jupyter notebooks. Its main features are:\n* All functions are chainable (jQuery style)\n* Import csv data files from the web or file system (using `csv` package)\n* Statistical analysis using jStat package\n* Show data as tables within Jupyter notebooks\n* Visualize data using plotly javascript library within Jupyter notebooks\n\nFunction reference and jsdoc based documentation can be found at https://elshor.github.io/dstools/\n\n## Installing dstools\nInstall dstools using npm\n\n```bash\nnpm install dstools\n```\n\nWhen using dstools from Jupyter notebooks with the IJavascript kernel, the package should be installed in the same directory as the notebook.\n\n## Getting Started\nFirst step in handling data is usually loading the data\n```js\nconst Collection = require('dstools').Collection;\nconst data = Collection().loadCSV('data.csv');\n```\n\nAlternatively, the data can be wrapped using the Collection function:\n```js\nconst data = Collection([{field1:2,field2:4},{field1:3,field2:5}]);\n```\n\ninside the Jupyter notebook, the data can be displayed as a table using the `show` function.\n```js\ndata.show();\n```\nThe data will be displayed as an HTML table.\n\nVisualizations are possible using the various visualization functions.\n```js\ndata.histogram('field1').show();\n```\nWhen the code is executed inside a Jupyter notebook, it will display a histogram using the plotly javascript library.\n\nThe `data` function can be used to get the underlying data\n```js\nconsole.log(data.data());\n```\nThe html function can be used to wrap html text. Subsequent calls of the `show` function will display the html in the Jupyter notebook.\n\nHere is a more elaborate example taken from a [medium post](https://medium.com/@elshor/learning-to-talk-about-wine-using-javascript-7b59d0e0a0f):\n```js\nconst Collection = require('dstools').Collection;\nCollection()\n.loadCSV('/home/elshor/data/winemag-data-130k-v2.csv')//load the data\n.terms({field:'description'}).dropStopwords('term')\n.sortDesc('count').head(50)\n.wordCloud('term','count')//arguments are label and measure\n.show();//show the wordcloud in Jupyter notebook\n```\n\n## Function Reference\nFunction reference and jsdoc based documentation can be found at https://elshor.github.io/dstools/\n## Additional Statistical Functions\nThe following jStat functions take as argument the field name and return the jStat function with the column vector as its argument. The following functions are supported: `sum,sumsqrd,sumsqerr,product,min,max,mean,meansqerr,geomean,median,cumsum,cumprod,diff,rank,range,variance,deviation,stdev,skewness,kurtosis,coeffvar,quartiles,quantiles,percentile`. Consult the [jStat](https://jstat.github.io/all.html) documentation for details.\n\n## License\nDstools is licensed under the MIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felshor%2Fdstools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felshor%2Fdstools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felshor%2Fdstools/lists"}