Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ropensci/charlatan
Create fake data in R
https://github.com/ropensci/charlatan
data dataset fake-data faker peer-reviewed r r-package rstats
Last synced: 3 months ago
JSON representation
Create fake data in R
- Host: GitHub
- URL: https://github.com/ropensci/charlatan
- Owner: ropensci
- License: other
- Created: 2016-12-23T00:00:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T07:19:39.000Z (6 months ago)
- Last Synced: 2024-07-28T09:34:15.528Z (3 months ago)
- Topics: data, dataset, fake-data, faker, peer-reviewed, r, r-package, rstats
- Language: R
- Homepage: https://docs.ropensci.org/charlatan/
- Size: 972 KB
- Stars: 291
- Watchers: 9
- Forks: 29
- Open Issues: 29
-
Metadata Files:
- Readme: README.Rmd
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Codemeta: codemeta.json
Awesome Lists containing this project
- jimsghstars - ropensci/charlatan - Create fake data in R (R)
README
charlatan
=========```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE
)
```[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-check](https://github.com/ropensci/charlatan/workflows/R-check/badge.svg)](https://github.com/ropensci/charlatan/actions?query=workflow%3AR-check)
[![cran checks](https://badges.cranchecks.info/worst/charlatan.svg)](https://cloud.r-project.org/web/checks/check_results_charlatan.html)
[![cran status](https://www.r-pkg.org/badges/version/charlatan)](https://cran.r-project.org/package=charlatan)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/charlatan)](https://github.com/r-hub/cranlogs.app)
[![](https://badges.ropensci.org/94_status.svg)](https://github.com/ropensci/software-review/issues/94)
[![R-CMD-check](https://github.com/ropensci/charlatan/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ropensci/charlatan/actions/workflows/R-CMD-check.yaml)`charlatan` makes fake data, inspired from and borrowing some code from Python's faker (https://github.com/joke2k/faker)
Make fake data for:
* person names
* jobs
* phone numbers
* colors: names, hex, rgb
* credit cards
* DOIs
* numbers in range and from distributions
* gene sequences
* geographic coordinates
* emails
* URIs, URLs, and their parts
* IP addresses
* more coming ...Possible use cases for `charlatan`:
* Students in a classroom setting learning any task that needs a dataset.
* People doing simulations/modeling that need some fake data
* Generate fake dataset of users for a database before actual users exist
* Complete missing spots in a dataset
* Generate fake data to replace sensitive real data with before public release
* Create a random set of colors for visualization
* Generate random coordinates for a map
* Get a set of randomly generated DOIs (Digital Object Identifiers) to
assign to fake scholarly artifacts
* Generate fake taxonomic names for a biological dataset
* Get a set of fake sequences to use to test code/software that uses
sequence dataReasons to use `charlatan`:
* Light weight, few dependencies
* Relatively comprehensive types of data, and more being added
* Comprehensive set of languages supported, more being added
* Useful R features such as creating entire fake data.frame's## Installation
cran version
```{r eval=FALSE}
install.packages("charlatan")
```dev version
```{r eval=FALSE}
remotes::install_github("ropensci/charlatan")
``````{r}
library("charlatan")
set.seed(12345)
```## high level function
... for all fake data operations
```{r}
x <- fraudster()
x$job()
x$name()
x$color_name()
```## locale support
Adding more locales through time, e.g.,
Locale support for job data
```{r}
ch_job(locale = "en_US", n = 3)
ch_job(locale = "fr_FR", n = 3)
ch_job(locale = "hr_HR", n = 3)
ch_job(locale = "uk_UA", n = 3)
ch_job(locale = "zh_TW", n = 3)
```For colors:
```{r}
ch_color_name(locale = "en_US", n = 3)
ch_color_name(locale = "uk_UA", n = 3)
```More coming soon ...
## generate a dataset
```{r}
ch_generate()
``````{r}
ch_generate("job", "phone_number", n = 30)
```## person name
```{r}
ch_name()
``````{r}
ch_name(10)
```## phone number
```{r}
ch_phone_number()
``````{r}
ch_phone_number(10)
```## job
```{r}
ch_job()
``````{r}
ch_job(10)
```## credit cards
```{r}
ch_credit_card_provider()
ch_credit_card_provider(n = 4)
``````{r}
ch_credit_card_number()
ch_credit_card_number(n = 10)
``````{r}
ch_credit_card_security_code()
ch_credit_card_security_code(10)
```## Usage in the wild
- eacton/R-Utility-Belt-ggplot2 (https://github.com/eacton/R-Utility-Belt-ggplot2/blob/836a6bd303fbfde4a334d351e0d1c63f71c4ec68/furry_dataset.R)
## Contributors
* Roel M. Hogervorst (https://github.com/rmhogervorst)
* Scott Chamberlain (https://github.com/sckott)
* Kyle Voytovich (https://github.com/kylevoyto)
* Martin Pedersen (https://github.com/MartinMSPedersen)If you would like to contribute, see [CONTRIBUTING (on github)](.github/CONTRIBUTING.md)
## similar art
* wakefield (https://github.com/trinker/wakefield)
* ids (https://github.com/richfitz/ids)
* rcorpora (https://github.com/gaborcsardi/rcorpora)
* synthpop (https://cran.r-project.org/package=synthpop)## Meta
* Please [report any issues or bugs](https://github.com/ropensci/charlatan/issues).
* License: MIT
* Get citation information for `charlatan` in R doing `citation(package = 'charlatan')`
* Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.