{"id":15051523,"url":"https://github.com/egpivo/spatpca","last_synced_at":"2026-04-02T01:05:14.490Z","repository":{"id":54560046,"uuid":"79623923","full_name":"egpivo/SpatPCA","owner":"egpivo","description":"R Package: Regularized Principal Component Analysis for Spatial Data","archived":false,"fork":false,"pushed_at":"2024-08-26T16:43:57.000Z","size":115207,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T21:20:14.780Z","etag":null,"topics":["admm","covariance-estimation","eigenfunctions","lasso","matrix-factorization","pca","r","r-package","rcpparmadillo","rcppparallel","regularization","spatial","spatial-data-analysis","splines"],"latest_commit_sha":null,"homepage":"https://egpivo.github.io/SpatPCA/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egpivo.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","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":"2017-01-21T04:37:27.000Z","updated_at":"2025-01-04T09:37:02.000Z","dependencies_parsed_at":"2023-02-15T21:31:08.755Z","dependency_job_id":"7a2b668d-d9f5-4bbe-aa89-cbbe0064af94","html_url":"https://github.com/egpivo/SpatPCA","commit_stats":{"total_commits":197,"total_committers":4,"mean_commits":49.25,"dds":"0.015228426395939132","last_synced_commit":"50143ac998301d1408a7dc2012b3bc4580991bf8"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/egpivo/SpatPCA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatPCA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatPCA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatPCA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatPCA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egpivo","download_url":"https://codeload.github.com/egpivo/SpatPCA/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egpivo%2FSpatPCA/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267617643,"owners_count":24116208,"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-07-29T02:00:12.549Z","response_time":2574,"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":["admm","covariance-estimation","eigenfunctions","lasso","matrix-factorization","pca","r","r-package","rcpparmadillo","rcppparallel","regularization","spatial","spatial-data-analysis","splines"],"created_at":"2024-09-24T21:36:31.633Z","updated_at":"2026-04-02T01:05:14.475Z","avatar_url":"https://github.com/egpivo.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpatPCA: Regularized Principal Component Analysis for Spatial Data\n\n[![R build status](https://github.com/egpivo/SpatPCA/workflows/R-CMD-check/badge.svg)](https://github.com/egpivo/SpatPCA/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/egpivo/SpatPCA/master.svg)](https://app.codecov.io/github/egpivo/SpatpCA?branch=master)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/SpatPCA?color=green)](https://cran.r-project.org/package=SpatPCA)\n[![Downloads (monthly)](https://cranlogs.r-pkg.org/badges/SpatPCA?color=brightgreen)](https://www.r-pkg.org/pkg/SpatPCA)\n[![Downloads (total)](https://cranlogs.r-pkg.org/badges/grand-total/SpatPCA?color=brightgreen)](https://www.r-pkg.org/pkg/SpatPCA)\n[![JCGS](https://img.shields.io/badge/JCGS-10.18637%2F10618600.2016.1157483-brightgreen)](https://doi.org/10.1080/10618600.2016.1157483)\n\n\n## Description\n**SpatPCA** is an R package designed for efficient regularized principal component analysis, providing the following features:\n\n- Identify dominant spatial patterns (eigenfunctions) with both smooth and localized characteristics.\n- Conduct spatial prediction (Kriging) at new locations.\n- Adapt to regularly or irregularly spaced data, spanning 1D, 2D, and 3D datasets.\n- Implement using the alternating direction method of multipliers (ADMM) algorithm.\n\n\n## Installation\nYou can install **SpatPCA** using either of the following methods:\n\n### Install from CRAN\n\n```r\ninstall.packages(\"SpatPCA\")\n```\n### Install the Development Version from GitHub\n```r\nremotes::install_github(\"egpivo/SpatPCA\")\n```\n### Compilation Requirements\nTo compile C++ code with the required [`RcppArmadillo`](https://CRAN.R-project.org/package=RcppArmadillo) package, follow these instructions based on your operating system:\n\n\n#### For Windows users\nInstall [Rtools](https://CRAN.R-project.org/bin/windows/Rtools/)\n\n#### For Mac users\n1. Install Xcode Command Line Tools\n2. Install the `gfortran` library. You can achieve this by running the following commands in the terminal:\n  ```bash\n  brew update\n  brew install gcc\n  ```\n\n  For a detailed solution, refer to [this link](https://blog.thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/index.html), or download and install the library [`gfortran`](https://github.com/fxcoudert/gfortran-for-macOS/releases) to resolve the error `ld: library not found for -lgfortran`.\n\n## Usage\nTo use **SpatPCA**, first load the package:\n\n```r\nlibrary(SpatPCA)\n```\n\nThen, apply the `spatpca` function with the following syntax:\n```r\nspatpca(position, realizations)\n```\n   - Input: Realizations with the corresponding positions.\n   - Output: Return the most dominant eigenfunctions automatically.\n\nFor more details, refer to the [Demo](https://egpivo.github.io/SpatPCA/articles/).\n\n## Development\nTo submit package checks to R-hub v2, source `tools/run_rhub_checks.R` and use\n\n```r\nsubmission \u003c- run_rhub_checks(confirmation = TRUE)\nsummarise_rhub_jobs(submission)\n```\n\nAdjust `include_os`, `platforms`, or `email` as needed. `summarise_rhub_jobs()`\nprints the submission id plus GitHub URLs where each builder’s logs appear.\n\n## Authors\n- [Wen-Ting Wang](https://www.linkedin.com/in/wen-ting-wang-6083a17b) ([GitHub](https://github.com/egpivo))\n- [Hsin-Cheng Huang](https://sites.stat.sinica.edu.tw/hchuang/)\n \n## Maintainer\n[Wen-Ting Wang](https://www.linkedin.com/in/wen-ting-wang-6083a17b) ([GitHub](https://github.com/egpivo))\n\n## Reference\nWang, W.-T. and Huang, H.-C. (2017). [Regularized principal component analysis for spatial data](https://arxiv.org/pdf/1501.03221.pdf). *Journal of Computational and Graphical Statistics*, **26**, 14-25.\n\n \n## License\nGPL (\u003e= 2)\n\n## Citation\n- To cite package ‘SpatPCA’ in publications use:\n```\n  Wang W, Huang H (2023). SpatPCA: Regularized Principal Component Analysis for\n  Spatial Data_. R package version 1.3.5,\n  \u003chttps://CRAN.R-project.org/package=SpatPCA\u003e.\n```\n\n- A BibTeX entry for LaTeX users is\n```\n  @Manual{,\n    title = {SpatPCA: Regularized Principal Component Analysis for Spatial Data},\n    author = {Wen-Ting Wang and Hsin-Cheng Huang},\n    year = {2023},\n    note = {R package version 1.3.5},\n    url = {https://CRAN.R-project.org/package=SpatPCA},\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegpivo%2Fspatpca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegpivo%2Fspatpca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegpivo%2Fspatpca/lists"}