{"id":18351210,"url":"https://github.com/feddelegrand7/radous","last_synced_at":"2025-07-11T16:38:43.579Z","repository":{"id":51105922,"uuid":"308330656","full_name":"feddelegrand7/radous","owner":"feddelegrand7","description":"Query Random User Data From the Random User Generator API","archived":false,"fork":false,"pushed_at":"2021-05-23T18:48:02.000Z","size":93,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T07:05:04.136Z","etag":null,"topics":["api","r","random-data","random-data-generation","rstats"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feddelegrand7.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://www.buymeacoffee.com/Fodil"]}},"created_at":"2020-10-29T13:03:26.000Z","updated_at":"2022-11-15T12:27:44.000Z","dependencies_parsed_at":"2022-08-21T01:10:11.406Z","dependency_job_id":null,"html_url":"https://github.com/feddelegrand7/radous","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/feddelegrand7/radous","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2Fradous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2Fradous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2Fradous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2Fradous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feddelegrand7","download_url":"https://codeload.github.com/feddelegrand7/radous/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2Fradous/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264852992,"owners_count":23673547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","r","random-data","random-data-generation","rstats"],"created_at":"2024-11-05T21:29:54.089Z","updated_at":"2025-07-11T16:38:43.557Z","avatar_url":"https://github.com/feddelegrand7.png","language":"R","funding_links":["https://www.buymeacoffee.com/Fodil"],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# radous\n\u003c!-- badges: start --\u003e\n\n[![R build\nstatus](https://github.com/feddelegrand7/radous/workflows/R-CMD-check/badge.svg)](https://github.com/feddelegrand7/radous/actions)\n[![Codecov test\ncoverage](https://codecov.io/gh/feddelegrand7/radous/branch/master/graph/badge.svg)](https://codecov.io/gh/feddelegrand7/radous?branch=master)\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/radous)](https://cran.r-project.org/package=radous)\n[![CRAN\\_time\\_from\\_release](https://www.r-pkg.org/badges/ago/radous)](https://cran.r-project.org/package=radous)\n[![CRAN\\_latest\\_release\\_date](https://www.r-pkg.org/badges/last-release/radous)](https://cran.r-project.org/package=radous)\n[![metacran\ndownloads](https://cranlogs.r-pkg.org/badges/radous)](https://cran.r-project.org/package=radous)\n[![metacran\ndownloads](https://cranlogs.r-pkg.org/badges/grand-total/radous)](https://cran.r-project.org/package=radous)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://choosealicense.com/licenses/mit/)\n[![R\nbadge](https://img.shields.io/badge/Build%20with-♥%20and%20R-red)](https://github.com/feddelegrand7/radous)\n\n\u003c!-- badges: end --\u003e\n\n`radous` allows you to generate random user data from the [Random User Generator API](https://randomuser.me/) which can be useful in many situations : \n\n- Teaching;\n- Testing a function; \n- Testing an application (Shiny, Dash or others)\n\n__You can generate up to 5000 observations in one query.__\n\n\n## Installation\n\nYou can `radous` from CRAN with:\n\n```{r, eval=FALSE}\ninstall.packages(\"radous\")\n\n```\n\n\n## Usage\n\n`radous` is extremely simple to use and has one function: `get_data()`.\n\nSuppose we want to generate 10 random user data: \n\n\n```{r}\nlibrary(radous)\n\nget_data(n = 10)\n\n```\n\nIf you want to generate always the same set of users, you can use the `seed` argument: \n\n\n```{r}\nget_data(n = 5, seed = \"1990\")\n\n```\n\n\nLet's run the above code again to check if we get the same info: \n\n```{r}\nget_data(n = 5, seed = \"1990\")\n\n```\n\nIf you need some user images, it's easy to get: \n\n```{r, message=FALSE, warning=FALSE}\nlibrary(dplyr)\n\nrandom_image \u003c- get_data(n = 1) %\u003e% select(picture_large) %\u003e% pull()\n\nhtmltools::img(src = random_image, height = \"150px\", width = \"150px\")\n\n```\n\n\n\u003e Note that All randomly generated photos come from the authorized section of [UI Faces](https://uifaces.co/). \n\n## Teaching with `radous` 👨‍🏫\n\nThe generated data has 34 variables (columns) with different types of information that you can play with. The data frame is particularly suited for teaching the tidyverse, here some examples: \n\n#### Select \n\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\n\n\u003e Here we select columns that are related to users' location:\n\n\u003c/summary\u003e\n\n```{r message=FALSE, warning=FALSE}\nlibrary(tidyverse)\n\ndf \u003c- get_data(n = 500, seed = \"123\")\n\ndf %\u003e% select(contains(\"location\"))\n\n```\n\u003c/details\u003e\n\n\n#### Filter \n\n\u003cdetails\u003e\n\n\u003csummary\u003e\n\n\u003e Getting the users that are US citizens:\n\n\u003c/summary\u003e\n\n```{r message=FALSE, warning=FALSE}\ndf %\u003e% filter(nat == \"US\")\n\n```\n\n\u003c/details\u003e\n\n#### relocate \n\n\u003cdetails\u003e\n\n\u003csummary\u003e\n\n\u003e Relocating the last column `nat` to the beginning: \n\n\u003c/summary\u003e\n\n```{r}\ndf %\u003e% relocate(nat, before = gender)\n\n```\n\u003c/details\u003e\n\n#### group_by \u0026 summarise\n\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\n\n\u003e Calculating median age by gender:\n\n\u003c/summary\u003e\n\n```{r}\ndf %\u003e% group_by(gender) %\u003e% \n  summarise(median_age = median(dob_age))\n```\n\u003c/details\u003e\n\n#### count, arrange \u0026 desc\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\n\n\u003e Getting the number of users per country of residence:\n\u003e \n\u003c/summary\u003e\n\n```{r}\ndf %\u003e% \n  count(location_country) %\u003e% \n  arrange(desc(n))\n```\n\n\u003c/details\u003e\n\n\n#### filter \u0026 str_detect\n\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\n\n\u003e Filtering out the users that have a cell number that begins with 081:\n\n\u003c/summary\u003e\n\n```{r}\ndf %\u003e% select(1:3, cell) %\u003e% \n  filter(str_detect(cell, \"081\"))\n  \n  \n```\n\u003c/details\u003e\n\n\n## Code of Conduct\n\nPlease note that the radous project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeddelegrand7%2Fradous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeddelegrand7%2Fradous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeddelegrand7%2Fradous/lists"}