{"id":13719332,"url":"https://github.com/Absolventa/iruby-chartkick","last_synced_at":"2025-05-07T11:31:29.582Z","repository":{"id":56878030,"uuid":"218382773","full_name":"Absolventa/iruby-chartkick","owner":"Absolventa","description":"Minimalistic wrapper around chartkick for using it within iruby","archived":false,"fork":false,"pushed_at":"2024-10-09T20:29:16.000Z","size":872,"stargazers_count":15,"open_issues_count":3,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-18T00:21:10.288Z","etag":null,"topics":["chartkick","data-science","iruby","rubydatascience","visualization"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/Absolventa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-29T21:00:52.000Z","updated_at":"2024-09-29T02:20:03.000Z","dependencies_parsed_at":"2024-01-07T21:13:51.920Z","dependency_job_id":"94e71149-3f84-4018-9adc-92a54f840845","html_url":"https://github.com/Absolventa/iruby-chartkick","commit_stats":{"total_commits":58,"total_committers":4,"mean_commits":14.5,"dds":0.5172413793103448,"last_synced_commit":"a4b8723cfaac2d5202776da4413a7fea55ac4284"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Absolventa%2Firuby-chartkick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Absolventa%2Firuby-chartkick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Absolventa%2Firuby-chartkick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Absolventa%2Firuby-chartkick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Absolventa","download_url":"https://codeload.github.com/Absolventa/iruby-chartkick/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252868847,"owners_count":21816925,"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":["chartkick","data-science","iruby","rubydatascience","visualization"],"created_at":"2024-08-03T01:00:46.564Z","updated_at":"2025-05-07T11:31:29.231Z","avatar_url":"https://github.com/Absolventa.png","language":"Ruby","funding_links":[],"categories":["Visualization"],"sub_categories":[],"readme":"# iruby-chartkick [![build](https://github.com/Absolventa/iruby-chartkick/actions/workflows/build.yml/badge.svg)](https://github.com/Absolventa/iruby-chartkick/actions/workflows/build.yml)\n\nYou like writing [Ruby within Juypter](https://github.com/SciRuby/iruby/) notebooks?  Awesome, you're not alone - we do so, too ☀️ Since we also fell in love with the handy charting API of [ankane/chartkick](https://github.com/ankane/chartkick), we wrote this little gem bringing them together.\n\n`iruby-chartkick` was made for easy plug-n-play plotting data using the awesomeness of chartkick within IRuby-backed Jupyter notebooks.\n\n### Installation\n\n\tgem install iruby-chartkick\n\n### Usage\n\nYou can either include the module `IRuby::Chartkick` and use the wrapper methods, like `line_chart`:\n\t\n```ruby\ninclude IRuby::Chartkick\n\t\t\ndata = {\n  2019 =\u003e 1,\n  2020 =\u003e 122,\n  2021 =\u003e 34\n}\n \nline_chart(data)\n```\n\nOr you use the chart wrapper classes directly: \n\n```ruby\ninclude IRuby::Chartkick\n\t\t\ndata = {\n  2019 =\u003e 1,\n  2020 =\u003e 122,\n  2021 =\u003e 34\n}\n\nIRuby::Chartkick::LineChart.new(data).plot\n```\n\n### Examples:\n\n```ruby\ninclude IRuby::Chartkick\n\ndata = [\n  {\n    name: \"Monkeys\",\n    data: {\n      2010 =\u003e 20,\n      2011 =\u003e 190,\n      2012 =\u003e 188,\n      2013 =\u003e 230,\n      2014 =\u003e 422,\n      2015 =\u003e 56,\n      2016 =\u003e 299,\n      2019 =\u003e 100\n    }\n  },\n  {\n    name: \"Pirates\",\n    data: {\n      2010 =\u003e 20,\n      2011 =\u003e 90,\n      2012 =\u003e 488,\n      2013 =\u003e 430,\n      2014 =\u003e 122,\n      2015 =\u003e 6,\n      2016 =\u003e 399,\n      2019 =\u003e 500\n    }\n  }\n]\n```\n\n#### LineChart\n\n```ruby\nline_chart(data)\n```\n![LineChart](https://user-images.githubusercontent.com/3856862/136750966-3fe8908d-356c-477e-8c0e-220bc302d07e.png)\n\n```ruby\nline_chart(data, points: false)\n```\n![LineChart](https://user-images.githubusercontent.com/3856862/136767403-a2839f21-d6af-45af-a710-2f9f0ed2203c.png)\n\n```ruby\nline_chart(data, points: false, width: \"700px\", min: 50, max: 300)\n```\n![LineChart](https://user-images.githubusercontent.com/3856862/136751184-7d96c152-ec1f-490a-9676-0ea16606addf.png)\n\n#### AreaChart\n\n```ruby\narea_chart(data)\n```\n![AreaChart](https://user-images.githubusercontent.com/3856862/136751437-9ceb092c-b1a1-4aee-a868-91a0ac3e9cbc.png)\n\n#### ColumnChart\n\n```ruby\ncolumn_chart(data)\n```\n![ColumnChart](https://user-images.githubusercontent.com/3856862/136751574-252b40cb-b842-41ff-8a25-57695eb4e5b0.png)\n\n#### BarChart\n\n```ruby\nbar_chart(data)\n```\n![BarChart](https://user-images.githubusercontent.com/3856862/136751822-8383166d-894b-42fd-8ea7-fecf00964567.png)\n\n#### ScatterChart\n\n```ruby\nscatter_chart(data)\n```\n![ScatterChart](https://user-images.githubusercontent.com/3856862/136751938-35acbdc7-baee-4262-ac67-1fe1262f071c.png)\n\n#### PieChart\n\n```ruby\ninclude IRuby::Chartkick\n\ndata = [\n  [\"Blueberry\", 44],\n  [\"Strawberry\", 23],\n  [\"Banana\", 22],\n  [\"Apple\", 21],\n  [\"Grape\", 13]\n]\n\npie_chart(data)\n```\n![PieChart](https://user-images.githubusercontent.com/3856862/136752074-d5bc9ecb-b046-4b84-9108-546326125db4.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAbsolventa%2Firuby-chartkick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAbsolventa%2Firuby-chartkick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAbsolventa%2Firuby-chartkick/lists"}