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
- Host: GitHub
- URL: https://github.com/cboettig/schemar
- Owner: cboettig
- License: other
- Created: 2018-05-21T04:52:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-08T22:23:26.000Z (almost 7 years ago)
- Last Synced: 2024-08-13T07:11:21.593Z (8 months ago)
- Language: R
- Homepage:
- Size: 1.01 MB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - cboettig/schemar - :package: Create Structured Data Using the Schema.org Vocabulary (R)
README
---
output: github_document
---[](http://www.repostatus.org/#concept)
[](https://travis-ci.org/cboettig/schemar)
[](https://codecov.io/github/cboettig/schemar?branch=master)
[](https://ci.appveyor.com/project/cboettig/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")
```