---
title: "Soil JSON-LD"
author: "Deepa Bhuvanagiri, Vibha Mandayam, Jeffrey Yarus, Roger H. French"
date: "`r Sys.Date()`"
output:
  html_document:
    df_print: paged
vignette: >
  %\VignetteIndexEntry{Soil JSON-LD}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---
Soil JSON-LD Description
-----------------------------------
This JSON-LD Soil template consists set of features describing soil properties across the global stored in the Harmonized World Soil database. Data was collected to provide soil information to assist in assessing land potential productivity. Examples of features present include texture of the soil, water capacity, and depth of roots.

Creating JSON-LD for Soil in R
------------------------------------------
```{r, message=FALSE, eval=FALSE}
library(FAIRmaterials)

# An example data frame for soil header information
soil <- data.frame(
  'ID' = c("176","250"),
  'texture' = c('Coarse', 'None'),
  'AwC' = c('0', '50'),
  'roots' = c('60-80', '20-40'),
  'addProp' = c('Petric', 'Vertic')
)


# This will generate json-ld files for the example data
soil_output <- fairify_data(soil, domain = 'soil')
```

 Soil  schema diagram
--------------------------

```{r, out.width="1200px", echo=FALSE, fig.cap="soil  schema diagram"}
knitr::include_graphics("soil.png")
```


Creating JSON-LD for Soil in Python
------------------------------------------

```{python, eval = FALSE, python.reticulate = FALSE}
from fairmaterials.fairify_data import *
import pandas as pd

# An example data frame for soil data

data = pd.DataFrame (
  'ID' = ["176","250"],
  'texture' = ['Coarse', 'None'],
  'AWC' = ['0', '50'],
  'roots' = ['60-80', '20-40'],
  'addProp' = ['Petric', 'Vertic']])
   

# This will generate JSON-LD file for the example data in Python
fairify_data(data,'soil')
```




References
--------------------------
https://jsonwelllogformat.org/
https://www.energistics.org/energistics-unit-of-measure-standard/
https://schema.org/
 https://ppdm.org/ppdm/PPDM/Standards/What_is_a_Well/PPDM/What_is_a_Well.aspx.
https://www.iso.org/standard/73830.html
https://www.fao.org/soils-portal/data-hub/soil-maps-and-databases/harmonized-world-soil-database-v12/en/

Acknowledgment
--------------------------
This material is based upon work supported by SDLE Research Center 

