{"id":23231194,"url":"https://github.com/maxhumber/chart","last_synced_at":"2025-10-05T07:46:45.927Z","repository":{"id":62561765,"uuid":"201306637","full_name":"maxhumber/chart","owner":"maxhumber","description":"Charts with pure python","archived":false,"fork":false,"pushed_at":"2024-02-22T03:06:28.000Z","size":47,"stargazers_count":57,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-08T13:38:19.512Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/maxhumber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"maxhumber","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-08-08T17:32:06.000Z","updated_at":"2024-07-07T05:00:35.000Z","dependencies_parsed_at":"2024-06-21T15:22:09.384Z","dependency_job_id":"1a6c96a9-5449-4871-9d8c-05420585c340","html_url":"https://github.com/maxhumber/chart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxhumber/chart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fchart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fchart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fchart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fchart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxhumber","download_url":"https://codeload.github.com/maxhumber/chart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fchart/sbom","scorecard":{"id":629162,"data":{"date":"2025-08-11","repo":{"name":"github.com/maxhumber/chart","commit":"8f19609c14dedc09b07e4682c703107d53cd9714"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T07:20:59.731Z","repository_id":62561765,"created_at":"2025-08-21T07:20:59.731Z","updated_at":"2025-08-21T07:20:59.731Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278425463,"owners_count":25984685,"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-10-05T02:00:06.059Z","response_time":54,"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-12-19T02:13:31.974Z","updated_at":"2025-10-05T07:46:45.905Z","avatar_url":"https://github.com/maxhumber.png","language":"Python","funding_links":["https://github.com/sponsors/maxhumber"],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/maxhumber/chart/master/images/logo.png\" width=\"400px\" alt=\"chart\"\u003e\n\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg alt=\"MIT\" src=\"https://img.shields.io/github/license/maxhumber/chart.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/maxhumber/chart\"\u003e\u003cimg alt=\"Travis\" src=\"https://img.shields.io/travis/maxhumber/chart.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/chart\"\u003e\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/chart.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/chart\"\u003e\u003cimg alt=\"Downloads\" src=\"https://img.shields.io/pypi/dm/chart.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA zero-dependency python package that prints basic charts to a Jupyter output\n\nCharts supported:\n\n- Bar graphs\n- Scatter plots\n- Histograms\n- 🍑📊👏\n\n#### Examples\n\nBar graphs can be drawn quickly with the `bar` function:\n\n```python\nfrom chart import bar\n\nx = [500, 200, 900, 400]\ny = ['marc', 'mummify', 'chart', 'sausagelink']\n\nbar(x, y)\n```\n\n```\n       marc: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇             \n    mummify: ▇▇▇▇▇▇▇                       \n      chart: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇\nsausagelink: ▇▇▇▇▇▇▇▇▇▇▇▇▇                              \n```\n\nAnd the `bar` function can accept columns from a `pd.DataFrame`:\n\n```python\nfrom chart import bar\nimport pandas as pd\n\ndf = pd.DataFrame({\n    'artist': ['Tame Impala', 'Childish Gambino', 'The Knocks'],\n    'listens': [8_456_831, 18_185_245, 2_556_448]\n})\nbar(df.listens, df.artist, width=20, label_width=11, mark='🔊')\n```\n\n```\nTame Impala: 🔊🔊🔊🔊🔊🔊🔊🔊🔊           \nChildish Ga: 🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊🔊\n The Knocks: 🔊🔊🔊                                \n```\n\nHistograms are just as easy:\n\n```python\nfrom chart import histogram\n\nx = [1, 2, 4, 3, 3, 1, 7, 9, 9, 1, 3, 2, 1, 2]\n\nhistogram(x)\n```\n\n```\n▇        \n▇        \n▇        \n▇        \n▇ ▇      \n▇ ▇      \n▇ ▇      \n▇ ▇     ▇\n▇ ▇     ▇\n▇ ▇   ▇ ▇\n```\n\nAnd they can accept objects created by `scipy`:\n\n```python\nfrom chart import histogram\nimport scipy.stats as stats\nimport numpy as np\n\nnp.random.seed(14)\nn = stats.norm(loc=0, scale=10)\n\nhistogram(n.rvs(100), bins=14, height=7, mark='🍑')\n```\n\n```\n            🍑              \n            🍑   🍑          \n            🍑 🍑 🍑          \n            🍑 🍑 🍑          \n        🍑   🍑 🍑 🍑          \n      🍑 🍑 🍑 🍑 🍑 🍑 🍑 🍑 🍑    \n      🍑 🍑 🍑 🍑 🍑 🍑 🍑 🍑 🍑   🍑\n```\n\nScatter plots can be drawn with a simple `scatter` call:\n\n```python\nfrom chart import scatter\n\nx = range(0, 20)\ny = range(0, 20)\n\nscatter(x, y)\n```\n\n```python\n                                       •\n                                   • •  \n                                 •      \n                             • •        \n                         • •            \n                       •                \n                  •  •                  \n                •                       \n            • •                         \n        • •                             \n      •                                 \n  • •                                   \n•                                       \n```\n\nAnd at this point you gotta know it works with any `np.array`:\n\n```python\nfrom chart import scatter\nimport numpy as np\n\nnp.random.seed(1)\nN = 100\nx = np.random.normal(100, 50, size=N)\ny = x * -2 + 25 + np.random.normal(0, 25, size=N)\n\nscatter(x, y, width=20, height=9, mark='^')\n```\n\n```\n^^                  \n ^                  \n    ^^^             \n    ^^^^^^^         \n       ^^^^^^       \n        ^^^^^^^     \n            ^^^^    \n             ^^^^^ ^\n                ^^ ^\n```\n\nIn fact, all `chart` functions work with pandas, numpy, scipy and regular python objects.\n\n#### Preprocessors\n\nIn order to create the simple outputs generated by `bar`, `histogram`, and `scatter` I had to create a couple of preprocessors, namely: `NumberBinarizer` and `RangeScaler`.\n\nI tried to adhere to the scikit-learn API in their construction. Although you won't need them to use `chart` here they are for your tinkering:\n\n```python\nfrom chart.preprocessing import NumberBinarizer\n\nnb = NumberBinarizer(bins=4)\nx = range(10)\nnb.fit(x)\nnb.transform(x)\n```\n\n```\n[0, 0, 0, 1, 1, 2, 2, 3, 3, 3]\n```\n\n```python\nfrom chart.preprocessing import RangeScaler\n\nrs = RangeScaler(out_range=(0, 10), round=False)\nx = range(50, 59)\nrs.fit_transform(x)\n```\n\n```\n[0.0, 1.25, 2.5, 3.75, 5.0, 6.25, 7.5, 8.75, 10.0]\n```\n\n#### Installation\n\n```python\npip install chart\n```\n\n#### Contribute\n\nFor feature requests or bug reports, please use [Github Issues](https://github.com/maxhumber/chart/issues)\n\n#### Inspiration\n\nI wanted a super-light-weight library that would allow me to quickly grok data. Matplotlib had too many dependencies, and Altair seemed overkill. Though I really like the idea of [termgraph](https://github.com/mkaz/termgraph), it didn't really fit well or integrate with my Jupyter workflow. Here's to `chart` 🥂 (still can't believe I got it on [PyPI](https://pypi.org/project/chart/))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxhumber%2Fchart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxhumber%2Fchart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxhumber%2Fchart/lists"}