{"id":13788769,"url":"https://github.com/m-clark/visibly","last_synced_at":"2025-04-30T08:08:52.203Z","repository":{"id":56628830,"uuid":"136822727","full_name":"m-clark/visibly","owner":"m-clark","description":"👓 Functions related to R visualizations","archived":false,"fork":false,"pushed_at":"2020-10-28T16:37:14.000Z","size":92690,"stargazers_count":62,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-18T02:38:54.835Z","etag":null,"topics":["adjacent","brms","coefficients","colorgorical","complementary","gam","ggplot2-themes","heatmap","mermod","mgcv","mixed-models","palettes","plotly-theme","r","r-package","random-effects","stan","tetradic","triadic","visualization"],"latest_commit_sha":null,"homepage":"https://m-clark.github.io/visibly","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/m-clark.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}},"created_at":"2018-06-10T15:52:32.000Z","updated_at":"2024-10-19T20:14:56.000Z","dependencies_parsed_at":"2022-08-15T22:11:01.021Z","dependency_job_id":null,"html_url":"https://github.com/m-clark/visibly","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-clark%2Fvisibly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-clark%2Fvisibly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-clark%2Fvisibly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-clark%2Fvisibly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-clark","download_url":"https://codeload.github.com/m-clark/visibly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227185407,"owners_count":17744371,"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":["adjacent","brms","coefficients","colorgorical","complementary","gam","ggplot2-themes","heatmap","mermod","mgcv","mixed-models","palettes","plotly-theme","r","r-package","random-effects","stan","tetradic","triadic","visualization"],"created_at":"2024-08-03T21:00:53.232Z","updated_at":"2024-11-29T18:14:33.997Z","avatar_url":"https://github.com/m-clark.png","language":"R","readme":"---\noutput:\n  md_document:\n    variant: gfm\n---\n\n[![R build status](https://github.com/m-clark/mixedup/workflows/R-CMD-check/badge.svg)](https://github.com/m-clark/mixedup/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/m-clark/visibly/master.svg)](https://codecov.io/github/m-clark/visibly?branch=master)\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![Lifecycle Status](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/)\n\n\n```{r setup, echo=FALSE, include=FALSE, cache=FALSE}\nknitr::opts_chunk$set(\n  echo = T,\n  message = F,\n  warning = F,\n  error = F,\n  collapse = TRUE,\n  comment = NA,\n  #R.options=list(width=220),   # code\n  dev.args = list(bg = 'transparent'),\n  dev = 'png',\n  # viz\n  fig.path = \"man/figures/README-\",\n  fig.align = 'center',\n  out.width = '75%',\n  fig.asp = .75,\n  cache.rebuild = F,\n  cache = F\n)                                         # cache\n```\n\n\n# visibly\n\n\u003cimg src=\"man/figures/visibly_hex.png\" align=\"right\" width = 200/\u003e\n\n\nVisibly is a handful of functions I use for color palettes, themes, etc. in R.  Inside you will find:\n\n- some ready-made palettes, e.g. based on R blue and Stan red\n- a function to quickly and easily create palettes with using `colortools::complementary` `colortools::adjacent` etc. \n- clean, web-friendly themes for ggplot2 and plotly\n- a function to interact with [colorgorical](http://vrl.cs.brown.edu/color/)\n- coefficient plots for fixed and random effects, plotting of GAM results.\n\n## Installation\n\nInstall the development version directly from GitHub:\n\n```{r install, eval=FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"m-clark/visibly\")\n```\n\nVisibly is currently in its early stages, so more may be added soon.  For some additional palettes for those fond of another time, you might be interested in [NineteenEightyR](https://github.com/m-clark/NineteenEightyR).\n\n\n## Examples\n\nCreate a palette from a single starting point. This requires the \u003cspan class=\"pack\"\u003ecolortools\u003c/span\u003e package to create equally spaced colors.\n\n```{r example}\nlibrary(visibly)\ncreate_palette('papayawhip')\n```\n\n\nPlot it to get a feel for things. \n\n```{r plot}\ncreate_palette('#ff5500', plot = T)\n```\n\nOne of the built-in palettes is based on R's blue. Others are based on [Stan's](https://github.com/stan-dev/stan) red, [plotly's](https://github.com/ropensci/plotly) base colors, and the red-blue palette from [RColorBrewer](https://github.com/cran/RColorBrewer/blob/master/R/ColorBrewer.R).\n\n\nA clean theme for \u003cspan class=\"pack\"\u003eplotly\u003c/span\u003e.\n\n\u003c!-- Plotly does all wonder of screwup here because size is so hard, so just export the png --\u003e\n\n```{r example4, eval=FALSE}\nlibrary(plotly)\nmtcars %\u003e% \n  plot_ly(x=~wt, y=~mpg, color=~cyl) %\u003e% \n  add_markers(marker=list(size=15)) %\u003e% \n  theme_plotly()\n```\n\n\u003cimg src=\"man/figures/plotly_wtf.png\" style=\"display:block; margin: 0 auto;\"\u003e\n\nVisualize a correlation matrix via factor analysis.\n\n```{r corrheat1, eval=FALSE}\ndata('bfi', package = 'visibly')\ncor_matrix = cor(bfi, use='pair')\ncorr_heat(cor_matrix)\n```\n\n\u003cimg src='man/figures/corr_heat.png' style=\"display:block; margin: 0 auto;\" width=50%\u003e\n\u003cbr\u003e\n\u003cimg src='man/figures/corr_heat_3d.png' style=\"display:block; margin: 0 auto;\" width=50%\u003e\n\n\nPlot some model coefficients.  Requires the \u003cspan class=\"pack\"\u003escico\u003c/span\u003e package.\n\n```{r lm0}\nfit_lm = lm(mpg ~ ., mtcars)\nplot_coefficients(fit_lm)\n```\n\nPlot GAM results\n\n```{r gam}\nlibrary(mgcv)\nd = gamSim()\n\ngam_model = gam(y ~ x0 + s(x1) + s(x2, bs='gp') + s(x3, bs='ps'), data=d)\n\nplot_gam(gam_model, main_var = x2)\nplot_gam_check(gam_model)\n```\n\n\n\nSee the [intro](https://m-clark.github.io/visibly/articles/intro.html) for more.\n","funding_links":[],"categories":["R","ggplot"],"sub_categories":["Themes"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-clark%2Fvisibly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-clark%2Fvisibly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-clark%2Fvisibly/lists"}