{"id":16200846,"url":"https://github.com/observedobserver/bi-dataset","last_synced_at":"2025-04-07T18:16:10.466Z","repository":{"id":102837603,"uuid":"131485122","full_name":"ObservedObserver/BI-Dataset","owner":"ObservedObserver","description":"core dataset process module for normal BI app.","archived":false,"fork":false,"pushed_at":"2018-07-03T13:25:36.000Z","size":141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T02:21:10.591Z","etag":null,"topics":[],"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/ObservedObserver.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":"2018-04-29T10:27:41.000Z","updated_at":"2023-06-26T09:50:49.000Z","dependencies_parsed_at":"2023-03-13T15:14:30.894Z","dependency_job_id":null,"html_url":"https://github.com/ObservedObserver/BI-Dataset","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"59b359dd4c6f3225bb83de88b1fd1e273c28bf4b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObservedObserver%2FBI-Dataset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObservedObserver%2FBI-Dataset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObservedObserver%2FBI-Dataset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObservedObserver%2FBI-Dataset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ObservedObserver","download_url":"https://codeload.github.com/ObservedObserver/BI-Dataset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704573,"owners_count":20982298,"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-10-10T09:34:30.743Z","updated_at":"2025-04-07T18:16:10.443Z","avatar_url":"https://github.com/ObservedObserver.png","language":"JavaScript","readme":"# BI-Dataset\nA data set tool for building BI visulization app.\n## API\n### filterData\n**filterData** is used to filter the data with several conditions.\n+ params:\n  + `filters`: [Array]; an array contains all the filters, each filter can be type of **equal** or **range**\n  + `rawData`: [Array]; an array contains all the origin data in json like format.\n\n```js\nlet rawData = [{value: 12, name: 'Alice'}, {value: 98, name: 'Bob'}, {value: 32, name: 'Carl'}]\nlet filters = [\n        {\n          column: 'value',\n          type: 'equal',\n          value: [40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]\n        },\n        {\n          column: 'value',\n          type: 'range',\n          value: [10, 98]\n        }\n]\nlet viewData = filterData({filters: state.filters, rawData: state.globalData})\n```\n\n### dimensionValueSet\n**dimensionValueSet** is used to get all the possible value of given dimension or measure.\n+ `rawData`: [Array]\n+ `dimensions`: [Array]: dimensions or measurs.\n\n### transLabel\nturn the labels in xAxis and yAxis into dimension labels and measure labels.\n+ params:\n  + `xlabels`: [Array]; an array contains all the labels in xAxis\n  + `ylabels`: [Array]; an array contains all the labels in yAxis\n+ Return\n  + [Object]: {dimensions, measures}\n  + dimensions and measures are arrays contains the name of each column.\n\n```js\nlet xLabels = [{type: 'string', name: 'city'}, {type: 'number', name: 'value'}]\nlet yLabels = []\nlet {dimensions, measures} = transLabel({xLabels, yLabels})\n```\n\n### transDimension\ncheck all the possible values in each dimension.\n+ Params\n  + `dimensions`: [Array], an array contains all the column of dimension data.\n  + `rawData`: [Array], an array contains all the data, each row of it is in a dictionary format.\n+ Return\n  + [Object]: {mixDim, lowerMixDim}\n\n```js\nmixDim = [\n  ['name', 'city'],\n]\n```\n\n### transData\n+ Params:\n  + `rawData`: [Array]\n  + `measures`: [Array]: an array contains all the measures column\n  + `mixDim`: [Array]: an mixed dimension matrix get from **transDimension**\n  + `statFunc`: [Function]: provide a function used to get sum or average of all the values.\n+ Return\n  + [Array]: Result\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobservedobserver%2Fbi-dataset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobservedobserver%2Fbi-dataset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobservedobserver%2Fbi-dataset/lists"}