{"id":13712656,"url":"https://ggseg.github.io/ggseg/","last_synced_at":"2025-05-06T22:31:23.701Z","repository":{"id":45318891,"uuid":"145827720","full_name":"ggseg/ggseg","owner":"ggseg","description":"Plotting tool for brain atlases, in ggplot","archived":false,"fork":false,"pushed_at":"2023-08-16T16:30:54.000Z","size":646995,"stargazers_count":225,"open_issues_count":11,"forks_count":33,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-02T00:32:13.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ggseg.github.io/ggseg/","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/ggseg.png","metadata":{"files":{"readme":"README.Rmd","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}},"created_at":"2018-08-23T08:56:32.000Z","updated_at":"2025-04-25T14:47:00.000Z","dependencies_parsed_at":"2022-08-28T13:51:43.752Z","dependency_job_id":"78a5c8fa-c584-46c8-abf8-87637eaa399d","html_url":"https://github.com/ggseg/ggseg","commit_stats":{"total_commits":479,"total_committers":6,"mean_commits":79.83333333333333,"dds":"0.11273486430062629","last_synced_commit":"e02e23441e86d3cc503cf2d75624ed26f8a87c8f"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggseg%2Fggseg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggseg%2Fggseg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggseg%2Fggseg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggseg%2Fggseg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggseg","download_url":"https://codeload.github.com/ggseg/ggseg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779052,"owners_count":21802870,"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":[],"created_at":"2024-08-02T23:01:21.036Z","updated_at":"2025-05-06T22:31:21.287Z","avatar_url":"https://github.com/ggseg.png","language":"R","funding_links":[],"categories":["Themes and aesthetics"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  out.width = \"100%\",\n  fig.path = \"man/figures/README-\",\n  fig.retina = 3,\n  echo = TRUE\n)\n``` \n \n\n# ggseg \u003cimg src=\"man/figures/logo.png\" align=\"right\" alt=\"\" width=\"138.5\" /\u003e  \n\u003c!-- badges: start --\u003e\n[![R build status](https://github.com/ggseg/ggseg/workflows/R-CMD-check/badge.svg)](https://github.com/ggseg/ggseg/actions)\n[![CRAN status](https://www.r-pkg.org/badges/version/ggseg)](https://CRAN.R-project.org/package=ggseg)\n[![downloads](https://cranlogs.r-pkg.org/badges/last-month/ggseg?color=blue)](https://r-pkg.org/pkg/ggseg)\n[![codecov](https://codecov.io/gh/ggseg/ggseg/branch/main/graph/badge.svg?token=WtlS6Kk1vo)](https://app.codecov.io/gh/ggseg/ggseg)\n[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n\u003c!-- badges: end --\u003e\n\nContains ggplot2 geom for plotting brain atlases using simple features. The largest component of the package is the data for the two built-in atlases.\nPlotting results of analyses on regions or networks often involves swapping between statistical tools, like R, and software for brain imaging to correctly visualise analysis results.\n\nThis package aims to make it possible to plot results directly through R. \n\n## Atlases\nThere are currently four atlases available in the package:  \n\n1. `dk` - Desikan-Killiany atlas (aparc).   \n2. `aseg` - Automatic subcortical segmentation.  \n\n**Note:** As of version 1.5.3, `ggseg` was split into two packages: one for 2d polygon plots in ggplot, and another for 3d mesh plots through plotly. \nThis was done to reduce package size, dependencies, and also to simplify maintenance. \nIf you want the 3d plotting tool, please go the [ggseg3d repository](https://github.com/ggseg/ggseg3d).\n\nYou may find more atlases and functions to create new atlases in the companion package [ggsegExtra](https://github.com/ggseg/ggsegExtra).\n\n## Installation\nThe package can be installed from CRAN.\n\n```{r eval = FALSE}\ninstall.packages(\"ggseg\")\n```\n\nAlternatively, ggseg may also be installed through its ggseg r-universe:\n\n```r\n# Enable this universe\noptions(repos = c(\n    ggseg = 'https://ggseg.r-universe.dev',\n    CRAN = 'https://cloud.r-project.org'))\n\n# Install some packages\ninstall.packages('ggseg')\n```\n\nThe development version of the package can be installed using devtools. \n\n```{r eval=FALSE}\ninstall.packages(\"remotes\")\nremotes::install_github(\"ggseg/ggseg\")\n```\n\nThe functions are now installed, and you may load them when you want to use them.\nAll functions are documented in standard R fashion.\n\n## Use\n```{r, out.width='100%'}\nlibrary(ggseg)\nlibrary(ggplot2)\nplot(dk)\nplot(aseg)\n```\n\nWhile default atlas plots will give you an idea of how the atlases look, you will likely want to project your own data onto the plot.\n\n\n```{r}\nlibrary(dplyr)\nsomeData \u003c- tibble(\n  region = rep(c(\"transverse temporal\", \"insula\",\n           \"precentral\",\"superior parietal\"), 2), \n  p = sample(seq(0,.5,.001), 8),\n  groups = c(rep(\"g1\", 4), rep(\"g2\", 4))\n)\n\nsomeData %\u003e%\n  group_by(groups) %\u003e%\n  ggplot() +\n  geom_brain(atlas = dk, \n             position = position_brain(hemi ~ side),\n             aes(fill = p)) +\n  facet_wrap(~groups)\n```\n\nThe package also has several vignettes, to help you get started using it. \nYou can access it [here](https://ggseg.github.io/ggseg/)\n\nYou can also see one of the creators blog for introductions to its use [here](https://drmowinckels.io/blog/2021-03-14-new-ggseg-with-geom/)\n\n\n### Report bugs or requests  \nDon't hesitate to ask for support using [github issues](https://github.com/ggseg/ggseg/issues), or requesting new atlases. \nWhile we would love getting help in creating new atlases, you may also request atlases through the issues, and we will try to get to it. \n\n# Funding\nThis tool is partly funded by:  \n\n**EU Horizon 2020 Grant:** Healthy minds 0-100 years: Optimising the use of European brain imaging cohorts (Lifebrain).\n\n**Grant agreement number:** 732592.\n\n**Call:** Societal challenges: Health, demographic change and well-being\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/ggseg.github.io%2Fggseg%2F","html_url":"https://awesome.ecosyste.ms/projects/ggseg.github.io%2Fggseg%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/ggseg.github.io%2Fggseg%2F/lists"}