{"id":22636675,"url":"https://github.com/josedv82/bdgramr","last_synced_at":"2025-10-04T13:09:12.987Z","repository":{"id":118075603,"uuid":"327615313","full_name":"josedv82/bdgramR","owner":"josedv82","description":"Figure Coordinates for Visualizations of Human Body Diagrams","archived":false,"fork":false,"pushed_at":"2021-01-12T03:59:25.000Z","size":1037,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T12:40:50.958Z","etag":null,"topics":["ggplot","r","sports-analytics","sports-stats"],"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/josedv82.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":"2021-01-07T13:09:44.000Z","updated_at":"2025-03-11T11:22:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"97398107-08f4-4a69-8b6a-f9e40cd871fe","html_url":"https://github.com/josedv82/bdgramR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/josedv82/bdgramR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedv82%2FbdgramR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedv82%2FbdgramR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedv82%2FbdgramR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedv82%2FbdgramR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josedv82","download_url":"https://codeload.github.com/josedv82/bdgramR/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedv82%2FbdgramR/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278316008,"owners_count":25966903,"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-04T02:00:05.491Z","response_time":63,"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":["ggplot","r","sports-analytics","sports-stats"],"created_at":"2024-12-09T03:29:42.931Z","updated_at":"2025-10-04T13:09:12.964Z","avatar_url":"https://github.com/josedv82.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":" \u003c!-- badges: start --\u003e\n  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n  [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)\n  \u003c!-- badges: end --\u003e\n\n\n# {bdgramR}\nA collection of body diagram visualizations in R\n\n\n\u003cimg src=\"man/images/bodygramRlogo.png\" align=\"right\" width=\"300\" /\u003e\n  \n  \n***\n  \n  \n### 1) What is {bdgramR}?\n\nAn R package that provides raw **x,y** coordinates to draw human body diagrams in R. This type of visualizations are commonly used in Sport Science, Strength and Conditioning and other health related areas to report visual information about muscle / joint related metrics such as muscle soreness, muscle activation, strength, temperature, etc...\n\nFor more information on how body diagrams can be used in R please visit [this article](https://rpubs.com/Josedv82/body_diagrams_R) and this [github repo](https://github.com/josedv82/body_avatars_in_R) where I wrote about some ideas to add visualizations to reports and integrate with other packages for more functionality.\n\n### 2) Installation\n\n```\n#Install from CRAN \n#Not currently on CRAN\n\n  \n#Install the development version from GitHub  \ninstall.packages(\"devtools\")\ndevtools::install_github(\"josedv82/bdgramR\")\n```\n\n### 3) Usage\n\n{bdgramR} is a small package and provides only a handful on functions:\n\n##### Get a list of all the body diagram types available with `model_types()`\n\n\n```{r}\nlibrary(bdgramR)\n\nmodel_types(data = data)\n\n# A tibble: 9 x 1\n  Model             \n  \u003cfct\u003e             \n1 futuristic_male   \n2 original_male     \n3 original_female   \n4 thermohuman_male  \n5 thermohuman_female\n6 athletesr         \n7 basic_female      \n8 basic_male        \n9 multi_view_male  \n\n```\n\n##### Use `glimpse_models()` to visually explore what each body diagram looks like.\n\n```{r}\nlibrary(bdgramR)\n\nglimpse_models(data = data, color = \"brown\", fill = \"orange\")\n\n```\n\n\u003cimg src=\"man/images/glimpse_output.png\" width=\"800\" /\u003e\n\n#### Get raw x/y coordinates of the body diagram you wish to use with `bdgramr()`\n\n```{r}\nlibrary(bdgramR)\n\ndat \u003c- bdgramr(data = data, model = \"original_male\")\n\nhead(dat)\n\n Id      View       Part  Group Muscle  Side   x   y\n1  1 Posterior Lower_Body Calves Soleus Right 739 723\n2  1  Anterior Lower_Body Calves Soleus Right 739 724\n3  1  Anterior Lower_Body Calves Soleus Right 740 724\n4  1  Anterior Lower_Body Calves Soleus Right 740 725\n5  1  Anterior Lower_Body Calves Soleus Right 741 725\n6  1  Anterior Lower_Body Calves Soleus Right 741 726\n```\n\n#### Finally, you can use `geom_bdgramr()` within your ggplot code.\n\n```{r}\n\nlibrary(bdgramR)\nlibrary(ggplot2)\n\ndat \u003c- bdgramr(data = data, model = \"original_male\")\n\nggplot(data = dat, aes(x,y, group = Id)) +\n  geom_bdgramr()\n\n```\n\u003cimg src=\"man/images/Picture1.png\" width=\"600\" /\u003e\n\nLike with any other ggplot, users can add more layers to further customise the visualization. For example:\n\n```{r}\nlibrary(bdgramR)\nlibrary(ggplot2)\n\ndat \u003c- bdgramr(data = data, model = \"original_male\")\n\nplot \u003c- ggplot(data = dat, aes(x,y, group = Id)) +\n  geom_bdgramr(color = \"cyan\", aes(fill = Muscle)) +\n  ggtitle(\"BdygramR: original_male diagram\")\n  \nplot\n\n```\n\n\u003cimg src=\"man/images/Picture2.png\" width=\"600\" /\u003e\n\n### 4) Acknowledgment\n\nI'd like to credit two known sources of inspiration for some of the body diagrams in this package.\n\nTwo of the available body diagrams are inspired on [athleteSR](https://www.athletesr.com/) and [Thermohuman](https://thermohuman.com/) as  the body diagrams they use on their software are very well designed. In this case, I have named them after the actual software.\n\n### 5) Future Development\n\n{bdgramR} is a small package and likely not much more development needed besides adding some more body diagram types. However, the package is currently under development and I welcome any feedback to improve or issues you may come across when using it.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosedv82%2Fbdgramr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosedv82%2Fbdgramr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosedv82%2Fbdgramr/lists"}