{"id":20387382,"url":"https://github.com/ajschumacher/rjstat","last_synced_at":"2025-10-14T19:10:30.780Z","repository":{"id":11422307,"uuid":"13874020","full_name":"ajschumacher/rjstat","owner":"ajschumacher","description":"read and write JSON-stat with R","archived":false,"fork":false,"pushed_at":"2023-09-04T16:40:15.000Z","size":271,"stargazers_count":32,"open_issues_count":2,"forks_count":6,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-09-07T08:23:44.036Z","etag":null,"topics":["cran","json-stat","r"],"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/ajschumacher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-25T22:56:58.000Z","updated_at":"2025-01-31T15:18:54.000Z","dependencies_parsed_at":"2024-06-21T16:44:47.215Z","dependency_job_id":"3ea4e81d-f8df-4b6e-b40c-291814d35408","html_url":"https://github.com/ajschumacher/rjstat","commit_stats":{"total_commits":193,"total_committers":3,"mean_commits":64.33333333333333,"dds":"0.30569948186528495","last_synced_commit":"9370d3311531da953e4be07e426a248ed3a75009"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ajschumacher/rjstat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajschumacher%2Frjstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajschumacher%2Frjstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajschumacher%2Frjstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajschumacher%2Frjstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajschumacher","download_url":"https://codeload.github.com/ajschumacher/rjstat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajschumacher%2Frjstat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020647,"owners_count":26086895,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cran","json-stat","r"],"created_at":"2024-11-15T02:45:06.021Z","updated_at":"2025-10-14T19:10:30.764Z","avatar_url":"https://github.com/ajschumacher.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rjstat: read and write JSON-stat with R\n[![Build Status](https://app.travis-ci.com/ajschumacher/rjstat.svg?branch=master)](https://app.travis-ci.com/ajschumacher/rjstat) [![Coverage Status](https://coveralls.io/repos/github/MansMeg/rjstat/badge.svg?branch=master)](https://coveralls.io/github/MansMeg/rjstat?branch=master) [![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/grand-total/rjstat)](https://github.com/r-hub/cranlogs.app)\n[![cran version](https://www.r-pkg.org/badges/version/rjstat)](https://CRAN.R-project.org/package=rjstat)\n\nRead and write data sets in the [JSON-stat](https://json-stat.org/) format.\n\n\n### Installation:\n\n[From CRAN](https://cran.r-project.org/package=rjstat) (most people use this):\n\n```s\ninstall.packages('rjstat')\n```\n\n[From github](https://github.com/ajschumacher/rjstat) (development version):\n\n```s\nlibrary(devtools)\ninstall_github(\"ajschumacher/rjstat\")\n```\n\n\n### Usage:\n\n```s\nlibrary(rjstat)\n\noecd.canada.url \u003c- \"https://json-stat.org/samples/oecd-canada.json\"\n\n# Read from JSON-stat to a list of data frames:\nresults \u003c- fromJSONstat(readLines(oecd.canada.url))\nnames(results)\n\n## [1] \"Unemployment rate in the OECD countries 2003-2014\"\n## [2] \"Population by sex and age group. Canada. 2012\"\n\n# You can also read in using the typically terser IDs rather than labels.\nresults \u003c- fromJSONstat(readLines(oecd.canada.url), naming=\"id\")\nnames(results)\n\n## [1] \"oecd\"   \"canada\"\n\n\n# Convert from a list of data frames to a JSON-stat string.\n# (The data frames must have exactly one value column.)\nlibrary(reshape)\nirises \u003c- melt(cbind(iris, Specimen=rep(1:50, 3)),\n               id.vars=c(\"Species\", \"Specimen\"))\nirisJSONstat \u003c- toJSONstat(list(iris=irises))\ncat(substr(irisJSONstat, 1, 76))\n\n## {\"version\":\"2.0\",\"class\":\"collection\",\"link\":{\"item\":[{\"class\":\"dataset\",\"id\n\n# You can successfully convert back and forth, but only for the features that\n# make sense in both R and JSON-stat.\nhead(fromJSONstat(irisJSONstat)[[1]])\n\n##   Species Specimen     variable value\n## 1  setosa        1 Sepal.Length   5.1\n## 2  setosa        1  Sepal.Width   3.5\n## 3  setosa        1 Petal.Length   1.4\n## 4  setosa        1  Petal.Width   0.2\n## 5  setosa        2 Sepal.Length   4.9\n## 6  setosa        2  Sepal.Width   3.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajschumacher%2Frjstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajschumacher%2Frjstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajschumacher%2Frjstat/lists"}