{"id":22141184,"url":"https://github.com/marta-barea/visnir-paraffinwax-hydroprocessing-ml","last_synced_at":"2026-07-06T20:31:27.537Z","repository":{"id":263832967,"uuid":"891525749","full_name":"Marta-Barea/visnir-paraffinwax-hydroprocessing-ml","owner":"Marta-Barea","description":"Repository for analyzing paraffin wax using Vis-NIR and machine learning techniques to assess hydroprocessing.","archived":false,"fork":false,"pushed_at":"2024-12-15T17:19:59.000Z","size":11519,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T11:21:26.075Z","etag":null,"topics":["chemoinformatics","machine-learning","petroleum","r","rstudio","vis-nir-spectroscopy"],"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/Marta-Barea.png","metadata":{"files":{"readme":"README.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-20T13:46:59.000Z","updated_at":"2024-12-15T17:20:02.000Z","dependencies_parsed_at":"2024-12-01T21:11:10.791Z","dependency_job_id":"8112b70b-f569-451d-87e7-5c6d6d9cf89a","html_url":"https://github.com/Marta-Barea/visnir-paraffinwax-hydroprocessing-ml","commit_stats":null,"previous_names":["marta-barea/machine-learning_visnir_paraffinwax_ht","marta-barea/visnir-paraffinwax-hydroprocessing-ml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Marta-Barea/visnir-paraffinwax-hydroprocessing-ml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marta-Barea%2Fvisnir-paraffinwax-hydroprocessing-ml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marta-Barea%2Fvisnir-paraffinwax-hydroprocessing-ml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marta-Barea%2Fvisnir-paraffinwax-hydroprocessing-ml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marta-Barea%2Fvisnir-paraffinwax-hydroprocessing-ml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marta-Barea","download_url":"https://codeload.github.com/Marta-Barea/visnir-paraffinwax-hydroprocessing-ml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marta-Barea%2Fvisnir-paraffinwax-hydroprocessing-ml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002787,"owners_count":26083468,"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-10T02:00:06.843Z","response_time":62,"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":["chemoinformatics","machine-learning","petroleum","r","rstudio","vis-nir-spectroscopy"],"created_at":"2024-12-01T21:11:03.344Z","updated_at":"2025-10-10T05:11:07.798Z","avatar_url":"https://github.com/Marta-Barea.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Vis-NIRS Wax Analysis Scripts**\n\nThis repository contains a suite of R scripts and a Shiny web application for analyzing wax samples using Visible-Near Infrared (Vis-NIR) spectroscopy. These tools include preprocessing, classification, clustering, and dimensionality reduction methods tailored to study the effects of hydroprocessing on waxes.\n\n---\n\n## 🔍 **Overview of Scripts**\n\n1. **Spectra_VisNIRS_Waxes_Type.R**\n   - Prepares Vis-NIR spectral data for analysis using smoothing, normalization, and scatter correction.\n\n2. **Gaussian_SVM_VisNIRS_Waxes_HT.R**\n   - Implements Gaussian Support Vector Machine (SVM) models to classify hydroprocessing grades.\n\n3. **RF_VisNIRS_Waxes_HT.R**\n   - Applies Random Forest classification to determine wax hydroprocessing levels.\n\n4. **HCA_VisNIRS_Waxes_HIFI.R**\n   - Performs Hierarchical Cluster Analysis (HCA) with dendrogram visualizations to group wax samples.\n\n5. **PCA_VisNIRS_Waxes_HIFI.R**\n   - Conducts Principal Component Analysis (PCA) and visualizes eigenvalues, scores, and loadings.\n\n6. **app.R**\n   - A Shiny application for uploading, preprocessing, visualizing, and classifying wax data.\n\n---\n\n## 🛠️ **System Requirements**\n\n### Software\n- **R version 4.4.0** (2024-04-24, \"Puppy Cup\")\n- RStudio (optional but recommended)\n\n### R Packages and Versions\n| **Task**                          | **Package**         | **Version**   |\n|------------------------------------|---------------------|---------------|\n| Spectral preprocessing             | `prospectr`         | 0.2.7         |\n| Clustering (HCA)                   | `stats`             | 4.4.0         |\n| Dendrogram visualization           | `factoextra`        | 1.0.7         |\n| PCA                                | `stats`             | 4.4.0         |\n| PCA visualization                  | `factoextra`        | 1.0.7         |\n| Machine learning (SVM, RF)         | `caret`             | 6.0-94        |\n| Random Forest models               | `ranger`            | 0.17.0        |\n| Data manipulation                  | `dplyr`, `data.table`, `stringr` | 1.1.4, 1.16.2, 1.5.1 |\n| Radar charts                       | `ggplot2`, `ggiraphExtra` | 3.5.1, 0.3.0 |\n| Visualization                      | `ggplot2`, `viridis`, `egg` | 3.5.1, 0.6.5, 0.4.5 |\n| Web application                    | `shiny`             | 1.9.1         |\n| Web themes                         | `shinythemes`       | 1.2.0         |\n\n---\n\n## 🚀 **How to Use**\n\n### Running Scripts\n1. Open the R script in RStudio.\n2. Update file paths and parameters as needed.\n3. Run the script to analyze wax data.\n\n### Running the Shiny Application\n1. Place `app.R`, `weighted_rf.rds`, and `test_data.xlsx` in the same folder.\n2. In your R console, run: \n   ``` R \n      shiny::runApp(\"app.R\") \n   ``` \n3. Use the web interface to:\n- 📁 **Upload** `.csv` or `.xlsx` data files.\n- 🛠️ **Preprocess** data using advanced filtering techniques.\n- 🤖 **Predict** hydroprocessing grades with AI.\n\n---\n\n### 📂 **Example Dataset**\nA sample dataset (`test_data.xlsx`) is included for demonstration purposes. It contains Vis-NIR spectral readings and hydroprocessing grades for various wax samples.\n\n---\n\n### ✨ **Features**\n- **Preprocessing**: Savitzky–Golay smoothing and scatter correction.\n- **Clustering**: HCA with dendrogram visualization.\n- **Dimensionality Reduction**: PCA with eigenvalues, score, and loading plots.\n- **Machine Learning**: SVM and Random Forest models for hydroprocessing classification.\n- **Web Application**: Intuitive Shiny interface for non-technical users.\n\n---\n\n### 🤝 **Contributors**\n- **Valendra Tech, S.L.**\n  - Experts in AI-driven data analysis solutions.\n- **University of Cádiz (AGR-291 Research Group)**\n  - Specializing in hydrocarbon characterization and spectroscopy.\n\n---\n\n### 📜 **License**\nThis project is licensed under the GNU GENERAL PUBLIC License. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarta-barea%2Fvisnir-paraffinwax-hydroprocessing-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarta-barea%2Fvisnir-paraffinwax-hydroprocessing-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarta-barea%2Fvisnir-paraffinwax-hydroprocessing-ml/lists"}