{"id":17122630,"url":"https://github.com/gmac/series-stats","last_synced_at":"2025-08-23T09:09:23.462Z","repository":{"id":8574955,"uuid":"10204748","full_name":"gmac/series-stats","owner":"gmac","description":"Numeric series statistics algorithms and utility methods.","archived":false,"fork":false,"pushed_at":"2013-05-22T14:37:09.000Z","size":128,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T03:11:33.330Z","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":"mageed/python_tutorial","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-21T20:26:22.000Z","updated_at":"2014-05-24T08:22:01.000Z","dependencies_parsed_at":"2022-08-30T03:51:47.924Z","dependency_job_id":null,"html_url":"https://github.com/gmac/series-stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gmac/series-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmac%2Fseries-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmac%2Fseries-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmac%2Fseries-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmac%2Fseries-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmac","download_url":"https://codeload.github.com/gmac/series-stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmac%2Fseries-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746300,"owners_count":24813556,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-14T18:23:25.041Z","updated_at":"2025-08-23T09:09:23.439Z","avatar_url":"https://github.com/gmac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"series-stats\n============\n\nNumeric series statistics algorithms and utility methods. Useful for data visualization an choropleth mapping, specifically for breaking up a series of numbers into legend ranges.\n\n#Series API\n\n**equalBreaks** `Series.equalBreaks( [series], classes );`  \nAccepts a numeric series (array) and a number of classes to create. Returns an array of equally-sized class breaks distributed evenly across the range of series values. Example:\n\n\tSeries.equalBreaks([10, 55, 87, 63, 27, 36, 23, 71, 29, 45, 2, 83, 17], 4);\n\t// \u003e\u003e [2, 23.25, 44.5, 65.75, 87]\n\n**quantileBreaks** `Series.quantileBreaks( [series], classes );`  \nReturns an array of unevenly-sized classes distributed at even intervals across the series of values. Example:\n\n\tSeries.quantileBreaks([10, 55, 87, 63, 27, 36, 23, 71, 29, 45, 2, 83, 17], 4);\n\t// \u003e\u003e [2, 23, 36, 63, 87]\n\n**jenksBreaks** `Series.jenksBreaks( [series], classes );`  \nReturns an array of unevenly-sized classes distributed at uneven intervals across the series of values. Breaks are algorithmically plotted around concentrations of values within the series using [Jenks Natural Breaks](http://en.wikipedia.org/wiki/Jenks_natural_breaks_optimization \"Jenks Natural Breaks\"). Tends to minimizes the impact of outlier values on the outskirts of the series. Example:\n\n\tSeries.jenksBreaks([10, 55, 87, 63, 27, 36, 23, 71, 29, 45, 2, 83, 17], 4);\n\t// \u003e\u003e [2, 17, 36, 63, 87]\n\n**plot** `Series.plot( [series], value, descending? );`  \nPlots a value's index position within a numeric series array. Used to plot data values within a series of computed breaks (generated by one of the available breaks functions).\n\nBy default, plotting starts at the bottom of the series (first value) and works its way upward; each number in the series is used as a threshold that the value is tested against. If the value is `\u003c=` to a threshold, then it advances upward in the series until a maximum threshold index is found and returned. May optionally perform a descending plot; this will start at the top of the series (last value) and work its way down comparing `\u003e=` against each threshold. The plotted index of ascending and descending operations may differ.\n\n* `[series]`: The numeric series array used to plot the value. Assumes the series to be pre-sorted.\n* `value`: The value to plot within the series.\n* `descending?`: Optional parameter to enable a descending (top-down) plot.\n\nExamples:\n\n\t// Mid-range ascending/descending:\n\tSeries.plot([0, 25, 50, 75, 100], 40); \t\t\t// \u003e\u003e 1\n\tSeries.plot([0, 25, 50, 75, 100], 40, true); \t// \u003e\u003e 1\n\t\n\t// On-threshold ascending/descending:\n\tSeries.plot([0, 25, 50, 75, 100], 50); \t\t\t// \u003e\u003e 1\n\tSeries.plot([0, 25, 50, 75, 100], 50, true); \t// \u003e\u003e 2\n\n**sort** `Series.sort( [series], descending? );`  \nPerforms a numeric sort on the series array.\n\n**min** `Series.min( [series] );`  \nFinds the minimum value within a numeric series array.\n\n**max** `Series.max( [series] );`  \nFinds the maximum value within a numeric series array.\n\n**sum** `Series.sum( [series] );`  \nCalculates the sum (total) of a numeric series array.\n\n**mean** `Series.mean( [series] );`  \nCalculates the mean (average) of a numeric series array.\n\n**unique** `Series.unique( [series] );`  \nCollects all unique values from a numeric series array; returns a new sorted array of the unique values.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmac%2Fseries-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmac%2Fseries-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmac%2Fseries-stats/lists"}