---
title: "ASTER GDEM JSON-LD"
author: "Erika Imada Barcelos, Laura S. Bruckman, Roger H. French"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{ASTER GDEM JSON-LD}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

ASTER GDEM JSON-LD Description
-----------------------------------
ASTER (Terra Advanced Spaceborne Thermal Emission and Reflection Radiometer) Global Digital Elevation Model (GDEM) is a join initiative between NASA and the Ministry of Economy, Trade and Industry in Japan. 

It consists of GeoTIFF images captured by ASTER satellites of the entire world, spanning from from 83 degrees north latitude to 83 degrees south. It encompasses 99 percent of Earth's landmass and it includes both water and land bodies. ASTER is currently in version 3, which has an improved and refined algorithm and provides greater coverage and lower artifacts. 

ASTER GDEM is composed of 22,912 tiles, each having a 3601 x 3601(1 degree by 1 degree) pixels at a spatial resolution of 1 arc-second (30m). 
GDEM covers land and water bodies. Water is separate from land and classified according to three categories: ocean, river and lake. The algorithms and methods used to calculate elevation in each body used is different, since there are major differences between them.  


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

# An example data frame for CE
ASTER_Gdem <- data.frame(
  'latitude' = c('41.4993567', '43.4724567'),
  'longitude' = c('81.6944678', '86.8930345'),
  'typeBody' = c('land', 'lake'),
  'elevation' = c('250m', '300cm'),
)

# This will generate JSON-LD file for the example data
output <- fairify_data(ASTER_Gdem, saveLocal = TRUE)
```

Creating JSON-LD for ASTER GDEM in Python
------------------------------------------
```{python, eval = FALSE, python.reticulate = FALSE}
from fairmaterials.fairify_data import *
import pandas as pd

# An example data frame for ASTER GDEM
ASTER_Gdem = pd.DataFrame  ('latitude' = [41.4993567, 43.4724567],
  'longitude' = [81.6944678, 86.8930345],
  'typeBody' = ['land', 'lake'],
  'elevation' = [250, 300]

# This will generate JSON-LD file for the example data
output = fairify_data(ASTER_Gdem)
```


ASTER GDEM schema diagram
--------------------------

```{r, out.width="1200px", echo=FALSE, fig.cap="ASTER GDEM Schema"}
knitr::include_graphics("asterGdem.png")
```

References
--------------------------

#### https://asterweb.jpl.nasa.gov/gdem.asp
#### lpdaac.usgs.gov/documents/434/ASTGTM_User_Guide_V3.pdf
#### lpdaac.usgs.gov/products/astgtmv003/


Acknowledgment
--------------------------
This material is based upon work in the CASFER National Science Foundation (NSF) Engineering Research Center under the  under Grant No 2133576 sub award 21P735-03

