{"id":16971538,"url":"https://github.com/johncoene/peity","last_synced_at":"2025-04-12T00:43:05.400Z","repository":{"id":85366421,"uuid":"81938859","full_name":"JohnCoene/peity","owner":"JohnCoene","description":"Inline charts for R","archived":false,"fork":false,"pushed_at":"2019-05-28T15:26:15.000Z","size":43,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T00:43:00.830Z","etag":null,"topics":["htmlwidgets","inline-graph","peity","rmarkdown"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohnCoene.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}},"created_at":"2017-02-14T11:31:52.000Z","updated_at":"2024-11-20T20:58:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc223ddd-dd36-48b1-83e5-18cb06690b12","html_url":"https://github.com/JohnCoene/peity","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/JohnCoene%2Fpeity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fpeity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fpeity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fpeity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnCoene","download_url":"https://codeload.github.com/JohnCoene/peity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501958,"owners_count":21114681,"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":["htmlwidgets","inline-graph","peity","rmarkdown"],"created_at":"2024-10-14T00:52:20.709Z","updated_at":"2025-04-12T00:43:05.379Z","avatar_url":"https://github.com/JohnCoene.png","language":"R","readme":"[![Build Status](https://travis-ci.org/JohnCoene/peity.svg?branch=master)](https://travis-ci.org/JohnCoene/peity)\n[![saythanks](https://img.shields.io/badge/say-thanks-ff69b4.svg)](https://saythanks.io/to/JohnCoene)\n\n# peity\n\n[Peity](http://benpickles.github.io/peity/) htmlwidget for R.\n\n\u003e Peity (sounds like deity) is a jQuery plugin that converts an element's content into a \u003csvg\u003e mini pie  donut  line or bar chart  and is compatible with any browser that supports \u003csvg\u003e: Chrome, Firefox, IE9+, Opera, Safari.\n\n## Install\n\n```R\ndevtools::install_github(\"JohnCoene/peity\")\n```\n\n## Basics\n\n```R\nlibrary(peity)\n\npeity(\"1/5\", type = \"pie\")\n\n# pass options as list\npeity(c(1,5), type = \"donut\", options = list(fill = I(c(\"green\", \"red\")), radius = 100))\npeity(c(1,5), type = \"donut\", options = list(fill = c(\"#845422\", \"#ead61c\"), radius = 50, innerRadius = 40))\npeity(rnorm(50, 2, 1), type = \"line\", options = list(width = 100))\npeity(c(1,5,3), type = \"bar\", options = list(fill = I(\"green\")))\n```\n\n## Set colors dynamically\n\n```R\npeity(c(4,-2,3, -4), type = \"bar\", options = list(fill = htmlwidgets::JS('function(value) {\n    return value \u003e 0 ? \"green\" : \"red\"\n}')))\n  \njs_fun \u003c- htmlwidgets::JS('function(_, i, all) {\n    var g = parseInt((i / all.length) * 255)\n    return \"rgb(255, \" + g + \", 0)\"\n}')\n\npeity(c(0,-3,-6,-4,-5,-4,-7,-3,-5,-2), type = \"bar\", options = list(fill = js_fun))\n```\n\n## Rmarkdown\n\nUse in rmarkdown in-line like so ``r peity(c(1,4,2), type = \"pie\")``, or in blocks like so:\n\n```R\npeity(c(1,4,2), type = \"pie\")\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoene%2Fpeity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohncoene%2Fpeity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoene%2Fpeity/lists"}