{"id":19740269,"url":"https://github.com/nceas/flowers","last_synced_at":"2025-10-28T12:44:51.314Z","repository":{"id":71243723,"uuid":"226294943","full_name":"NCEAS/flowers","owner":"NCEAS","description":"R package for generating flower plots","archived":false,"fork":false,"pushed_at":"2025-06-12T23:54:35.000Z","size":225,"stargazers_count":2,"open_issues_count":5,"forks_count":2,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-07-18T14:53:21.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NCEAS.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-12-06T09:41:12.000Z","updated_at":"2025-06-12T23:53:10.000Z","dependencies_parsed_at":"2023-05-18T19:30:46.878Z","dependency_job_id":null,"html_url":"https://github.com/NCEAS/flowers","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/NCEAS/flowers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fflowers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fflowers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fflowers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fflowers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NCEAS","download_url":"https://codeload.github.com/NCEAS/flowers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fflowers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281441022,"owners_count":26501758,"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-28T02:00:06.022Z","response_time":60,"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":[],"created_at":"2024-11-12T01:20:17.922Z","updated_at":"2025-10-28T12:44:51.298Z","avatar_url":"https://github.com/NCEAS.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# flowers\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/flowers)](https://CRAN.R-project.org/package=flowers)\n[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n\u003c!-- badges: end --\u003e\n\nFlowers is a package for generating flower plots.  It was derived from code\nfrom Jim Regetz at NCEAS, and then rewritten and extended by the OHI project.\nThis package formalizes the approach into an easily re-usable function\nfor generating custom flower plots for multiple scenarios.\n\n## Quick Start\n\nThis is a basic example which shows you how to create a flower plot from an \nappropriately structured data set:\n\n```{r example, message=FALSE, warning=FALSE, fig.width=8, fig.height=8, out.width=\"70%\"}\nlibrary(flowers)\ndata(ohi)\nplot_flower(ohi, \"OHI Example Flower\")\n```\n\nCurrently `plot_flower()` expects particular column names and semantics, but\nthis could be made more flexible.  See the structure of OHI for an example. In particular,\nit uses columns `score`, `weight`, `label`, and `category` to create the plot.\n\nBy default the flower petals are colored proportionally to the `score` values as \nshow in the OHI example above.  One can provide a color palette (`colors`) to the \n`plot_flower()` function to control the gradient used.\n\nThe `weight` variable controls the relative widths of the petals, and should range\nfrom 0 to 1. The petal labels are taken from the `label` variable, and the \ngrouping category labels are taken from the `category` variable. Other\ncolumns in the data frame are ignored.\n\n```{r ohi_structure, echo=FALSE}\nstr(ohi)\n```\n\nAlternatively, by setting `fixed_colors = TRUE` you can also color the petals \nwith discrete colors determined by the `label` values, in which case \nyou will likely want to provide a `colors` palette with at least as many colors \nas you have petals in the plot. Here's an example with four fixed petals, in \nwhich we also provide only missing values to `category` so that no grouping \nlabels are used:\n\n```{r fair_plot, message=FALSE, warning=FALSE, fig.width=8, fig.height=8, out.width=\"70%\"}\n    library(dplyr)\n    df \u003c- data.frame(order = c(1, 4, 3, 2),\n                        score = c(90, 80, 70, 60),\n                        weight = c(1, 1, 1, 1),\n                        goal = c(\"F\", \"A\", \"I\", \"R\"),\n                        label = c(\"Findable\", \"Accessible\", \"Interoperable\", \"Reusable\"),\n                        category = c(NA, NA, NA, NA),\n                        stringsAsFactors = FALSE) %\u003e% arrange(order)\n    d1_colors \u003c- c( \"#c70a61\", \"#ff582d\", \"#1a6379\", \"#60c5e4\")\n    plot_flower(df, title = \"FAIR Metrics\", fixed_colors=TRUE, colors = d1_colors)\n```\n\n## Installation\n\nYou can install the development version of flowers from [GitHub](https://github.com/mbjones/flowers) with:\n\n``` r\ndevtools::install_github(\"mbjones/flowers\")\n```\n\nYou can install the released version of flowers from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"flowers\")\n```\n\n[![nceas_footer](https://www.nceas.ucsb.edu/files/newLogo_0.png)](http://www.nceas.ucsb.edu)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnceas%2Fflowers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnceas%2Fflowers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnceas%2Fflowers/lists"}