{"id":26211411,"url":"https://github.com/statistikat/statcuber","last_synced_at":"2025-07-30T07:34:24.354Z","repository":{"id":43695138,"uuid":"296280431","full_name":"statistikat/STATcubeR","owner":"statistikat","description":"R interface for the STATcube REST API and data.statistik.gv.at","archived":false,"fork":false,"pushed_at":"2024-11-29T10:01:58.000Z","size":17841,"stargazers_count":18,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-06T08:06:17.302Z","etag":null,"topics":["api","database","ogd","open-data","r","sdmx"],"latest_commit_sha":null,"homepage":"https://statistikat.github.io/STATcubeR/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/statistikat.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","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,"zenodo":null}},"created_at":"2020-09-17T09:28:49.000Z","updated_at":"2025-01-20T09:13:32.000Z","dependencies_parsed_at":"2024-07-18T09:13:00.569Z","dependency_job_id":"ea6aee3d-c04b-4549-9c5c-18e8c7b51c33","html_url":"https://github.com/statistikat/STATcubeR","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/statistikat/STATcubeR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statistikat%2FSTATcubeR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statistikat%2FSTATcubeR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statistikat%2FSTATcubeR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statistikat%2FSTATcubeR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statistikat","download_url":"https://codeload.github.com/statistikat/STATcubeR/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statistikat%2FSTATcubeR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267831520,"owners_count":24151237,"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-07-30T02:00:09.044Z","response_time":70,"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":["api","database","ogd","open-data","r","sdmx"],"created_at":"2025-03-12T08:20:18.092Z","updated_at":"2025-07-30T07:34:24.287Z","avatar_url":"https://github.com/statistikat.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# STATcubeR \u003cimg src=\"man/figures/logo2.svg\" align=\"right\" width=\"120\"/\u003e\n\n\u003c!-- badges: start --\u003e\n\n[![R-CMD-check](https://github.com/statistikat/STATcubeR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/statistikat/STATcubeR/actions/workflows/R-CMD-check.yaml)\n[![GitHub code size in\nbytes](https://img.shields.io/github/languages/code-size/statistikat/STATcubeR?logo=github)](https://github.com/statistikat/STATcubeR)\n[![GitHub last\ncommit](https://img.shields.io/github/last-commit/statistikat/STATcubeR.svg?logo=github)](https://github.com/statistikat/STATcubeR/commits/master)\n\n\u003c!-- badges: end --\u003e\n\nR client for all things [STATcube](https://statcube.at). Get data from\nthe STATcube REST API or via the open government data portal at\n\u003chttps://data.statistik.gv.at\u003e. `{STATcubeR}` makes it easy to include\nboth those datasources into your R projects.\n\n## Installation\n\nCurrent versions of STATcubeR can be directly downloaded from CRAN using\n\n``` r\ninstall.packages(\"STATcubeR\")\n```\n\nor directly from [github](https://github.com/statistikat/STATcubeR) using the\n`{remotes}` package.\n\n``` r\nremotes::install_github(\"statistikat/STATcubeR\")\n```\n\n\u003cdetails\u003e\n\n\u003csummary\u003eAlternative: Install from `tar.gz` Archives\u003c/summary\u003e\n\nIf you are not able to use `remotes::nstall_github()` to install\n`STATcubeR`, you can also download the package as an archive from\n\u003chttps://github.com/statistikat/STATcubeR/tags\u003e. The package can then be\ninstalled by providing a path to the downloaded archive file, for\nexample:\n\n``` r\ninstall.packages('STATcubeR-x.y.z.tar.gz', repos = NULL)\n```\n\n\u003c/details\u003e\n\n## Open Data\n\nTo import datasets from \u003chttps://data.statistik.gv.at\u003e, pass the dataset\nid to the `od_table()` function. For example, OGD data about the\n[Austrian population in\n2020](https://data.statistik.gv.at/web/meta.jsp?dataset=OGD_bevstandjbab2002_BevStand_2020)\ncan be accessed as follows.\n\n``` r\nlibrary(STATcubeR)\npopulation \u003c- od_table(\"OGD_bevstandjbab2002_BevStand_2020\")\npopulation$tabulate()\n```\n\n```         \n# A STATcubeR tibble: 392,508 x 5\n  `Time section` Sex   `Commune (aggregation by polit… `Age in single ye… Number\n* \u003cdate\u003e         \u003cfct\u003e \u003cfct\u003e                           \u003cfct\u003e               \u003cint\u003e\n1 2020-01-01     male  Eisenstadt \u003c10101\u003e              under 1 year old       77\n2 2020-01-01     male  Eisenstadt \u003c10101\u003e              1 year old             75\n3 2020-01-01     male  Eisenstadt \u003c10101\u003e              2 years old            70\n4 2020-01-01     male  Eisenstadt \u003c10101\u003e              3 years old            83\n# … with 392,504 more rows\n```\n\nThe resulting object contains labeled data (see above), raw data,\nmetadata and more. See the [OGD\narticle](https://statistikat.github.io/STATcubeR/articles/od_table.html)\nfor further details. The [available datasets\narticle](https://statistikat.github.io/STATcubeR/articles/od_list.html)\nprovides an overview of the 315 datasets that are compatible with\n`od_table()`.\n\n## STATcube API\n\nIn order to use the REST API, it is required to set up an API key. As\nmentioned in the [API key\narticle](https://statistikat.github.io/STATcubeR/articles/sc_key.html),\nthis requires a STATcube subscription.\n\nThere are four main functions that interact with the API\n\n-   `sc_schema_catalogue()` lists all available datasets and tables\n-   `sc_schema_db()` provides metadata about a specific database\n-   `sc_table()` requests a table from the API according to a json\n    standard\n-   `sc_table_saved()` requests a table based on an id\n\nMore information about the first two functions can be found in the\n[schema\narticle](https://statistikat.github.io/STATcubeR/articles/sc_schema.html).\n`sc_table()` and `sc_table_saved()` have their own articles\n[here](https://statistikat.github.io/STATcubeR/articles/sc_table.html)\nand\n[here](https://statistikat.github.io/STATcubeR/articles/sc_table_saved.html).\n\n## Consistent data formats\n\nBoth OGD data and tables form the REST API are wrapped into an `{R6}`\nclass to provide easy access to data and metadata. For example, the\n`$tabulate()` method is also available for tables from the REST API.\n\n``` r\n# https://statcube.at/statcube/openinfopage?id=debevstandjbab2002\npopulation \u003c- sc_table_saved(\"defaulttable_debevstandjbab2002\")\npopulation$tabulate()\n```\n\n```         \n# A STATcubeR tibble: 10 x 3\n  `Time section` `Commune (aggregation by political district)`  Number\n  \u003cdate\u003e         \u003cfct\u003e                                           \u003cdbl\u003e\n1 2021-01-01     Burgenland \u003cAT11\u003e                              296010\n2 2021-01-01     Carinthia \u003cAT21\u003e                               562089\n3 2021-01-01     Lower Austria \u003cAT12\u003e                          1690879\n4 2021-01-01     Upper Austria \u003cAT31\u003e                          1495608\n# … with 6 more rows\n```\n\nSee the [base class\narticle](https://statistikat.github.io/STATcubeR/articles/sc_data.html)\nfor more information about the features of this class.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatistikat%2Fstatcuber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatistikat%2Fstatcuber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatistikat%2Fstatcuber/lists"}