{"id":16276680,"url":"https://github.com/thomased/spec.vis","last_synced_at":"2026-04-22T21:34:27.314Z","repository":{"id":85949376,"uuid":"181401104","full_name":"thomased/spec.vis","owner":"thomased","description":"A database/R data package of photoreceptor absorbance and ocular transmission spectra and their metadata","archived":false,"fork":false,"pushed_at":"2019-04-17T09:42:22.000Z","size":4461,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T16:55:20.509Z","etag":null,"topics":["database","modelling","r","vision"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomased.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-15T02:50:57.000Z","updated_at":"2019-04-17T09:42:24.000Z","dependencies_parsed_at":"2023-03-22T01:49:29.466Z","dependency_job_id":null,"html_url":"https://github.com/thomased/spec.vis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thomased/spec.vis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomased%2Fspec.vis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomased%2Fspec.vis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomased%2Fspec.vis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomased%2Fspec.vis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomased","download_url":"https://codeload.github.com/thomased/spec.vis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomased%2Fspec.vis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262739272,"owners_count":23356695,"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":["database","modelling","r","vision"],"created_at":"2024-10-10T18:49:52.550Z","updated_at":"2026-04-22T21:34:22.246Z","avatar_url":"https://github.com/thomased.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# `spec.vis`\n\n[![Project Status: WIP – Initial development is in progress, but there\nhas not yet been a stable, usable release suitable for the\npublic.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n[![cran\nversion](https://www.r-pkg.org/badges/version-ago/spec.vis)](https://cran.r-project.org/package=spec.vis/)\n[![Build\nStatus](https://travis-ci.org/thomased/spec.vis.svg?branch=master)](https://travis-ci.org/thomased/spec.vis/)\n[![Coverage\nstatus](https://codecov.io/gh/thomased/spec.vis/branch/master/graph/badge.svg)](https://codecov.io/github/thomased/spec.vis?branch=master)\n[![cran\ndownloads](https://cranlogs.r-pkg.org/badges/grand-total/spec.vis)](https://cran.r-project.org/package=spec.vis/)\n\n## Spectral sensitivity data package\n\n`spec.vis` is a mini-database and R data package of receptor absorbance\nand ocular transmission spectra with metadata, useful for\nvisual/colorspace modelling among other things. It currently contains\n**410 spectra** from **119 species**.\n\n## Installation\n\nTo download the development version of `spec.vis`, you can:\n\n  - use the [`remotes`](https://github.com/r-lib/remotes) package:\n\n\u003c!-- end list --\u003e\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"thomased/spec.vis\")\n```\n\n  - download files from GitHub and install using `$R CMD INSTALL` or,\n    from within R:\n\n\u003c!-- end list --\u003e\n\n``` r\ninstall.packages(path, type = \"source\", repos = NULL)\n```\n\n## Browsing and searching spectra\n\nThe entire database can be loaded into memory by simply calling\n`data(specvis_spectra)`, along with the metadata `data(specvis_meta)`\nand dictionary `data(specvis_dict)`.\n\nAlternately, the `specvis_search()` function allows you to query the\navailable data and return a select subset based on search terms\n(e.g. `specvis_search(genus == 'bombus')`), with the option of\nreturning either raw spectra or metadata via the `return.spectra`\nargument.\n\nFinally, if you’re not an `R` person, the ‘database’ boils down to a few\ntext files located in the `data.raw/` directory, which you’re free to\ndownload and use as you please.\n\n## Example\n\n    # Load packages\n    library(spec.vis)\n    library(pavo)\n    \n    # Grab some spectra\n    apis \u003c- specvis_search(genus == 'apis', species == 'mellifera', return.spectra = TRUE)\n    canis \u003c- specvis_search(genus == 'canis', species == 'familiaris', return.spectra = TRUE)\n    bluetit \u003c- specvis_search(genus == 'cyanistes', species == 'caeruleus', return.spectra = TRUE)\n    \n    # Plot them\n    par(mfrow=c(1,3))\n    plot(as.rspec(canis), main = 'Canis familiaris', ylab = 'Absorbance', xlab = '')\n    plot(as.rspec(apis), ylab = '', main = 'Apis mellifera (f)')\n    plot(as.rspec(bluetit), ylab = '', main = 'Cyanistes caeruleus', xlab = '')\n\n\u003cimg src=\"READMEeg.png\" title=\"Example spectra available in the package.\" alt=\"Example spectra available in the package.\" width=\"80%\" style=\"display: block; margin: auto;\" /\u003e\n\n## Contributing\n\nContributions of spectra to the package are most welcome. There are a\nfew ways to do so, from most- to least-involved:\n\n  - **via pull request**\n      - Install the `spec.vis` package in the usual manner.\n      - Fork and clone the package repository.\n      - Append your spectra to the `data-raw/specvis_spectra.csv` file,\n        and complete all metadata fields in the\n        `data-raw/specvis_meta.csv` file. Spectra should follow the\n        naming convention `\u003cspecies\u003e_\u003cgenus\u003e.\u003cinteger\u003e`, where\n        `\u003cinteger\u003e` begins at 1 and proceeds from the shortest- to\n        longest- wavelength sensitive receptor.\n      - Run the function `specvis_rebuild()` to rebuild the database\n        (i.e. to save the raw data as `.rda` files.\n      - Commit and push your changes, and submit a pull request.\n  - **via email, v1**\n      - Take a look at the structure of the package’s spectral data\n        (`data(specvis_spectra)`) and metadata (`data(specvis_meta)`).\n      - [Email me](mailto:thomas.white@sydney.edu.au) your data in as\n        similar a format as possible (but I’ll take anything).\n  - **via email, v2**\n      - [Email me](mailto:thomas.white@sydney.edu.au) a paper containing\n        data that you’d like added (containing either lambda-max values\n        or plotted absorbance curves, at a minimum).\n\n## Citing\n\nIf you find the package useful, please cite the original data\nsource(s)and the `spec.vis` package (see `citation(\"spec.vis\")` for the\nreference).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomased%2Fspec.vis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomased%2Fspec.vis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomased%2Fspec.vis/lists"}