A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

soils

Collection of soil health data visualization and reporting tools, including a RStudio project template with everything you need to generate custom HTML and Microsoft Word reports for each participant in your soil health survey.
https://github.com/wa-department-of-agriculture/soils

Category: Natural Resources
Sub Category: Soil and Land

Last synced: about 20 hours ago
JSON representation

Repository metadata

Collection of soil health data visualization and reporting tools, including a RStudio project template with everything you need to generate custom HTML and Microsoft Word reports for each participant in your soil health survey.

README.Rmd

          ---
output: github_document
---

# soils ![](man/figures/logo.png){align="right" height="138"}



[![Project Status: Active -- The project has reached a stable, usable state and
is being actively
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)

[![CRAN
status](https://www.r-pkg.org/badges/version/soils)](https://CRAN.R-project.org/package=soils)
[![:name status
badge](https://wa-department-of-agriculture.r-universe.dev/badges/:name)](https://wa-department-of-agriculture.r-universe.dev/)
[![soils status
badge](https://wa-department-of-agriculture.r-universe.dev/badges/soils)](https://wa-department-of-agriculture.r-universe.dev/soils)
[![R-CMD-check](https://github.com/WA-Department-of-Agriculture/soils/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/WA-Department-of-Agriculture/soils/actions/workflows/R-CMD-check.yaml)



```{r setup, include=FALSE}
knitr::opts_chunk$set(
  fig.align = "left",
  dpi = 300
)
```

# Overview

Introducing {soils}: an R package for all your soil health data visualization
and reporting needs. {soils} provides an RStudio project template to generate
customized, interactive soil health reports. These reports include plots and
tables to show how the participant's results compare to simple averages of
results from samples of the same crop, same county, and across the entire
project.

Any scientist leading a soil health survey can use {soils} to create custom
reports for all participants. Democratize your data by giving back to the
farmers and land managers who contributed soil samples to your soil sampling
project. Use these reports to empower each participant to explore and better
understand their data.

The [Washington State Department of
Agriculture](https://agr.wa.gov/departments/land-and-water/natural-resources/soil-health)
and [Washington State University](https://soilhealth.wsu.edu/) developed {soils}
as part of the [Washington Soil Health
Initiative](https://washingtonsoilhealthinitiative.com/). Learn more about
{soils} in this [blog
post](https://washingtonsoilhealthinitiative.com/2024/03/soils-an-r-package-for-soil-health-reporting/)
or this [webinar](https://youtu.be/_8m7fTjSEOk?si=ikrCASdchiB6rDC2).

# Requirements

The report template uses [Quarto](https://quarto.org/docs/get-started/), which
is the [next-generation](https://quarto.org/docs/faq/rmarkdown.html) version of
[R Markdown](https://quarto.org/docs/faq/rmarkdown.html).

We assume you're using [RStudio
v2022.07](https://dailies.rstudio.com/version/2022.07.2+576.pro12/) or later for
editing and previewing Quarto documents. We **strongly recommend** you use the
[latest release of RStudio](https://posit.co/download/rstudio-desktop/) for
support of all Quarto features. You can also download and install the [latest
version of Quarto](https://quarto.org/docs/get-started/) independently from
RStudio.

To render Microsoft Word (MS Word) documents, you must have MS Word installed
and activated.

**If you're new to Quarto and Markdown formatting syntax, first take a look at
the Primers on
[Quarto](https://wa-department-of-agriculture.github.io/soils/articles/quarto.html)
and
[Markdown](https://wa-department-of-agriculture.github.io/soils/articles/markdown.html)
to learn how they're used in {soils} and get familiar with their features.**

# Installation

Install the development version of {soils} from our
[r-universe](https://wa-department-of-agriculture.r-universe.dev/) with:

```{r install-r-universe, eval=FALSE}
install.packages(
  "soils",
  repos = c("https://wa-department-of-agriculture.r-universe.dev")
)
```

Or install from GitHub with [{pak}](https://pak.r-lib.org/index.html):

```{r pak-install, eval=FALSE}
# Uncomment the below line if {pak} is not installed.
# install.packages("pak")
pak::pkg_install("WA-Department-of-Agriculture/soils")
```

Load the example datasets and functions with:

```{r load-soils, eval=FALSE}
library(soils)
```

# Usage

{soils} was developed to work 'out of the box' so you can immediately install
and render an example report. However, you will need to customize and edit
content to fit your project.

Our recommended workflow is to **1)** create a new {soils} project, **2)** try
to render the example reports to make sure everything works on your system, and
**3)** customize the template files to use your own data, content, and styling.

We provide a series of [Primers and
Tutorials](https://wa-department-of-agriculture.github.io/soils/articles/index.html)
to prepare and guide you through this workflow. See below for short demo videos
and links to the relevant tutorials.

## 1. Create a new {soils} project

Follow along in the [**Create a {soils}
project**](https://wa-department-of-agriculture.github.io/soils/articles/project.html)
tutorial. Choose between two report templates: **English** or **Spanish**.

[create-soils.webm](https://github.com/WA-Department-of-Agriculture/soils/assets/95007373/12a01cf7-0efc-4948-b41e-a826dd86e6f6)

## 2. Render the example reports

Follow along in the [**Render the example
reports**](https://wa-department-of-agriculture.github.io/soils/articles/render-example.html)
tutorial.

See the [**rendered example
reports**](https://wa-department-of-agriculture.github.io/soils/articles/examples.html).

### HTML

[render-html.webm](https://github.com/WA-Department-of-Agriculture/soils/assets/95007373/a1f680a0-bed4-495a-aae7-ba85a9fa22e3)

### MS Word

[render-docx.webm](https://github.com/WA-Department-of-Agriculture/soils/assets/95007373/a617fee6-a53b-4772-ac3b-bf8d48f8fc5b)

## 3. Create reports with your own data

To use your own data, customize the reports for your project, and render all
reports, follow along with these tutorials:

-   [**Import
    data**](https://wa-department-of-agriculture.github.io/soils/articles/data.html)

-   [**Customize &
    write**](https://wa-department-of-agriculture.github.io/soils/articles/customize.html)

-   [**Render
    reports**](https://wa-department-of-agriculture.github.io/soils/articles/render.html)

[render-reports.webm](https://github.com/WA-Department-of-Agriculture/soils/assets/95007373/b796f674-ed90-4d57-bed3-85b58c399c8f)

## Troubleshooting

As you edit the content, errors are bound to occur. Read [**tips and workflows
for
troubleshooting**](https://wa-department-of-agriculture.github.io/soils/articles/troubleshoot.html)

# Acknowledgement and citation

The below acknowledgement is automatically embedded in each report:

```{r acknowledgement, echo = FALSE, results='asis'}
acknowledgement <- knitr::knit_child(
  here::here("inst/templates/english/09_acknowledgement.qmd"),
  quiet = TRUE
)

cat(">", acknowledgement)
```

```{r citation-header, echo=FALSE, results='asis'}
citation <- citation("soils")

header <- format(citation, style = "citation")[[1]]
text <- format(citation, style = "textVersion")

cat(header)
```

```{r citation-text, echo=FALSE, results='asis'}
cat(">", text)
```

## Credits

{soils} adapts from existing R project templating resources and packages:

-   [RStudio Project
    Templates](https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html)
-   [{ratlas}](https://github.com/atlas-aai/ratlas)
-   [{quartotemplate}](https://github.com/Pecners/quartotemplate)
-   [{golem}](https://github.com/ThinkR-open/golem/)

Text and figures were adapted from [WSU Extension publication #FS378E Soil
Health in Washington
Vineyards](https://pubs.extension.wsu.edu/soil-health-in-washington-vineyards).

Report text and images were translated by Erica Tello, Eber Rivera, and Kate
Smith with WSU Food Systems and Skagit County Extension as part of the USDA NRCS
Innovation in Conservation program, led by Viva Farms (grant number
NR22-13G004).

        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 196
Total Committers: 2
Avg Commits per committer: 98.0
Development Distribution Score (DDS): 0.015

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

Name Email Commits
Jadey Ryan j****n@a****v 193
njtierney n****y@g****m 3

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 4
Total pull requests: 10
Average time to close issues: 9 days
Average time to close pull requests: 2 days
Total issue authors: 1
Total pull request authors: 2
Average comments per issue: 2.75
Average comments per pull request: 0.2
Merged pull request: 10
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 2
Past year average time to close issues: N/A
Past year average time to close pull requests: less than a minute
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 0.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/wa-department-of-agriculture/soils

Top Issue Authors

  • jadeynryan (4)

Top Pull Request Authors

  • jadeynryan (8)
  • njtierney (2)

Top Issue Labels

  • bug (3)
  • documentation (1)

Top Pull Request Labels


Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 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/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

Score: 2.9957322735539913