https://github.com/adriancorrendo/xpolaris

Download soil data from POLARIS Database

https://github.com/adriancorrendo/xpolaris

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Download soil data from POLARIS Database

Basic Info
  • Host: GitHub
  • Owner: adriancorrendo
  • License: other
  • Default Branch: master
  • Size: 52.8 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of lhmrosso/XPolaris
Created almost 4 years ago · Last pushed almost 5 years ago

https://github.com/adriancorrendo/XPolaris/blob/master/



# XPolaris



[![Travis build
status](https://travis-ci.com/lhmrosso/XPolaris.svg?branch=master)](https://app.travis-ci.com/github/lhmrosso/XPolaris)
[![AppVeyor build
status](https://ci.appveyor.com/api/projects/status/github/lhmrosso/XPolaris?branch=master&svg=true)](https://ci.appveyor.com/project/lhmrosso/XPolaris)
[![Codecov test
coverage](https://codecov.io/gh/lhmrosso/XPolaris/branch/master/graph/badge.svg)](https://codecov.io/gh/lhmrosso/XPolaris?branch=master)
[![CRAN
downloads](https://cranlogs.r-pkg.org/badges/grand-total/XPolaris)](https://CRAN.R-project.org/package=XPolaris)




The *XPolaris* package aims to facilitate the access to detailed soil
data at any geographical location within the United States (US). The
[**POLARIS**](http://hydrology.cee.duke.edu/POLARIS/) database comprises
a 30-meter probabilistic soil series map of the contiguous United States
(US). It represents an optimization of the Soil Survey Geographic
(SSURGO) database, circumventing issues of spatial disaggregation,
harmonizing, and filling spatial gaps \[1, 2\]. Without the need of
advanced skills on R-programming, users will be able to convert raster
data into traditional spreadsheet format for further data analyses.

## Installation

You can install the released version of XPolaris from
[CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("XPolaris")
```

You can install the development version from
[GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("lhmrosso/XPolaris")
```

## Example

After loading the package, users must create a `data.frame` object
containing three columns (`ID`, `lat`, and `long`). Location IDs must be
unique alphanumerical identifiers, and latitude and longitude
coordinates must be supplied as decimal degrees. The package comes with
example locations in Kansas (`exkansas`).

``` r
library(XPolaris)
print(exkansas)
#>           ID     lat     long
#> 1    Scandia 39.8291 -97.8458
#> 2 Belleville 39.8158 -97.6720
#> 3     Ottawa 38.5398 -95.2446
```

The package is composed by three R functions:  
1) `xplot`: generates a map displaying the rater images from which
locations will be retrieved;  
2) `ximages`: downloads the images from the POLARIS database to the
users local machine;  
3) `xsoil`: extracts the soil data from raster images and creates a
`data.frame` object.

``` r
# Plotting image locations (checking images)
# The output is a ggplot object but a jpeg is exported
# Figure is saved in a new folder called (POLARISOut)
# A data.frame with coordinates is the main argument
# Locations must have unique ID codes

xplot(locations = exkansas)

# Downloading POLARIS images (POLARISOut folder)
# Important user inputs (see argument details below)
# Images are stored in the POLARISOut folder (sub-folders)
# This function does not download the same images twice
# Main arguments are either data.frame or vectors
# Vectors should contain character elements

df_ximages <- ximages(locations = exkansas,
                      statistics = c('mean'),
                      variables = c('ph','om','clay'),
                      layersdepths = c('0_5','5_15','15_30'))

# Retrieving raster soil data from images (points)
# The output is a data.frame but a csv file is exported
# ximages output is the main argument to extract soil data

xsoil(ximages_output = df_ximages)
```

### `ximages` arguments

-   `locations` - Locations `data.frame` (`exkansas`);

-   `variables` - Soil variable codes and units from POLARIS:

|      Code | Description                                        | Data unit                              | Output unit                    |
|----------:|:---------------------------------------------------|:---------------------------------------|:-------------------------------|
|      `ph` | Soil pH in water                                   | \-                                     | \-                             |
|      `om` | Soil organic matter                                | log10(%)                    | %                              |
|    `clay` | Clay                                               | %                                      | %                              |
|    `sand` | Sand                                               | %                                      | %                              |
|    `silt` | Silt                                               | %                                      | %                              |
|      `bd` | Bulk density                                       | g cm3                    | g cm3            |
|      `hb` | Bubbling pressure (Brooks-Corey)                   | log10(kPa)                  | kPa                            |
|       `n` | Measure of pore size distribution (van Genuchten)  | \-                                     | \-                             |
|   `alpha` | Scale param. inversely prop. to mean pore diameter | log10(kPa1)   | kPa1             |
|    `ksat` | Saturated hydraulic conductivity                   | log10(cm hr1) | cm hr1           |
|  `lambda` | Pore size distribution index (Brooks-Corey)        | \-                                     | \-                             |
| `theta_r` | Residual soil water content                        | m3 m3         | m3 m3 |
| `theta_s` | Saturated soil water content                       | m3 m3         | m3 m3 |

-   `statistics` - Summary: `mean`, `mode`, median (`p50`), five (`p5`)
    and 95 (`p95`) percentiles;

-   `layersdepths` - Depth layers: `0_5`, `5_15`, `15_30`, `30_60`,
    `60_100`, and `100_200` cm;

-   `localPath` - Path in the users machine to store the images. The
    default is `tempdir()`.

## References

1.  Chaney NW, Wood EF, McBratney AB, Hempel JW, Nauman TW, Brungard CW,
    et al.POLARIS: A 30-meter probabilistic soil series map of the
    contiguous united states. Geoderma. 2016;274:5467.
    .

2.  Chaney NW, Minasny B, Herman JD, Nauman TW, Brungard CW, Morgan CLS,
    et al.POLARIS soil properties: 30-m probabilistic maps of soil
    properties over the contiguous united states. Water Resources
    Research. 2019;55:291638. .

Owner

  • Name: Adrian Correndo
  • Login: adriancorrendo
  • Kind: user
  • Location: Manhattan, KS, USA
  • Company: Kansas State University

Postdoctoral Fellow, Digital Agronomy Advocate of Applied Stats & Programming for Agriculture.

GitHub Events

Total
Last Year