An open API service indexing awesome lists of open source software.

https://github.com/cboettig/schemar

:package: Create Structured Data Using the Schema.org Vocabulary
https://github.com/cboettig/schemar

Last synced: 26 days ago
JSON representation

:package: Create Structured Data Using the Schema.org Vocabulary

Awesome Lists containing this project

README

        

---
output: github_document
---

[![lifecycle](https://img.shields.io/badge/repo%20status-concept-orange.svg)](http://www.repostatus.org/#concept)
[![Travis-CI Build Status](https://travis-ci.org/cboettig/schemar.svg?branch=master)](https://travis-ci.org/cboettig/schemar)
[![Coverage Status](https://img.shields.io/codecov/c/github/cboettig/schemar/master.svg)](https://codecov.io/github/cboettig/schemar?branch=master)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/cboettig/schemar?branch=master&svg=true)](https://ci.appveyor.com/project/cboettig/schemar)
[![CRAN status](https://www.r-pkg.org/badges/version/schemar)](https://cran.r-project.org/package=schemar)

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# schemar

schemar provides experimental constructor functions to create schema.org objects.

## Installation

You can install schemar from github with:

```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("cboettig/schemar")
```

## Example

Construct a :

```{r example}
library(schemar)
x <- Thing(url = "http://schema.org")
write_jsonld(x, "example.json")
```

The main purpose of the package is to take advantage of tab completion and built-in documentation. For instance, typing `schemar::P` and hitting tab, we see a list of all possible object types (classes) starting with `P`. Typing a full class, such as `schema::Place(` and hitting tab, we see a list of possible properties for `Place`. The manual entry, `?Place`, shows the definitions for each of these properties, along with there expected types.

------

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md).

By participating in this project you agree to abide by its terms.

```{r include=FALSE}
unlink("example.json")
```