-
Notifications
You must be signed in to change notification settings - Fork 19
/
README.Rmd
164 lines (129 loc) · 7.34 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
output: md_document
---
[![CRAN version](https://www.r-pkg.org/badges/version/soilDB)](https://CRAN.R-project.org/package=soilDB)
[![CRAN status](https://badges.cranchecks.info/worst/soilDB.svg)](https://cran.r-project.org/web/checks/check_results_soilDB.html)
[![Development Version](https://ncss-tech.r-universe.dev/badges/soilDB)](https://ncss-tech.r-universe.dev/)
[![R-CMD-check Build Status](https://github.com/ncss-tech/soilDB/actions/workflows/R-CMD-check.yml/badge.svg)](https://github.com/ncss-tech/soilDB/actions)
[![Monthly CRAN Downloads](https://cranlogs.r-pkg.org/badges/soilDB)](https://cran.r-project.org/package=soilDB)
![CRAN/METACRAN](https://img.shields.io/cran/l/soilDB)
[![soilDB Manual](https://img.shields.io/badge/docs-HTML-informational)](https://ncss-tech.github.io/soilDB/)
```{r, echo=FALSE, message=FALSE, warning=FALSE}
library(rvest)
# get latest release semantic version number for citation
.getLatestCRANRelease <- function() {
gsub(".*/([0-9\\.]+)$", "\\1", html_text(html_element(html_element(read_html("https://github.com/ncss-tech/soilDB/releases.atom"), "entry"), "id")))
}
.update_CITATION <- function(version) {
x <- sprintf('citHeader("To cite soilDB in publications use:")
bibentry(
bibtype = "Manual",
title = "soilDB: Soil Database Interface",
author = "Dylan Beaudette, Jay Skovlin, Stephen Roecker and Andrew Brown",
note = "R package version %s",
url = "https://CRAN.R-project.org/package=soilDB",
year = "%s",
textVersion = "Beaudette, D., Skovlin, J., Roecker, S., Brown, A. (%s). soilDB: Soil Database Interface. R package version %s. <https://CRAN.R-project.org/package=soilDB>"
)
', version, format(Sys.time(), "%Y"), format(Sys.time(), "%Y"), version)
suppressWarnings(writeLines(strsplit(x, "\n")[[1]], "inst/CITATION"))
}
# get latest tagged release from github
soilDB_CRAN_VERSION <- .getLatestCRANRelease()
# get installed version
soilDB_INSTALLED_VERSION <- packageVersion("soilDB")
# rebuilding readme locally, use installed version
if (soilDB::local_NASIS_defined() && (soilDB_INSTALLED_VERSION > soilDB_CRAN_VERSION)) {
.update_CITATION(soilDB_INSTALLED_VERSION)
} else {
.update_CITATION(soilDB_CRAN_VERSION)
}
# update inst/CITATION
```
## Installation
Get the stable version from CRAN:
```r
install.packages('soilDB', dependencies = TRUE)
```
Get the development version from GitHub:
```r
remotes::install_github("ncss-tech/soilDB", dependencies = FALSE)
```
## Website
- CRAN Package: https://cran.r-project.org/package=soilDB
- Package Manual: http://ncss-tech.github.io/soilDB/
- Algorithms for Quantitative Pedology (AQP) Project: http://ncss-tech.github.io/AQP/
## Citation
```{r, echo=FALSE}
citation("soilDB")
```
## soilDB `r packageVersion("soilDB")`
<!-- ### Notices on Database Interfaces -->
<!-- #### NASIS -->
<!-- #### Soil Data Access (SDA) -->
<!-- #### SoilWeb API -->
<!-- #### MS Access -->
## Functions by Data Source
* Soil Data Access (SDA)
+ [`fetchSDA`](http://ncss-tech.github.io/soilDB/reference/fetchSDA.html)
+ [`fetchSDA_spatial`](http://ncss-tech.github.io/soilDB/reference/fetchSDA_spatial.html)
+ [`SDA_query`](http://ncss-tech.github.io/soilDB/reference/SDA_query.html)
+ [`SDA_spatialQuery`](http://ncss-tech.github.io/soilDB/reference/SDA_spatialQuery.html)
+ "SSURGO On Demand" Queries
- [`get_SDA_hydric`](http://ncss-tech.github.io/soilDB/reference/get_SDA_hydric.html)
- [`get_SDA_interpretation`](http://ncss-tech.github.io/soilDB/reference/get_SDA_interpretation.html)
- [`get_SDA_muaggatt`](http://ncss-tech.github.io/soilDB/reference/get_SDA_muaggatt.html)
- [`get_SDA_pmgroupname`](http://ncss-tech.github.io/soilDB/reference/get_SDA_pmgroupname.html)
- [`get_SDA_property`](http://ncss-tech.github.io/soilDB/reference/get_SDA_property.html)
- [`get_SDA_coecoclass`](http://ncss-tech.github.io/soilDB/reference/get_SDA_coecoclass.html)
- [`get_SDA_metrics`](http://ncss-tech.github.io/soilDB/reference/get_SDA_metrics.html)
- [`get_SDA_cosurfmorph`](http://ncss-tech.github.io/soilDB/reference/get_SDA_cosurfmorph.html)
* SSURGO Web Soil Survey
+ [`downloadSSURGO`](http://ncss-tech.github.io/soilDB/reference/downloadSSURGO.html)
+ [`createSSURGO`](http://ncss-tech.github.io/soilDB/reference/createSSURGO.html)
* SSURGO Local Geodatabases
+ [`fetchGDB`](http://ncss-tech.github.io/soilDB/reference/fetchGDB.html)
* ROSETTA
+ [`ROSETTA`](http://ncss-tech.github.io/soilDB/reference/ROSETTA.html)
* SSURGO/KSSL via SoilWeb
+ [`fetchKSSL`](http://ncss-tech.github.io/soilDB/reference/fetchKSSL.html)
+ [`fetchOSD`](http://ncss-tech.github.io/soilDB/reference/fetchOSD.html)
+ [`siblings`](http://ncss-tech.github.io/soilDB/reference/siblings.html)
+ [`OSDquery`](http://ncss-tech.github.io/soilDB/reference/OSDquery.html)
+ [`seriesExtent`](http://ncss-tech.github.io/soilDB/reference/seriesExtent.html)
+ [`taxaExtent`](http://ncss-tech.github.io/soilDB/reference/taxaExtent.html)
+ [`mukey.wcs`](http://ncss-tech.github.io/soilDB/reference/mukey.wcs.html)
+ [`ISSR800.wcs`](http://ncss-tech.github.io/soilDB/reference/ISSR800.wcs.html)
* NASIS WWW interface
+ [`parseWebReport`](http://ncss-tech.github.io/soilDB/reference/parseWebReport.html)
+ [`fetchNASISWebReport`](http://ncss-tech.github.io/soilDB/reference/fetchNASISWebReport.html)
* SCAN/SNOTEL
+ [`fetchSCAN`](http://ncss-tech.github.io/soilDB/reference/fetchSCAN.html)
+ [`SCAN_SNOTEL_metadata`](http://ncss-tech.github.io/soilDB/reference/SCAN_SNOTEL_metadata.html)
* Henry Mount Soil and Water Database
+ [`fetchHenry`](http://ncss-tech.github.io/soilDB/reference/fetchHenry.html)
* NASIS local database
+ [`fetchNASIS`](http://ncss-tech.github.io/soilDB/reference/fetchNASIS.html)
+ [`dbConnectNASIS`](http://ncss-tech.github.io/soilDB/reference/dbConnectNASIS.html) (alias `NASIS()`)
+ [`dbQueryNASIS`](http://ncss-tech.github.io/soilDB/reference/dbQueryNASIS.html)
+ [`createStaticNASIS`](http://ncss-tech.github.io/soilDB/reference/createStaticNASIS.html)
* SoilGrids
+ [`fetchSoilGrids`](http://ncss-tech.github.io/soilDB/reference/fetchSoilGrids.html)
## Miscellaneous Functions
* [`estimateSTR`](http://ncss-tech.github.io/soilDB/reference/estimateSTR.html)
* [`STRplot`](http://ncss-tech.github.io/soilDB/reference/STRplot.html)
* [`KSSL_VG_model`](http://ncss-tech.github.io/soilDB/reference/KSSL_VG_model.html)
* [`simplifyFragmentData`](http://ncss-tech.github.io/soilDB/reference/simplifyFragmentData.html)
* [`simplifyColorData`](http://ncss-tech.github.io/soilDB/reference/simplifyColorData.html)
* [`uncode`](http://ncss-tech.github.io/soilDB/reference/uncode.html)
* [`code`](http://ncss-tech.github.io/soilDB/reference/code.html)
* [`get_NOAA_GHCND`](http://ncss-tech.github.io/soilDB/reference/get_NOAA_GHCND.html)
## Tutorials and Demonstrations
* [fetchKSSL](http://ncss-tech.github.io/AQP/soilDB/KSSL-demo.html)
* [SDA_query](http://ncss-tech.github.io/AQP/soilDB/SDA-tutorial.html)
* [fetchOSD](http://ncss-tech.github.io/AQP/sharpshootR/OSD-dendrogram.html)
* [SCAN/SNOTEL Data](http://ncss-tech.github.io/AQP/soilDB/fetchSCAN-demo.html)
## Related Packages
* [aqp](https://github.com/ncss-tech/aqp)
* [sharpshootR](https://github.com/ncss-tech/sharpshootR)
* [SoilTaxonomy](https://github.com/ncss-tech/SoilTaxonomy)