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

https://github.com/datatxtorg/datatxt

Tools for working with the data.txt specification
https://github.com/datatxtorg/datatxt

Last synced: 4 months ago
JSON representation

Tools for working with the data.txt specification

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)

options(pins.progress=FALSE)
```

# datatxt

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)

datatxt provides utilities for working with the `data.txt` specification.
Currently, it provides a function, `narrate()`, that enables automatic
generation of data documentation. See [https://datatxtdoc.netlify.com/](https://datatxtdoc.netlify.com/) for an example.

## Installation

You can install the development version of datatxt with

``` r
# install.packages("remotes")
remotes::install_github("datatxtorg/datatxt")
```

## Example

We can generate data documentation by passing the URL of the `data.txt` to
`narrate()`:

```{r example, message=FALSE, progress = FALSE}
library(datatxt)

temp_dir <- tempdir()
narrate("https://datatxt.org/data.txt", output_dir = temp_dir)

list.files(temp_dir)
```

We can then inspect the contents of one of these files:

```{r warning=FALSE}
cat(readLines(file.path(temp_dir, "iris.md")), sep = "\n")
```