{"id":28120583,"url":"https://github.com/edwindj/sdmxdata","last_synced_at":"2025-07-21T07:33:37.799Z","repository":{"id":266822640,"uuid":"899459814","full_name":"edwindj/sdmxdata","owner":"edwindj","description":"R package based on SDMX REST v2.1","archived":false,"fork":false,"pushed_at":"2025-06-26T13:13:00.000Z","size":1932,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-26T13:43:19.072Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://edwindj.github.io/sdmxdata/","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/edwindj.png","metadata":{"files":{"readme":"README.Rmd","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":"2024-12-06T10:06:35.000Z","updated_at":"2025-06-26T13:09:05.000Z","dependencies_parsed_at":"2024-12-06T11:21:14.421Z","dependency_job_id":"cf674552-eb95-4636-b4be-6fee7025dec3","html_url":"https://github.com/edwindj/sdmxdata","commit_stats":null,"previous_names":["edwindj/cbsopendata","edwindj/sdmxdata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edwindj/sdmxdata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwindj%2Fsdmxdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwindj%2Fsdmxdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwindj%2Fsdmxdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwindj%2Fsdmxdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edwindj","download_url":"https://codeload.github.com/edwindj/sdmxdata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edwindj%2Fsdmxdata/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266261311,"owners_count":23901289,"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":[],"created_at":"2025-05-14T07:41:20.596Z","updated_at":"2025-07-21T07:33:37.792Z","avatar_url":"https://github.com/edwindj.png","language":"R","funding_links":[],"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```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# sdmxdata\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/sdmxdata)](https://CRAN.R-project.org/package=sdmxdata)\n[![R-CMD-check](https://github.com/edwindj/sdmxdata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/edwindj/sdmxdata/actions/workflows/R-CMD-check.yaml)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n\u003c!-- badges: end --\u003e\n\n## Introduction\n\n_Work in progress, not to be used for production work_\n\nWhy `sdmxdata`? The package is designed to provide a simple interface to\nretrieve and select data from open statistical data providers that support the SDMX v2.1 REST API. \n\nIt focusses on:\n\n- retrieving a list of dataflows: `list_dataflows`, for getting an overview of the\navailable tables (aka dataflows) at a data provider, including their descriptions.\n\n- retrieving the structure of a dataflow: `get_dataflow_structure`, for getting\ndetailed information on the structure and metadata of a dataflow.\n\n- retrieving data: `get_data` and `get_observations` \nfor selecting and retrieving data from a dataflow. Both functions allow for \neasy filtering on the server on dimensions, reporting periods, and other metadata.\n \n- retrieving a list of agencies and subagencies: `list_agencies`, for getting an overview of the\nagencies.\n\nIt does not implement a full fledged SDMX metadata model or data model. For that, you can use [`rsdmx`](https://CRAN.R-project.org/package=rsdmx).\n\n## Installation\n\nYou can install the development version of sdmxdata from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"pak\")\npak::pak(\"edwindj/sdmxdata\")\n```\n\n## Example\n\n\n```{r setup}\nlibrary(sdmxdata)\n```\n\nTo retrieve a list of tables:\n\n```{r}\nCBSbeta \u003c- sdmxdata::get_endpoint(\"NL1\")\ndfs \u003c- CBSbeta |\u003e list_dataflows()\ndfs[,1:5] |\u003e \n  head()\n```\n```{r}\nOECD \u003c- sdmxdata::get_endpoint(\"OECD\")\ndfs_oecd \u003c- OECD |\u003e list_dataflows()\ndfs_oecd[,1:5] |\u003e \n  head()\n```\nTo retrieve a dataflow structure:\n\n```{r}\ndataflow_ref \u003c- dfs$ref[4]\nprint(dataflow_ref)\n\ndsd \u003c- CBSbeta |\u003e get_dataflow_structure(ref = dataflow_ref)\ndsd\n```\n\nTo retrieve data use `get_data`\n\n```{r}\ndata \u003c- CBSbeta |\u003e get_data(agencyID=dsd$agencyID, id = dsd$id, pivot=\"Topics\")\nhead(data)\n```\n\nOr get the underlying observations with `get_observations`\n\n```{r}\nobs \u003c- CBSbeta |\u003e get_observations(id=\"DF_37230ned\", agencyID=\"NL1.CNVT\")\n```\n\n```{r}\nhead(obs)\n```\n\nTo retrieve a list of agencies or subagencies:\n\n```{r}\nagencies \u003c- CBSbeta |\u003e list_agencies()\nhead(agencies)\n```\n\nUse a URL to retrieve data:\n\n```{r}\nurl \u003c- \"https://sdmx.oecd.org/public/rest/data/OECD.TAD.ARP,DSD_FISH_PROD@DF_FISH_AQUA,1.0/.A.._T.T?startPeriod=2010\u0026dimensionAtObservation=AllDimensions\"\n\nobs \u003c- get_observations_from_url(url)\nhead(obs)\n```\n\nOr return just the `sdmxdata::get_observations` command that would be used to retrieve the data:\n```{r}\nquery \u003c- get_observations_from_url(url, return_query = TRUE)\nquery\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwindj%2Fsdmxdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedwindj%2Fsdmxdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwindj%2Fsdmxdata/lists"}