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

https://github.com/karthik/randNames

Random username (+other useful info) generator
https://github.com/karthik/randNames

Last synced: 5 months ago
JSON representation

Random username (+other useful info) generator

Awesome Lists containing this project

README

        

# Random names

[![Travis-CI Build Status](https://travis-ci.org/karthik/randNames.png?branch=master)](https://travis-ci.org/karthik/randNames) [![Coverage Status](https://coveralls.io/repos/karthik/randNames/badge.svg)](https://coveralls.io/r/karthik/randNames) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/randNames)](https://cran.r-project.org/package=randNames) [![](http://cranlogs.r-pkg.org/badges/randNames)](http://cran.rstudio.com/web/packages/randNames/index.html)

The package provides a programmatic interface to the Random Names API and returns 'sample' user data including fake first/last names, emails, SSNs, addresses, avatars and more. Search queries can be further filtered by gender and nationality.

```{r, echo = FALSE, message = FALSE}
knitr::opts_chunk$set(
comment = "#>",
cache = FALSE,
error = FALSE,
message = FALSE,
tidy = FALSE
)
```

**Installation**

```{r, eval = FALSE}
install.packages("randNames")
````

or for the development version
```{r, eval = FALSE}
devtools::install_github("karthik/randNames")
```

It queries a random name API and returns a whole bunch of useful fields.

```{r, names, cache = TRUE}
library(dplyr)
library(randNames)
20 %>%
rand_names %>%
select(first = name.first, last = name.last)
```

__Filter by nationality__

```{r, nationality, cache = TRUE}
15 %>%
# Available nationalities: AU, BR, CA, CH, DE, DK, ES, FI, FR, GB, IE, IR, NL, NZ, TR, US
# You can specify multiple nationalities. e.g. "gb,us"
rand_names(nationality = "GB") %>%
select(name.first, name.last)
```

__Filter by gender__

```{r, gender}
library(randNames)
15 %>%
rand_names(gender = "female") %>%
select(name.first, name.last)
```

__Set seed__

```{r, seed}
15 %>%
rand_names(seed = 'foobar') %>%
select(name.first, name.last)
```

__Additional fields beyond first and last name__

```
gender
email
registered"
dob
phone
cell
nat
name.title
name.first
name.last
location.street
location.city
location.state
location.postcode
login.username"
login.password
login.salt
login.md5
login.sha1
login.sha256
id.name
id.value
picture.large
picture.medium
picture.thumbnail
```