{"id":15893688,"url":"https://github.com/brownag/labtaxa","last_synced_at":"2026-02-14T20:17:24.867Z","repository":{"id":152916787,"uuid":"627455260","full_name":"brownag/labtaxa","owner":"brownag","description":"Analysis-ready Rocker RStudio Server-based Container for the USDA-NRCS-NCSS Kellogg Soil Survey Lab Data Mart 'SQLite' Snapshot","archived":false,"fork":false,"pushed_at":"2026-02-11T15:30:43.000Z","size":472,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-11T17:18:55.467Z","etag":null,"topics":["database","docker","geopackage","kssl","lab","ncss","r","rstudio","rstudio-server","soil","soil-survey"],"latest_commit_sha":null,"homepage":"https://brownag.github.io/labtaxa","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/brownag.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-13T13:58:16.000Z","updated_at":"2026-02-11T06:01:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab9df644-bd34-4535-9ac2-82c49a7dacad","html_url":"https://github.com/brownag/labtaxa","commit_stats":{"total_commits":67,"total_committers":1,"mean_commits":67.0,"dds":0.0,"last_synced_commit":"0dc737ec03f2358ba69a61267624243c7ba645c8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brownag/labtaxa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownag%2Flabtaxa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownag%2Flabtaxa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownag%2Flabtaxa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownag%2Flabtaxa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brownag","download_url":"https://codeload.github.com/brownag/labtaxa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownag%2Flabtaxa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29455267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["database","docker","geopackage","kssl","lab","ncss","r","rstudio","rstudio-server","soil","soil-survey"],"created_at":"2024-10-06T08:12:45.386Z","updated_at":"2026-02-14T20:17:24.838Z","avatar_url":"https://github.com/brownag.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# labtaxa \n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/brownag/labtaxa/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/brownag/labtaxa/actions/workflows/R-CMD-check.yaml)\n[![docker-publish](https://github.com/brownag/labtaxa/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/brownag/labtaxa/actions/workflows/docker-publish.yml)\n[![Docker Pulls](https://badgen.net/docker/pulls/brownag/labtaxa?icon=docker\u0026label=pulls)](https://hub.docker.com/r/brownag/labtaxa/)\n[![Docker Size](https://badgen.net/docker/size/brownag/labtaxa?icon=docker\u0026label=size)](https://github.com/users/brownag/packages/container/package/labtaxa)\n[![pkgdown](https://img.shields.io/badge/docs-HTML-informational)](https://brownag.github.io/labtaxa/)\n\u003c!-- badges: end --\u003e\n\n## Overview\n\n**labtaxa** provides reproducible access to the USDA-NRCS Kellogg Soil Survey Laboratory (KSSL) database snapshots in R.\n\nThe package automatically downloads, caches, and loads the complete Lab Data Mart database (~65,000 soil profiles with detailed laboratory analyses) for soil science research and education.\n\n## Docker\n\nTo get up and running quickly you can use the Docker container. The `labtaxa` container is based on **rocker/rstudio** with a pinned R version (see Dockerfile for current version) for reproducibility. In addition to the standard RStudio tools, the container has:\n\n- **Cached Lab Data Mart GeoPackage** - Complete KSSL database (lab and spatial data)\n- **Morphologic database** - Derived from NASIS pedon field descriptions\n- **Pre-processed data** - `SoilProfileCollection` objects cached as RDS files\n- **Curated packages** - All dependencies for soil science analysis\n- **RStudio Server** - Full IDE accessible via web browser\n\nThe data and packages are exactly versioned (not floating), guaranteeing reproducible results: the same Docker tag always gives the same environment and data.\n\nFrom Docker Hub:\n\n``` sh\ndocker pull brownag/labtaxa:latest\n```\n\nOr from GitHub:\n\n``` sh\ndocker pull ghcr.io/brownag/labtaxa:latest\n```\n\n### Quick Start with Docker Compose (Recommended)\n\nThe easiest way to run the container is with **Docker Compose**. A `docker-compose.yml` file is included in this repository:\n\n``` sh\n# Clone the repository\ngit clone https://github.com/brownag/labtaxa.git\ncd labtaxa\n\n# Start the container (downloads image on first run)\ndocker-compose up -d\n\n# Stop the container\ndocker-compose down\n```\n\nThen open your web browser and navigate to `http://localhost:8787`. The default username is `rstudio` and the default password is `soilscience`.\n\n**Features:**\n\n- Persistent `projects/` directory for your work\n- Automatic volume management for package cache\n- Pre-configured resource limits (16GB memory, 4 CPUs)\n- Health checks to monitor container status\n\n### Running with Docker Run\n\nAlternatively, you can run the container directly:\n\n``` sh\ndocker run -d -p 8787:8787 -e PASSWORD=mypassword -v ~/Documents:/home/rstudio/Documents -e ROOT=TRUE brownag/labtaxa\n```\n\nThen open your web browser and navigate to `http://localhost:8787`. The default username is `rstudio` and the default password is `mypassword`.\n\n## R Package Installation\n\nYou can install the development version of {labtaxa} from GitHub:\n\n``` r\nif (!require(\"labtaxa\")) \n remotes::install_github(\"brownag/labtaxa\")\n```\n\n## Example\n\nDownload (and cache) the latest Lab Data Mart SQLite snapshot from \u003chttps://ncsslabdatamart.sc.egov.usda.gov/\u003e like so:\n\n```{r example, echo = TRUE}\nlibrary(labtaxa)\nldm \u003c- get_LDM_snapshot()\n```\n\nDownloaded and derived files will be cached in platform-specific directory specified by `ldm_data_dir()` using `cache_labtaxa()`\n\nIn the Docker container the snapshot has already been created and cached from the latest data (as of the last time the container was built). Updates to the method used to create the cache, as well as scheduled (monthly) updates occur.\n\nThe cached data help to get off and running quickly analyzing the entire KSSL database using the [{aqp}](https://cran.r-project.org/package=aqp) R package toolchain. \n\nThe lab data are pre-loaded in a large SoilProfileCollection object (over 65,000 profiles). In only a few seconds from when you have the Docker container loaded, you can be filtering and processing the lab data object. Downloading archives of the complete databases can take 10s of minutes to a couple hours (depending on internet connection). Only in cases where the absolute most recent data are needed would require doing a cache update. \n\nThe downloaded databases (GeoPackage, SQLite) are queried locally using {soilDB} functions `fetchLDM()` and `fetchNASIS()`. The {soilDB} functions can take a couple minutes to process on larger databases like this, so the container building process front loads these more costly processing steps. Querying the data using a method like this essentially precedes all analyses. soilDB provides standard aggregation methods that produce {aqp} SoilProfileCollections, which provide a convenient data structure for working with horizon and site level data associated with specific soil profiles. \n\nWhen you start up {labtaxa} in the Docker container you will have the latest database and the first-step data object (as if you ran the {soilDB} functions) readily available for post-processing for answering specific questions. \n\n```{r example2, echo = TRUE}\nldm\n```\n\nIf you are running on your own machine you will have to run `get_LDM_snapshot()` at least once (as above) before the `load_labtaxa()` command works. In future runs you will not need to re-download or prepare the data unless you need to update the cache.\n\n## Data Versioning Strategy\n\n**labtaxa** uses semantic versioning for reproducibility:\n\n- `latest` - Most recent data snapshot (always updated)\n- `YYYY.MM` - Specific month snapshot (e.g., `2026.02` for February 2026 data)\n- `YYYY.MM.DD` - Specific day snapshot (rare, for patch builds)\n\n**For reproducible research**, always specify a version tag:\n\n```bash\n# Use a specific month snapshot (recommended for publications)\ndocker pull ghcr.io/brownag/labtaxa:2026.02\n```\n**GitHub Releases** contain checksums for verification:\n- Each release is tagged with the data snapshot date\n- Download `snapshot-metadata.json` to verify file integrity\n\n### Cite the Data\n\nWhen publishing research using NCSS laboratory data should cite:\n\n\u003e National Cooperative Soil Survey\n\u003e National Cooperative Soil Survey Soil Characterization Database\n\u003e http://ncsslabdatamart.sc.egov.usda.gov/\n\u003e Accessed \u003cDate\u003e\n\nYou can cite both the package and the data version:\n\n```bibtex\n@misc{labtaxa2026,\n  author = {Brown, Andrew},\n  title = {labtaxa: USDA KSSL Database Snapshots},\n  year = {2026},\n  url = {https://github.com/brownag/labtaxa}\n}\n```\n### Getting Help\n\n- **Documentation**: https://brownag.github.io/labtaxa/\n- **Report Issues**: https://github.com/brownag/labtaxa/issues\n- **Discussions**: https://github.com/brownag/labtaxa/discussions\n\n## Related Resources\n\n- **Lab Data Mart**: https://ncsslabdatamart.sc.egov.usda.gov/\n- **aqp Package** (SoilProfileCollection object): https://cran.r-project.org/package=aqp\n- **soilDB Package** (soil database tools): https://cran.r-project.org/package=soilDB\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrownag%2Flabtaxa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrownag%2Flabtaxa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrownag%2Flabtaxa/lists"}