{"id":13401335,"url":"https://github.com/jennybc/repurrrsive","last_synced_at":"2025-04-06T03:11:20.865Z","repository":{"id":12356258,"uuid":"71662491","full_name":"jennybc/repurrrsive","owner":"jennybc","description":"Recursive lists to use in teaching and examples, because there is no mtcars for lists.","archived":false,"fork":false,"pushed_at":"2023-08-08T03:44:11.000Z","size":2347,"stargazers_count":133,"open_issues_count":5,"forks_count":22,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-26T05:23:39.874Z","etag":null,"topics":["data","json","package","r","xml"],"latest_commit_sha":null,"homepage":"https://jennybc.github.io/repurrrsive/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jennybc.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-10-22T19:59:07.000Z","updated_at":"2024-03-11T17:30:24.000Z","dependencies_parsed_at":"2023-02-14T18:16:16.072Z","dependency_job_id":"d31b63ea-80de-4654-8ca3-15b58ce37d26","html_url":"https://github.com/jennybc/repurrrsive","commit_stats":{"total_commits":105,"total_committers":6,"mean_commits":17.5,"dds":"0.47619047619047616","last_synced_commit":"617365735dc60675f42218b820ae9e971ee026b7"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jennybc%2Frepurrrsive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jennybc%2Frepurrrsive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jennybc%2Frepurrrsive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jennybc%2Frepurrrsive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jennybc","download_url":"https://codeload.github.com/jennybc/repurrrsive/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937213,"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":["data","json","package","r","xml"],"created_at":"2024-07-30T19:01:01.630Z","updated_at":"2025-04-06T03:11:20.847Z","avatar_url":"https://github.com/jennybc.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/repurrrsive)](https://CRAN.R-project.org/package=repurrrsive)\n[![R-CMD-check](https://github.com/jennybc/repurrrsive/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jennybc/repurrrsive/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/jennybc/repurrrsive/branch/main/graph/badge.svg)](https://app.codecov.io/gh/jennybc/repurrrsive?branch=main)\n\u003c!-- badges: end --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\", \n  error = TRUE,\n  fig.path = \"README-\"\n)\n```\n\n# repurrrsive\n\nThe repurrrsive package provides recursive lists that are handy when teaching or exampling functions such as `purrr::map()` and the [rectangling functions](https://tidyr.tidyverse.org/articles/rectangle.html) in the tidyr package.\nThe datasets are stored as R list, JSON, and XML to provide the full non-rectangular data experience.\nEnjoy!\n\nThis package also includes the main data frame from the [gapminder package](https://CRAN.R-project.org/package=gapminder) in 3 different forms: simple data frame (no list-columns), data frame nested by country, and split into a named list of data frames.\n\n## Installation\n\nYou can install repurrrsive from CRAN like so:\n\n```{r cran-installation, eval = FALSE}\ninstall.packages(\"repurrrsive\")\n```\n\nor from GitHub with:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"pak\")\npak::pak(\"jennybc/repurrrsive\")\n```\n\n## Recursive list examples\n\nrepurrrsive contains several datasets that are recursive lists, both in the form of R objects and as JSON and/or XML files.\n\nFor example, `got_chars` is a list with information on the `r length(repurrrsive::got_chars)` point-of-view characters from the first five books in the Song of Ice and Fire series by George R. R. Martin.\nHere's how to use `purrr::map_chr()` to extract the character's names:\n\n```{r}\nlibrary(repurrrsive)\nlibrary(purrr)\n\nmap_chr(got_chars, \"name\")\n```\n\nEach set of recursive lists has its own article that gives a sense of what sort of manipulations can be demonstrated with the dataset(s):\n\n* Game of Thrones characters\n* Data on entities in the Star Wars universe\n* GitHub user and repo data\n* Sharla Gelfand's music collection\n* Color palettes from Wes Anderson movies\n\nLearn more at \u003chttps://jennybc.github.io/repurrrsive/articles/\u003e.\n\n## Nested and split data frames\n\nThe Gapminder data, from the [gapminder package](https://github.com/jennybc/gapminder), is also here in various forms to allow practice of different styles of grouped computation.\n\nFor example, the `gap_nested` dataset has one row per country, with a nested `data` column containing longitudinal data for life expectancy, population, and GDP per capita.\n\n```{r}\ngap_nested\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjennybc%2Frepurrrsive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjennybc%2Frepurrrsive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjennybc%2Frepurrrsive/lists"}