OpenSpecy

Raman and (FT)IR spectral analysis tool for plastic particles and other environmental samples.
https://github.com/wincowgerdev/openspecy-package

Category: Industrial Ecology
Sub Category: Circular Economy and Waste

Keywords from Contributors

spectroscopy

Last synced: about 7 hours ago
JSON representation

Repository metadata

Analyze, Process, Identify, and Share, Raman and (FT)IR Spectra

README.md

OpenSpecy

Analyze, Process, Identify, and Share Raman and (FT)IR Spectra

CRAN version
Project Status
R-CMD-check
Codecov test coverage
License: CC BY 4.0
DOI
Website

Raman and (FT)IR spectral analysis tool for
environmental samples with a special focus on microplastics (Cowger et al. 2025, doi:
10.1021/acs.analchem.5c00962).
With read_any(), Open Specy provides a single function for reading individual,
batch, or map spectral data files like .asp, .csv, .jdx, .spc, .spa, .0, and
.zip. process_spec() simplifies processing spectra, including smoothing,
baseline correction, range restriction and flattening, intensity conversions,
wavenumber alignment, and min-max normalization.
Spectra can be identified in batch using an onboard reference library
using match_spec(). A bundled Shiny app is available via run_app()
or directly on this website.

Use OpenSpecy online

Use the hosted browser app on the
OpenSpecy website. The
local app remains available through run_app().

Installation

OpenSpecy is available from CRAN and GitHub.

Install from CRAN (stable version)

You can install the latest release of OpenSpecy from
CRAN with:

install.packages("OpenSpecy")

Install from GitHub (development version)

To install the development version of this package, paste the following code
into your R console (requires devtools):

if (!require(devtools)) install.packages("devtools")
devtools::install_github("wincowgerDEV/OpenSpecy-package")

Getting started

library(OpenSpecy)
run_app()

Simple workflow for single spectral identification

See package vignette
for a detailed standard operating procedure.

# Fetch current spectral library from https://osf.io/x7dpz/
get_lib("derivative")

# Load library into global environment
spec_lib <- load_lib("derivative")

# Read sample spectrum
raman_hdpe <- read_extdata("raman_hdpe.csv") |> 
  read_any()

# Look at the spectrum
plotly_spec(raman_hdpe)

# Process the spectra and conform it to the library format
raman_proc <- raman_hdpe |>
  process_spec(conform_spec_args = list(range = spec_lib$wavenumbers), 
               smooth_intens = T, make_rel = T)

# Compare raw and processed spectra
plotly_spec(raman_hdpe, raman_proc)

top_matches <- match_spec(raman_proc, library = spec_lib, na.rm = T, top_n = 5,
                          add_library_metadata = "sample_name",
                          add_object_metadata = "col_id")

# Print the top 5 results with relevant metadata
top_matches[, c("object_id", "library_id", "match_val", "SpectrumType",
                "SpectrumIdentity")]

# Get all metadata for the matches
get_metadata(spec_lib, logic = top_matches$library_id)

Compressed Specs workflow

as_Specs() can compress map or library spectra for fast approximate matching.
The default workflow fits PCA and then Hilbert-encodes the PCA scores into exact
high/low 64-bit code rows.

model <- fit_specs_pca(spec_lib, n_components = 16)
library_specs <- as_Specs(spec_lib, model)
query_specs <- as_Specs(raman_proc, model,
                        limits = attr(library_specs, "hilbert_model"))

match_spec(query_specs, library_specs, top_n = 5)
decompress_spec(query_specs, index = 1)

Open Specy on Python

Kris Heath created a Open Specy python package!
https://pypi.org/project/openspi/

Citations

Cowger W, Steinmetz Z, Gray A, Munno K, Lynch J, Hapich H, Primpke S,
De Frond H, Rochman C, Herodotou O (2021). “Microplastic Spectral Classification
Needs an Open Source Community: Open Specy to the Rescue!”
Analytical Chemistry, 93(21), 7543–7548. doi:
10.1021/acs.analchem.1c00123.

Cowger W, Steinmetz Z, Leong N, Faltynkova A, Sherrod H (2024). “OpenSpecy: Analyze,
Process, Identify, and Share Raman and (FT)IR Spectra.” R package, 1.0.8.
https://github.com/wincowgerDEV/OpenSpecy-package.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 869
Total Committers: 6
Avg Commits per committer: 144.833
Development Distribution Score (DDS): 0.421

Commits in past year: 97
Committers in past year: 1
Avg Commits per committer in past year: 97.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Win Cowger, PhD w****r@g****m 503
Zacharias Steinmetz s****z@u****e 202
Zacharias Steinmetz g****t@z****e 135
nickleong20 n****k@m****g 15
hsherrod2019 h****9@g****m 9
hazelvaq h****8@g****m 5

Committer domains:


Issue and Pull Request metadata

Last synced: 4 days ago

Total issues: 83
Total pull requests: 80
Average time to close issues: 5 months
Average time to close pull requests: 30 days
Total issue authors: 11
Total pull request authors: 2
Average comments per issue: 3.1
Average comments per pull request: 3.48
Merged pull request: 70
Bot issues: 0
Bot pull requests: 0

Past year issues: 5
Past year pull requests: 4
Past year average time to close issues: N/A
Past year average time to close pull requests: about 3 hours
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 3
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/wincowgerdev/openspecy-package

Top Issue Authors

  • wincowgerDEV (66)
  • zsteinmetz (6)
  • valentinavan (2)
  • GCov (2)
  • philipp-baumann (1)
  • paloeffler (1)
  • joe007li (1)
  • ardcarvalho (1)
  • nletwin97 (1)
  • MPresearcher (1)
  • zzhui43 (1)

Top Pull Request Authors

  • zsteinmetz (47)
  • wincowgerDEV (33)

Top Issue Labels

  • enhancement (48)
  • bug (25)
  • Shiny app (17)
  • R package (15)
  • good first issue (5)
  • documentation (4)
  • question (4)
  • wontfix (2)

Top Pull Request Labels

  • codex (4)
  • documentation (1)
  • enhancement (1)
  • Shiny app (1)

Package metadata

proxy.golang.org: github.com/wincowgerdev/openspecy-package

proxy.golang.org: github.com/wincowgerDEV/OpenSpecy-package

cran.r-project.org: OpenSpecy

Analyze, Process, Identify, and Share Raman and (FT)IR Spectra

  • Homepage: https://github.com/wincowgerDEV/OpenSpecy-package/
  • Documentation: http://cran.r-project.org/web/packages/OpenSpecy/OpenSpecy.pdf
  • Licenses: CC BY 4.0
  • Latest release: 1.5.3 (published over 1 year ago)
  • Last Synced: 2026-07-27T23:01:06.792Z (2 days ago)
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 355 Last month
  • Rankings:
    • Forks count: 8.331%
    • Stargazers count: 16.258%
    • Average: 25.553%
    • Dependent packages count: 29.797%
    • Dependent repos count: 35.455%
    • Downloads: 37.924%
  • Maintainers (1)

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/check-r-package v1 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
  • r-lib/actions/setup-r-dependencies v1 composite
DESCRIPTION cran
  • R >= 4.0.0 depends
  • digest * imports
  • dplyr * imports
  • hexView * imports
  • hyperSpec * imports
  • osfr * imports
  • rlang * imports
  • shiny * imports
  • signal * imports
  • DT * suggests
  • config * suggests
  • curl * suggests
  • data.table * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • loggit * suggests
  • mongolite * suggests
  • plotly * suggests
  • rdrop2 * suggests
  • rmarkdown * suggests
  • shinyBS * suggests
  • shinyWidgets * suggests
  • shinyjs * suggests
  • shinythemes * suggests
  • testthat >= 3.0.0 suggests
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite

Score: 11.900796704677346