https://github.com/brownag/soilprofilegraphs
Calibrated soil pit photos and plots with ggplot2
https://github.com/brownag/soilprofilegraphs
Last synced: 2 months ago
JSON representation
Calibrated soil pit photos and plots with ggplot2
- Host: GitHub
- URL: https://github.com/brownag/soilprofilegraphs
- Owner: brownag
- License: cc0-1.0
- Created: 2023-04-21T14:53:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-05T17:31:00.000Z (4 months ago)
- Last Synced: 2025-03-17T17:03:58.494Z (3 months ago)
- Language: R
- Homepage: http://humus.rocks/SoilProfileGraphs/
- Size: 2.75 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
dev = 'jpeg'
)
```# SoilProfileGraphs
[](https://github.com/brownag/SoilProfileGraphs/actions/workflows/R-CMD-check.yaml)
The goal of SoilProfileGraphs is to provide extensions for 'aqp' and 'ggplot2' for creation of soil profile-related graphics. The first focus is on 'calibrated' pit photographs with overplotting of soil property data.
## Installation
You can install the development version of SoilProfileGraphs like so:
``` r
# install.packages("remotes")
remotes::install_github("brownag/SoilProfileGraphs")
```## Example
This is a basic example which shows you how to solve a common problem:
```{r example-sueredo}
library(SoilProfileGraphs)
library(soilDB)spc <- readRDS(system.file("extdata", "aecpedons.rds",
package = "SoilProfileGraphs"))[4, ]
lab <- soilDB::fetchLDM(spc$pedlabsampnum)spg(
lab,
system.file("extdata", "sueredo.png",
package = "SoilProfileGraphs"),
prop = "sand_total",
depth_min = -3,
depth_max = 185,
no_data_value = 76.5,
prop_min = 65,
prop_max = 95
)
``````{r example-buttelake}
spc <- readRDS(system.file("extdata", "aecpedons.rds",
package = "SoilProfileGraphs"))[3, ]
lab <- soilDB::fetchLDM(spc$pedlabsampnum)spg(
lab,
system.file("extdata", "buttelake.png",
package = "SoilProfileGraphs"),
prop = "sand_total",
depth_min = -3,
depth_max = 165,
no_data_value = 76.5,
prop_min = 50,
prop_max = 100
)
```