---
title: "Photovoltaic System JSON-LD"
author: "Raymond Wieser, Yangxin Fan, Laura S. Bruckman, Roger H. French"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Photovoltaic System JSON-LD}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

Photovoltaic System JSON-LD Description
-----------------------------------
This json-ld template is used to store metadata information commonly used to describe photovoltaic (PV) systems. There is information included on the location, modules, time series measurements, electrical properties, and weather conditions. Note that a lot of the material included in this json pulls from the OrangeButton Taxonomy. 

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

# An example data frame for PV Systems
system_example <- data.frame('Latitude' = c(30.1702, 28.32048),
                             'ProdMfr' = c('CSI', 'FirstSolar'),
                             'SystemID' = c('s1435', 's1284'))

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

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

# An example data frame for PV Modules
system_example = {'Latitude' : [30.1702, 28.32048],
                  'ProdMfr' : ['CSI', 'FirstSolar'],
                  'SystemID' : ['s1435', 's1284']}

module_example = pd.DataFrame(system_example)
                            
# This will generate JSON-LD file for the example data
output <- fairify_data(system_example, domain = 'PVSystem')
```


PV Module schema diagram
--------------------------

```{r, out.width="800px", echo=FALSE, fig.cap="PV Module schema diagram"}
knitr::include_graphics("pv-system.png")
```

Acknowledgment
--------------------------
This material is based upon work supported by the U.S. Department of Energy’s Office of Energy Efficiency and Renewable Energy (EERE) under Solar Energy Technologies Office (SETO) Agreement Number DE-EE0009353.
